<commit_before># node-readinglist-client

A Node.js client for mozilla/readinglist<commit_msg>Updating README with actual useful information<commit_after># node-readinglist-client

A Node.js client for mozilla/readinglist

## Usage:
```js
var Readinglist = require('./lib/readinglist');

var USER_PASS_AUTH = {
  user: process.env.USER,
  pass: process.env.PASS || ''
};

var rl = new Readinglist('https://readinglist.stage.mozaws.net/v1', USER_PASS_AUTH);

/* Get all articles (as promise): */
rl.getArticles({
  _limit: 3
}).then(console.log).catch(console.error);
```

If you want to use a callback syntax instead of the [superior] promise syntax, simply pass a callback function as the last argument with the standard `fn(err, data) {}` method signature:
```js
/* Get all articles (as callback): */
rl.getArticles({
  _limit: 3
}, function (err, data) {
  if (err) {
    return console.error(err);
  }
  console.log(data);
});
```


If you want to see verbose output, you can set `VERBOSE` mode by setting `VERBOSE=true` via the command line:
```sh
$ VERBOSE=true node index
```
{'fraction_non_alphanumeric': 0.1377079482439926, 'fraction_numerical': 0.0027726432532347504, 'mean_word_length': 4.553846153846154, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6658570', 'n_tokens_mistral': 366, 'n_tokens_neox': 346, 'n_words': 113}