/coins-ph-promise

Coins.ph API with Promises for Node.js

Primary LanguageJavaScriptMIT LicenseMIT

Coins.ph API for Node.js with Promises

The Coins.ph API Reference is a good resource to learn more about these APIs.

Installing in your Node project

$ npm install --save coins-ph-promise

Building

Be sure you have babel installed:

$ npm install -g babel-cli babel-preset-es2015

Then:

$npm run build

Example Usage

import Coins from "coins-ph-promise";

var coinsClient = new Coins({
    key: process.env.COINS_KEY,
    secret: process.env.COINS_SECRET
});

client.transactionHistory()
.then(function(data) {
    console.log(data);
})
.catch(function(err) {
    console.log(err);
});

client.payoutOutlets({ region: "PH" })
.then(function(data) {
    console.log(data);
})
.catch(function(err) {
    console.log(err);
});

License

[MIT][license] © [Scott Hasbrouck][http://scotthasbrouck.com]