Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

json-requester

0.2.0 • Public • Published

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.

Keywords

none

install

npm i json-requester

Downloadsweekly downloads

7

version

0.2.0

license

MIT

repository

githubgithub

last publish

collaborators

  • avatar