got-links

1.0.4 • Public • Published

got-links

CircleCI Greenkeeper badge

Download multiple pages of results from an API that supports the Link header.

example

var result = gotLinks({
  got: ghGot,
  url: 'search/repositories',
  options: {
    query: {
      q: 'happiness'
    },
    token: process.env.GITHUB_TOKEN
  },
  maxPages: 3,
  reducer(memo, response) {
    return memo.concat(response.body.items);
  }
});

Used in

Readme

Keywords

none

Package Sidebar

Install

npm i got-links

Weekly Downloads

2

Version

1.0.4

License

MIT

Unpacked Size

88.2 kB

Total Files

9

Last publish

Collaborators

  • tmcw