got-links
v1.0.4
Published
Get paged content with got
Downloads
6
Readme
got-links
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
- I wrote this library to support Unfollow everyone on GitHub, an app that does exactly that.