1.0.5 • Published 7 years ago

mantle-lib v1.0.5

Weekly downloads
1
License
Unlicense
Repository
-
Last release
7 years ago

mantle-lib

MantleLib - JavaScript client for mantle-lib Most endpoints requires authentication. You must first authenticate with your account using the endpoint: 'authentication/login' which will return an authorization token. You must then use this token in all your requests with the following header: Authorization: {ACCESS_TOKEN} . This SDK is automatically generated by the Swagger Codegen project:

  • API version: v1
  • Package version: 1.0.5
  • Build package: io.swagger.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 mantle-lib --save
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

Finally, switch to the directory you want to use your mantle-lib from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

You should now be able to require('mantle-lib') in javascript files from the directory you ran the last command above from.

git

If the library is hosted at a git repository, e.g. https://github.com/YOUR_USERNAME/mantle-lib then install it via:

    npm install YOUR_USERNAME/mantle-lib --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, that's to say your javascript file where you actually use this library):

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 MantleLib = require('mantle-lib');

var api = new MantleLib.AuthenticationApi()

var opts = { 
  'request': new MantleLib.UserForgotPasswordConfirmationRequest() // {UserForgotPasswordConfirmationRequest} 
};
api.authenticationForgotpasswordConfirmationPost(opts).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

Documentation for API Endpoints

All URIs are relative to https://api.mantle.services

ClassMethodHTTP requestDescription
MantleLib.AuthenticationApiauthenticationForgotpasswordConfirmationPostPOST /authentication/forgotpassword/confirmationForgot password code confirmation
MantleLib.AuthenticationApiauthenticationForgotpasswordPostPOST /authentication/forgotpasswordForgot password
MantleLib.AuthenticationApiauthenticationLoginPostPOST /authentication/loginLogin
MantleLib.AuthenticationApiauthenticationLogoutPostPOST /authentication/logoutLogout
MantleLib.AuthenticationApiauthenticationSignupConfirmationPostPOST /authentication/signup/confirmationSign up code confirmation
MantleLib.AuthenticationApiauthenticationSignupPostPOST /authentication/signupSign up a user with an invitation
MantleLib.BillingApibillsGetGET /billsGet all bills
MantleLib.InvitationsApiinvitationsByInvitationIdDeleteDELETE /invitations/{invitationId}Deletes an invitation by invitationId
MantleLib.InvitationsApiinvitationsByInvitationIdGetGET /invitations/{invitationId}Get an invitation by invitationId
MantleLib.InvitationsApiinvitationsGetGET /invitationsGet all invitations
MantleLib.InvitationsApiinvitationsPostPOST /invitationsCreates an invitation
MantleLib.KeeperApikeeperFilesByFileIdDeleteDELETE /keeper/files/{fileId}FILES Deletes a file by fileId
MantleLib.KeeperApikeeperFilesByFileIdGetGET /keeper/files/{fileId}FILES Get file by fileId
MantleLib.KeeperApikeeperFilesDiffLatestPostPOST /keeper/files/diff/latestFILES Compares with latest version
MantleLib.KeeperApikeeperFilesDiffPostPOST /keeper/files/diffFILES Compares a new file with the original file
MantleLib.KeeperApikeeperFilesExistPostPOST /keeper/files/existFILES Check if a file already exists
MantleLib.KeeperApikeeperFilesGetGET /keeper/filesFILES Get all files
MantleLib.KeeperApikeeperFilesPostPOST /keeper/filesFILES Creates a file
MantleLib.KeeperApikeeperFoldersByFolderIdDeleteDELETE /keeper/folders/{folderId}FOLDERS Delete a folder by folderId
MantleLib.KeeperApikeeperFoldersByFolderIdGetGET /keeper/folders/{folderId}FOLDERS Get a folder by folderId
MantleLib.KeeperApikeeperFoldersGetGET /keeper/foldersFOLDERS Get all folders
MantleLib.KeeperApikeeperFoldersPostPOST /keeper/foldersFOLDERS Create a folder
MantleLib.KeeperApikeeperVersionsDiffPostPOST /keeper/versions/diffVERSIONS Compares a new file with a specific version
MantleLib.KeeperApikeeperVersionsGetGET /keeper/versionsVERSIONS Get all versions by fileId
MantleLib.KeeperApikeeperVersionsPostPOST /keeper/versionsVERSIONS Creates a version
MantleLib.TrackerApitrackerAssetsBatchesByAssetIdGetGET /tracker/assets/batches/{assetId}ASSETS Get all issue batch for an asset by id
MantleLib.TrackerApitrackerAssetsByAssetIdDeleteDELETE /tracker/assets/{assetId}ASSETS Deletes an asset
MantleLib.TrackerApitrackerAssetsByAssetIdGetGET /tracker/assets/{assetId}ASSETS Get an asset by id
MantleLib.TrackerApitrackerAssetsByAssetIdPutPUT /tracker/assets/{assetId}ASSETS Updates an asset
MantleLib.TrackerApitrackerAssetsGetGET /tracker/assetsASSETS Get all assets
MantleLib.TrackerApitrackerAssetsIssuePostPOST /tracker/assets/issueASSETS Issues new assets for a specific user
MantleLib.TrackerApitrackerAssetsPostPOST /tracker/assetsASSETS Creates an asset
MantleLib.TrackerApitrackerStatsGetGET /tracker/statsSTATS Get network stats
MantleLib.TrackerApitrackerTransactionsGetGET /tracker/transactionsTRANSACTIONS Get all transactions
MantleLib.TrackerApitrackerTransactionsReversePostPOST /tracker/transactions/reverseTRANSACTIONS Reverts a transaction
MantleLib.TrackerApitrackerTransactionsSelfGetGET /tracker/transactions/selfTRANSACTIONS Get all transactions of authenticated user
MantleLib.TrackerApitrackerWalletBalancesByAssetIdGetGET /tracker/wallet/balances/{assetId}WALLET Get all asset balances
MantleLib.TrackerApitrackerWalletBalancesGetGET /tracker/wallet/balancesWALLET Get all account balances
MantleLib.TrackerApitrackerWalletBatchesTransferPostPOST /tracker/wallet/batches/transferWALLET Creates a batch transfer
MantleLib.TrackerApitrackerWalletTransactionsByAssetIdGetGET /tracker/wallet/transactions/{assetId}WALLET Get all transactions by assetId
MantleLib.TrackerApitrackerWalletTransferPostPOST /tracker/wallet/transferWALLET Creates a transfer
MantleLib.UsersApiusersByUserIdGetGET /users/{userId}Get a user by userId
MantleLib.UsersApiusersByUserIdPutPUT /users/{userId}Updates a user by userId
MantleLib.UsersApiusersDisableByUserIdPutPUT /users/disable/{userId}Disables a user by userId
MantleLib.UsersApiusersEnableByUserIdPutPUT /users/enable/{userId}Enables a user by userId
MantleLib.UsersApiusersGetGET /usersGet all users
MantleLib.UsersApiusersSelfRolesGetGET /users/self/rolesGet all roles of authenticated user

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago