2.1.2 • Published 3 years ago

@sricsl/sunflower-client v2.1.2

Weekly downloads
-
License
Unlicense
Repository
-
Last release
3 years ago

@sricsl/sunflower-client

sunflower_client - JavaScript client for @sricsl/sunflower-client Sunflower Server This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 2.0.0
  • Package version: 2.1.2
  • Build package: org.openapitools.codegen.languages.JavascriptClientCodegen

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install @sricsl/sunflower-client --save

Finally, you need to build the module:

npm run build
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

To use the link you just defined in your project, switch to the directory you want to use your @sricsl/sunflower-client from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

Finally, you need to build the module:

npm run build

git

If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:

    npm install GIT_USER_ID/GIT_REPO_ID --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var sunflower_client = require('@sricsl/sunflower-client');

var defaultClient = sunflower_client.ApiClient.instance;
// Configure Bearer (jwt) access token for authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"

var api = new sunflower_client.SunflowerServiceApi()
var docId = "docId_example"; // {String} document id
var id = "id_example"; // {String} subject
var arrowType = new sunflower_client.ArrowType(); // {ArrowType} arrowType
var frameType = new sunflower_client.FrameType(); // {FrameType} frameType
var prop = "prop_example"; // {String} prop
api.addBooleanProperty(docId, id, arrowType, frameType, prop).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Documentation for API Endpoints

All URIs are relative to http://localhost

ClassMethodHTTP requestDescription
sunflower_client.SunflowerServiceApiaddBooleanPropertyPOST /sfweb/rest/docs/{docId}/ids/{id}/boolean-props/{frameType}/{prop}/{arrowType}add a boolean property value
sunflower_client.SunflowerServiceApiaddDirectivePOST /sfweb/rest/docs/{docId}/directivesadd a directive
sunflower_client.SunflowerServiceApiaddDocumentPOST /sfweb/rest/docsadd a new document
sunflower_client.SunflowerServiceApiaddHilogFactPOST /sfweb/rest/docs/{docId}/hilogadd a hilog (non-frame) fact
sunflower_client.SunflowerServiceApiaddImportPOST /sfweb/rest/docs/{docId}/importsadd an import
sunflower_client.SunflowerServiceApiaddInstancePOST /sfweb/rest/docs/{docId}/ids/{id}/a-instancesadd an instance to an identifier
sunflower_client.SunflowerServiceApiaddLatentQueryPOST /sfweb/rest/docs/{docId}/latent-queriesadd a latent query
sunflower_client.SunflowerServiceApiaddNamespacePOST /sfweb/rest/docs/{docId}/namespacesadd a namespace definition
sunflower_client.SunflowerServiceApiaddQueryPOST /sfweb/rest/docs/{docId}/queriesadd a query
sunflower_client.SunflowerServiceApiaddRootClassPOST /sfweb/rest/docs/{docId}/root-classesadd a root class
sunflower_client.SunflowerServiceApiaddRulePOST /sfweb/rest/docs/{docId}/rulesadd a rule
sunflower_client.SunflowerServiceApiaddSubclassPOST /sfweb/rest/docs/{docId}/ids/{id}/a-subclassesadd a sub-class to an identifier
sunflower_client.SunflowerServiceApiaddSuperclassPOST /sfweb/rest/docs/{docId}/ids/{id}/a-superclassesadd a super-class to an identifier
sunflower_client.SunflowerServiceApiaddTriplePropertyPOST /sfweb/rest/docs/{docId}/ids/{id}/triple-props/{frameType}/{prop}/{arrowType}add a triple property value
sunflower_client.SunflowerServiceApiaddTriplePropertyWithCardinalitiesPOST /sfweb/rest/docs/{docId}/ids/{id}/triple-props/{frameType}/{prop}/{arrowType}/{min}/{max}add a triple property value with cardinalities
sunflower_client.SunflowerServiceApiaddTypePOST /sfweb/rest/docs/{docId}/ids/{id}/a-typesadd a type to an identifier
sunflower_client.SunflowerServiceApiaddUDFPOST /sfweb/rest/docs/{docId}/udfsadd a user-defined function
sunflower_client.SunflowerServiceApiapplyOntologyChangePOST /sfweb/rest/changesapply an ontology change
sunflower_client.SunflowerServiceApicreateContentPOST /sfweb/rest/docs/{docId}/content/createcreate flora content
sunflower_client.SunflowerServiceApideleteBooleanPropertyDELETE /sfweb/rest/docs/{docId}/ids/{id}/boolean-props/{frameType}/{prop}/{arrowType}delete a boolean property value
sunflower_client.SunflowerServiceApideleteContentPOST /sfweb/rest/docs/{docId}/content/deletedelete flora content
sunflower_client.SunflowerServiceApideleteDirectiveDELETE /sfweb/rest/docs/{docId}/directives/{did}delete a directive
sunflower_client.SunflowerServiceApideleteDocumentDELETE /sfweb/rest/docs/{docId}delete a document
sunflower_client.SunflowerServiceApideleteHilogFactDELETE /sfweb/rest/docs/{docId}/hilog/{hid}delete a hilog (non-frame) fact
sunflower_client.SunflowerServiceApideleteIdentifierDELETE /sfweb/rest/docs/{docId}/ids/{id}delete an identifier
sunflower_client.SunflowerServiceApideleteImportDELETE /sfweb/rest/docs/{docId}/imports/{importId}delete an import
sunflower_client.SunflowerServiceApideleteInstanceDELETE /sfweb/rest/docs/{docId}/ids/{id}/a-instances/{instId}delete an instance from an identifier
sunflower_client.SunflowerServiceApideleteLatentQueryDELETE /sfweb/rest/docs/{docId}/latent-queries/{lqId}delete a latent query
sunflower_client.SunflowerServiceApideleteNamespaceDELETE /sfweb/rest/docs/{docId}/namespaces/{prefix}delete a namespace definition
sunflower_client.SunflowerServiceApideleteQueryDELETE /sfweb/rest/docs/{docId}/queries/{qid}delete a query
sunflower_client.SunflowerServiceApideleteRuleDELETE /sfweb/rest/docs/{docId}/rules/{ruleId}delete a rule
sunflower_client.SunflowerServiceApideleteSubclassDELETE /sfweb/rest/docs/{docId}/ids/{id}/a-subclasses/{clsId}delete a sub-class from an identifier
sunflower_client.SunflowerServiceApideleteSuperclassDELETE /sfweb/rest/docs/{docId}/ids/{id}/a-superclasses/{clsId}delete a super-class from an identifier
sunflower_client.SunflowerServiceApideleteTriplePropertyDELETE /sfweb/rest/docs/{docId}/ids/{id}/triple-props/{frameType}/{prop}/{arrowType}/{value}delete a triple property value
sunflower_client.SunflowerServiceApideleteTriplePropertyWithCardinalitiesDELETE /sfweb/rest/docs/{docId}/ids/{id}/triple-props/{frameType}/{prop}/{arrowType}/{min}/{max}/{value}delete a triple property value with cardinalities
sunflower_client.SunflowerServiceApideleteTypeDELETE /sfweb/rest/docs/{docId}/ids/{id}/a-types/{clsId}delete a type from an identifier
sunflower_client.SunflowerServiceApideleteUDFDELETE /sfweb/rest/docs/{docId}/udfs/{uid}delete a user-defined function
sunflower_client.SunflowerServiceApienglishPOST /sfweb/rest/docs/{docId}/englishgenerate english for a flora term
sunflower_client.SunflowerServiceApigetAssertedInstancesGET /sfweb/rest/docs/{docId}/ids/{id}/a-instancesget the asserted instances of an identifier
sunflower_client.SunflowerServiceApigetAssertedSubclassesGET /sfweb/rest/docs/{docId}/ids/{id}/a-subclassesget the asserted sub-classes of an identifier
sunflower_client.SunflowerServiceApigetAssertedSuperclassesGET /sfweb/rest/docs/{docId}/ids/{id}/a-superclassesget the asserted super-classes of an identifier
sunflower_client.SunflowerServiceApigetAssertedTypesGET /sfweb/rest/docs/{docId}/ids/{id}/a-typesget the asserted types of an identifier
sunflower_client.SunflowerServiceApigetBooleanPropertiesGET /sfweb/rest/docs/{docId}/ids/{id}/boolean-propsget the boolean properties of an identifier
sunflower_client.SunflowerServiceApigetBooleanPropertiesForFrameTypeGET /sfweb/rest/docs/{docId}/ids/{id}/boolean-props/{frameType}get the boolean properties of an identifier for a given frame type
sunflower_client.SunflowerServiceApigetBooleanPropertiesForFrameTypeAndPropertyGET /sfweb/rest/docs/{docId}/ids/{id}/boolean-props/{frameType}/{prop}get the boolean properties of an identifier for a given frame type and property
sunflower_client.SunflowerServiceApigetBooleanPropertiesForFrameTypeAndPropertyAndArrowTypeGET /sfweb/rest/docs/{docId}/ids/{id}/boolean-props/{frameType}/{prop}/{arrowType}get the boolean properties of an identifier for a given frame type, property, and arrow type
sunflower_client.SunflowerServiceApigetDirectiveGET /sfweb/rest/docs/{docId}/directives/{did}get a directive
sunflower_client.SunflowerServiceApigetDirectivesGET /sfweb/rest/docs/{docId}/directivesget the directives
sunflower_client.SunflowerServiceApigetDocumentsGET /sfweb/rest/docsretrieve all the documents
sunflower_client.SunflowerServiceApigetFloraTextGET /sfweb/rest/docs/{docId}/floraget the raw flora text of the document
sunflower_client.SunflowerServiceApigetHilogFactGET /sfweb/rest/docs/{docId}/hilog/{hid}get a hilog (non-frame) fact
sunflower_client.SunflowerServiceApigetHilogFactsGET /sfweb/rest/docs/{docId}/hilogget the hilog (non-frame) facts
sunflower_client.SunflowerServiceApigetIdentifierGET /sfweb/rest/docs/{docId}/ids/{id}get information about an identifier
sunflower_client.SunflowerServiceApigetIdentifiersGET /sfweb/rest/docs/{docId}/idsget all the identifiers
sunflower_client.SunflowerServiceApigetImportedByGET /sfweb/rest/docs/{docId}/importedByget the importing documents
sunflower_client.SunflowerServiceApigetImportsGET /sfweb/rest/docs/{docId}/importsget the imports
sunflower_client.SunflowerServiceApigetInstancesGET /sfweb/rest/docs/{docId}/ids/{id}/instancesget the instances of an identifier
sunflower_client.SunflowerServiceApigetLatentQueriesGET /sfweb/rest/docs/{docId}/latent-queriesget the latent queries
sunflower_client.SunflowerServiceApigetLatentQueryGET /sfweb/rest/docs/{docId}/latent-queries/{lqId}get a latent query
sunflower_client.SunflowerServiceApigetNamespacesGET /sfweb/rest/docs/{docId}/namespacesget namespace definitions
sunflower_client.SunflowerServiceApigetOntologyChangesGET /sfweb/rest/changesretrieve all the ontology changes
sunflower_client.SunflowerServiceApigetQueriesGET /sfweb/rest/docs/{docId}/queriesget the queries
sunflower_client.SunflowerServiceApigetQueryGET /sfweb/rest/docs/{docId}/queries/{qid}get a query
sunflower_client.SunflowerServiceApigetRootClassesGET /sfweb/rest/docs/{docId}/root-classesget the root classes
sunflower_client.SunflowerServiceApigetRootInfoGET /sfweb/restget service information
sunflower_client.SunflowerServiceApigetRuleGET /sfweb/rest/docs/{docId}/rules/{ruleId}get information about a rule
sunflower_client.SunflowerServiceApigetRulesGET /sfweb/rest/docs/{docId}/rulesget the rules
sunflower_client.SunflowerServiceApigetSubclassesGET /sfweb/rest/docs/{docId}/ids/{id}/subclassesget the sub-classes of an identifier
sunflower_client.SunflowerServiceApigetSuperclassesGET /sfweb/rest/docs/{docId}/ids/{id}/superclassesget the super-classes of an identifier
sunflower_client.SunflowerServiceApigetTriplePropertiesGET /sfweb/rest/docs/{docId}/ids/{id}/triple-propsget the triple properties of an identifier
sunflower_client.SunflowerServiceApigetTriplePropertiesForFrameTypeGET /sfweb/rest/docs/{docId}/ids/{id}/triple-props/{frameType}get the triple properties of an identifier for a given frame type
sunflower_client.SunflowerServiceApigetTriplePropertiesForFrameTypeAndPropertyGET /sfweb/rest/docs/{docId}/ids/{id}/triple-props/{frameType}/{prop}get the triple properties of an identifier for a given frame type and property
sunflower_client.SunflowerServiceApigetTriplePropertiesForFrameTypeAndPropertyAndArrowTypeGET /sfweb/rest/docs/{docId}/ids/{id}/triple-props/{frameType}/{prop}/{arrowType}get the triple properties of an identifier for a given frame type, property, and arrow type
sunflower_client.SunflowerServiceApigetTypesGET /sfweb/rest/docs/{docId}/ids/{id}/typesget the types of an identifier
sunflower_client.SunflowerServiceApigetUDFGET /sfweb/rest/docs/{docId}/udfs/{uid}get a user-defined function
sunflower_client.SunflowerServiceApigetUDFsGET /sfweb/rest/docs/{docId}/udfsget the Sunflower_User-defined functions
sunflower_client.SunflowerServiceApigetUncategorizedIdentifiersGET /sfweb/rest/docs/{docId}/uncategorized-identifiersget the uncategorized identifiers (not class or instance)
sunflower_client.SunflowerServiceApiimportFloraDirPOST /sfweb/rest/importimport a flora directory
sunflower_client.SunflowerServiceApilatentQueryPOST /sfweb/rest/docs/{docId}/latent-queryexecute a latent query
sunflower_client.SunflowerServiceApiqueryPOST /sfweb/rest/docs/{docId}/queryexecute a query
sunflower_client.SunflowerServiceApiretrieveContentPOST /sfweb/rest/docs/{docId}/content/retrieveretrieve flora content
sunflower_client.SunflowerServiceApiretrieveJPQLPOST /sfweb/rest/docs/{docId}/content/jpqlretrieve flora content via manual JPQL query
sunflower_client.SunflowerServiceApitracePOST /sfweb/rest/docs/{docId}/traceexecute a trace
sunflower_client.SunflowerServiceApiupdateLatentQueryPUT /sfweb/rest/docs/{docId}/latent-queries/{lqId}update a latent query
sunflower_client.SunflowerServiceApiupdateRulePUT /sfweb/rest/docs/{docId}/rules/{ruleId}update a rule

Documentation for Models

Documentation for Authorization

bearerAuth

  • Type: Bearer authentication (jwt)