node package manager
Loosely couple your services. Use Orgs to version and reuse your code. Create a free org »

json-requester

json-requester

NPM version Build Status Dependency Status Coverage Status

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.