0.1.1 • Published 10 years ago
numbers-today v0.1.1
numbers-today
numbers.today API client library for node.js/io.js
Installation
This is a module for node.js and io.js and is installed via npm:
npm install numbers-today --saveGetting Started
var numbersToday = require('numbers-today');
// Counting
numbersToday('username', 'password')
    .button('blogposts')
	.hit();
numbersToday('token')
	.button('moneyspent')
	.hit(15.5, 'NY')
    .hits(function (hits) {
        console.log(hits);
    })
	.error(function (err) {
        // Handle any error here.
    });
// Support for other API features forthcoming.Contributing
To set up your development environment for numbers-today:
- Clone this repo to your desktop,
- in the shell cdto the main folder,
- hit npm install, and
- hit npm install gulp -gif you haven't installed gulp globally yet.
- Make a copy of credentials-sample.jsonwith the namecredentials.jsonand enter the following data:- Your username and password of your numbers.today account.
- Your API token which your find on the documentation page if you are logged in.
- Create a button called "signups" which is used by the tests.
 
- Run gulp dev. (Or runnode ./node_modules/.bin/gulp devif you don't want to install gulp globally.)
gulp dev watches all source files and if you save some changes it will lint the code and execute all tests. The test coverage report can be viewed from ./coverage/lcov-report/index.html.
If you want to debug a test you should use gulp test-without-coverage to run all tests without obscuring the code by the test coverage instrumentation.
Change History
- v0.1.1 (2015-05-09)- Improved error handling
 
- v0.1.0 (2015-05-09)- Initial version
 
License (ISC)
In case you never heard about the ISC license it is functionally equivalent to the MIT license.
See the LICENSE file for details.
