0.0.1 • Published 11 years ago
nanowrimo v0.0.1

Read and update NaNoWriMo status from Node.JS
Usage
Install
npm install nanowrimoNaNoWriMo API values
The API parameters, as found at http://nanowrimo.org/wordcount_api, can be passed in the object. Any parameters not passed will be assigned default (empty) values. Examples:
var nnwm = {
user: 'my_nnwm_username',
region: 'usa-california-east-bay',
secretKey: 'abc123',
wordCount: 123456
}Examples
Retrieving word count
var nnwm = require('nanowrimo');
var n = new nnwm({
user: 'my_nnwm_username'
});
n.getCount(function(err, count) {
if (err) {
console.log('error:', err);
} else {
console.log('count:', count);
}
});Available APIs
The following APIs are available, more info is available on the NaNoWriMo API page.
| API | Description |
|---|---|
| getCount() | Current individual word count |
| getCountHistory() | Individual word count history |
| getSiteCount() | Site word count |
| getSiteCountHistory() | Site word count history |
| getRegionCount() | Regional word count |
| getRegionCountHistory() | Regional word count history |
| updateCount() | Update individual word count |
0.0.1
11 years ago