Bitrefill NodeJS client
A NodeJS client for the Bitrefill API. Bitrefill lets you pay phone bills in 127 countries.
Website
Documentation
http://docs.bitrefill.apiary.io/#
Install
$ npm install bitrefill
Test
The tests are run using mocha, and expect active API keys to be present in a file named cfg.json. This cfg.json file should be one level above the test directory. Usage:
Currently all tests pass most of the time, but sometimes there are timeouts. Last results:
$ mocha -t 5000 bitrefill ✓ get inventory ✓ look up a Digicel Panama number ✓ Get a quote
Configuration
To configure, pass options to the Bitrefill function formatted like shown in example_cfg.json. Note that it should not actually be json encoded. Example:
Bitrefill = require(bitrefill);
cfg = {"key":"", "secret":"", "url": "api.bitrefill.com/v1/"};
bitrefill = Bitrefill(cfg);