npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mantle-lib

v1.0.5

Published

Most_endpoints_requires_authentication_You_must_first_authenticate_with_your_account_using_the_endpoint_authenticationlogin_which_will_return_an_authorization_token_You_must_then_use_this_token_in_all_your_requests_with_the_following_header__Authorization

Downloads

5

Readme

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

Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- MantleLib.AuthenticationApi | authenticationForgotpasswordConfirmationPost | POST /authentication/forgotpassword/confirmation | Forgot password code confirmation MantleLib.AuthenticationApi | authenticationForgotpasswordPost | POST /authentication/forgotpassword | Forgot password MantleLib.AuthenticationApi | authenticationLoginPost | POST /authentication/login | Login MantleLib.AuthenticationApi | authenticationLogoutPost | POST /authentication/logout | Logout MantleLib.AuthenticationApi | authenticationSignupConfirmationPost | POST /authentication/signup/confirmation | Sign up code confirmation MantleLib.AuthenticationApi | authenticationSignupPost | POST /authentication/signup | Sign up a user with an invitation MantleLib.BillingApi | billsGet | GET /bills | Get all bills MantleLib.InvitationsApi | invitationsByInvitationIdDelete | DELETE /invitations/{invitationId} | Deletes an invitation by invitationId MantleLib.InvitationsApi | invitationsByInvitationIdGet | GET /invitations/{invitationId} | Get an invitation by invitationId MantleLib.InvitationsApi | invitationsGet | GET /invitations | Get all invitations MantleLib.InvitationsApi | invitationsPost | POST /invitations | Creates an invitation MantleLib.KeeperApi | keeperFilesByFileIdDelete | DELETE /keeper/files/{fileId} | [FILES] Deletes a file by fileId MantleLib.KeeperApi | keeperFilesByFileIdGet | GET /keeper/files/{fileId} | [FILES] Get file by fileId MantleLib.KeeperApi | keeperFilesDiffLatestPost | POST /keeper/files/diff/latest | [FILES] Compares with latest version MantleLib.KeeperApi | keeperFilesDiffPost | POST /keeper/files/diff | [FILES] Compares a new file with the original file MantleLib.KeeperApi | keeperFilesExistPost | POST /keeper/files/exist | [FILES] Check if a file already exists MantleLib.KeeperApi | keeperFilesGet | GET /keeper/files | [FILES] Get all files MantleLib.KeeperApi | keeperFilesPost | POST /keeper/files | [FILES] Creates a file MantleLib.KeeperApi | keeperFoldersByFolderIdDelete | DELETE /keeper/folders/{folderId} | [FOLDERS] Delete a folder by folderId MantleLib.KeeperApi | keeperFoldersByFolderIdGet | GET /keeper/folders/{folderId} | [FOLDERS] Get a folder by folderId MantleLib.KeeperApi | keeperFoldersGet | GET /keeper/folders | [FOLDERS] Get all folders MantleLib.KeeperApi | keeperFoldersPost | POST /keeper/folders | [FOLDERS] Create a folder MantleLib.KeeperApi | keeperVersionsDiffPost | POST /keeper/versions/diff | [VERSIONS] Compares a new file with a specific version MantleLib.KeeperApi | keeperVersionsGet | GET /keeper/versions | [VERSIONS] Get all versions by fileId MantleLib.KeeperApi | keeperVersionsPost | POST /keeper/versions | [VERSIONS] Creates a version MantleLib.TrackerApi | trackerAssetsBatchesByAssetIdGet | GET /tracker/assets/batches/{assetId} | [ASSETS] Get all issue batch for an asset by id MantleLib.TrackerApi | trackerAssetsByAssetIdDelete | DELETE /tracker/assets/{assetId} | [ASSETS] Deletes an asset MantleLib.TrackerApi | trackerAssetsByAssetIdGet | GET /tracker/assets/{assetId} | [ASSETS] Get an asset by id MantleLib.TrackerApi | trackerAssetsByAssetIdPut | PUT /tracker/assets/{assetId} | [ASSETS] Updates an asset MantleLib.TrackerApi | trackerAssetsGet | GET /tracker/assets | [ASSETS] Get all assets MantleLib.TrackerApi | trackerAssetsIssuePost | POST /tracker/assets/issue | [ASSETS] Issues new assets for a specific user MantleLib.TrackerApi | trackerAssetsPost | POST /tracker/assets | [ASSETS] Creates an asset MantleLib.TrackerApi | trackerStatsGet | GET /tracker/stats | [STATS] Get network stats MantleLib.TrackerApi | trackerTransactionsGet | GET /tracker/transactions | [TRANSACTIONS] Get all transactions MantleLib.TrackerApi | trackerTransactionsReversePost | POST /tracker/transactions/reverse | [TRANSACTIONS] Reverts a transaction MantleLib.TrackerApi | trackerTransactionsSelfGet | GET /tracker/transactions/self | [TRANSACTIONS] Get all transactions of authenticated user MantleLib.TrackerApi | trackerWalletBalancesByAssetIdGet | GET /tracker/wallet/balances/{assetId} | [WALLET] Get all asset balances MantleLib.TrackerApi | trackerWalletBalancesGet | GET /tracker/wallet/balances | [WALLET] Get all account balances MantleLib.TrackerApi | trackerWalletBatchesTransferPost | POST /tracker/wallet/batches/transfer | [WALLET] Creates a batch transfer MantleLib.TrackerApi | trackerWalletTransactionsByAssetIdGet | GET /tracker/wallet/transactions/{assetId} | [WALLET] Get all transactions by assetId MantleLib.TrackerApi | trackerWalletTransferPost | POST /tracker/wallet/transfer | [WALLET] Creates a transfer MantleLib.UsersApi | usersByUserIdGet | GET /users/{userId} | Get a user by userId MantleLib.UsersApi | usersByUserIdPut | PUT /users/{userId} | Updates a user by userId MantleLib.UsersApi | usersDisableByUserIdPut | PUT /users/disable/{userId} | Disables a user by userId MantleLib.UsersApi | usersEnableByUserIdPut | PUT /users/enable/{userId} | Enables a user by userId MantleLib.UsersApi | usersGet | GET /users | Get all users MantleLib.UsersApi | usersSelfRolesGet | GET /users/self/roles | Get all roles of authenticated user

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.