0.1.0 • Published 4 years ago

@mobieve/mobieve-sdk-js v0.1.0

Weekly downloads
-
License
Unlicense
Repository
github
Last release
4 years ago

mobieve-sdk-js

MobieveSdkJs - JavaScript client for mobieve-sdk-js No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 2019-12-11T20:25:45Z
  • Package version: 0.1.0
  • 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 mobieve-sdk-js --save

git

If the library is hosted at a git repository, e.g. https://github.com/mobieve/mobieve-sdk-js then install it via:

    npm install mobieve/mobieve-sdk-js --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 MobieveSdkJs = require('mobieve-sdk-js');

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

var api = new MobieveSdkJs.AuthApi()
var api = new MobieveSdkJs.Api(); // {Api} 
api.createApi(api).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 https://0lp2wd09yb.execute-api.sa-east-1.amazonaws.com/ngrok

ClassMethodHTTP requestDescription
MobieveSdkJs.AuthApicreateApiPOST /apis
MobieveSdkJs.AuthApicreateClientPOST /clients
MobieveSdkJs.AuthApicreatePermissionPOST /permissions
MobieveSdkJs.AuthApicreateRolePOST /roles
MobieveSdkJs.AuthApicreateRoleUserPOST /role-users
MobieveSdkJs.AuthApicreateTeamPOST /teams
MobieveSdkJs.AuthApicreateTeamUserPOST /team-users
MobieveSdkJs.AuthApideletePermissionDELETE /permissions/{id}
MobieveSdkJs.AuthApideleteRoleUserDELETE /role-users
MobieveSdkJs.AuthApideleteTeamDELETE /teams/{id}
MobieveSdkJs.AuthApideleteTeamUserDELETE /team-users
MobieveSdkJs.AuthApigetApiGET /apis/{id}
MobieveSdkJs.AuthApigetApisGET /apis
MobieveSdkJs.AuthApigetClientsGET /clients
MobieveSdkJs.AuthApigetPermissionsGET /permissions
MobieveSdkJs.AuthApigetRoleGET /roles/{id}
MobieveSdkJs.AuthApigetRolesGET /roles
MobieveSdkJs.AuthApigetTeamGET /teams/{id}
MobieveSdkJs.AuthApigetTeamsGET /teams
MobieveSdkJs.AuthApigetUserGET /users/{id}
MobieveSdkJs.AuthApigetUsersGET /users
MobieveSdkJs.AuthApiloginPOST /login
MobieveSdkJs.AuthApilogoutPOST /logout
MobieveSdkJs.AuthApiupdateApiPOST /apis/{id}
MobieveSdkJs.AuthApiupdateClientPUT /clients/{id}
MobieveSdkJs.AuthApiupdateRolePOST /roles/{id}
MobieveSdkJs.AuthApiupdateTeamPOST /teams/{id}
MobieveSdkJs.AuthApiupdateUserPOST /users/{id}

Documentation for Models

Documentation for Authorization

BearerToken

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header