GIN Platform API Node.js SDK
Usage
The package is available in the npm registry:
npm install gin-platform-node-sdk --save
ES6 module system usage:
const sdk = const apiKey = '...secret...'const client = sdk await clientblockchains //get blockchains listawait clientblockchains //get the gincoin blockchain await clientnodes //get all my nodesawait clientnodes //get all my nodesawait clientnodes //create a nodeawait clientnodes //update a nodeawait clientnodes //delete a node await clientuser //get current user's detailsawait clientuser //get current user's billing transactions
ES5 module system usage:
const Sdk = Sdk;const sdk = ;
Developement
Requirements:
- Node.js >= 8
- Babel
- Mocha
npm install -g mocha babel-cli
Installation:
git clone https://github.com/GIN-Platform/Node-SDK.gitcd Node-SDKnpm installnpm test
Build NPM package:
npm run build #the distribution should be produced in the /dist directory npm run distrib #will upload the contents of /dist to the npm registry