5.0.0 • Published 8 years ago

nimbits_api v5.0.0

Weekly downloads
2
License
Unlicense
Repository
-
Last release
8 years ago

nimbits_api

NimbitsApi - JavaScript client for nimbits_api Nimbits Server Provides deep automation via a REST API This SDK is automatically generated by the Swagger Codegen project:

  • API version: 5.0
  • Package version: 5.0
  • Build package: io.swagger.codegen.languages.JavascriptClientCodegen For more information, please visit https://api.nimbits.io

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 nimbits_api --save

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 NimbitsApi = require('nimbits_api');

var defaultClient = NimbitsApi.ApiClient.instance;

// Configure API key authorization: x-api-key
var x-api-key = defaultClient.authentications['x-api-key'];
x-api-key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//x-api-key.apiKeyPrefix['x-api-key'] = "Token"

var api = new NimbitsApi.EntityApi()

var xApiKey = "xApiKey_example"; // {String} x-api-key

var topic = new NimbitsApi.Topic(); // {Topic} topic


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.addTopic(xApiKey, topic, callback);

Documentation for API Endpoints

All URIs are relative to https://api.nimbits.io

ClassMethodHTTP requestDescription
NimbitsApi.EntityApiaddTopicPOST /v5_0/api/entity/topicAddTopic
NimbitsApi.EntityApideleteTopicDELETE /v5_0/api/entity/topic/{id}DeleteTopic
NimbitsApi.EntityApigetGroupGET /v5_0/api/group/{id}GetGroup
NimbitsApi.EntityApigetTopicGET /v5_0/api/entity/topic/{id}GetTopic
NimbitsApi.GroupApigetGroupGET /v5_0/api/group/{id}GetGroup
NimbitsApi.GroupApigetGroupsGET /v5_0/api/groupGetGroups
NimbitsApi.SnapshotApigetSnapshotGET /v5_0/api/snapshot/{id}GetSnapshot
NimbitsApi.SnapshotApipostSnapshotPOST /v5_0/api/snapshot/{id}PostSnapshot
NimbitsApi.TableApigetDataTableGET /v5_0/api/table/topic/{id}GetDataTable
NimbitsApi.TopicApiaddTopicPOST /v5_0/api/entity/topicAddTopic
NimbitsApi.TopicApideleteTopicDELETE /v5_0/api/entity/topic/{id}DeleteTopic
NimbitsApi.TopicApigetDataTableGET /v5_0/api/table/topic/{id}GetDataTable
NimbitsApi.TopicApigetGroupGET /v5_0/api/group/{id}GetGroup
NimbitsApi.TopicApigetGroupsGET /v5_0/api/groupGetGroups
NimbitsApi.TopicApigetSnapshotGET /v5_0/api/snapshot/{id}GetSnapshot
NimbitsApi.TopicApigetTopicGET /v5_0/api/entity/topic/{id}GetTopic
NimbitsApi.TopicApipostSnapshotPOST /v5_0/api/snapshot/{id}PostSnapshot

Documentation for Models

Documentation for Authorization

x-api-key

  • Type: API key
  • API key parameter name: x-api-key
  • Location: HTTP header