json-requester
v0.2.0
Published
A wrapper library to interact with JSON APIs
Downloads
4
Readme
json-requester
A wrapper library to interact with JSON APIs
Install
$ npm install --save json-requester
Usage
var jsonRequester = require('json-requester');
var options = {
uri: 'http://isaacs.iriscouch.com/registry/_all_docs?include_docs=true&limit=10',
jsonStreamPath: 'rows.*.doc',
filter: ['name', 'license']
};
var req = jsonRequester(options, function(err, data) {
console.log(data);
// [ { name: '0', license: 'BSD-2-Clause' },
// { name: '007' },
// { name: '01' },
// { name: '012_trexmodule' },
// { name: '06_byvoidmodule' },
// { name: '0815' },
// { name: '0x21' },
// { name: '0x23' },
// { name: '1', license: 'MIT' },
// { name: '10', license: 'mit' }
// ]
});
License
Copyright (c) 2014 Stefan Buck. Licensed under the MIT license.