Skip to content

tmcw/got-links

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

download multiple pages of results from a paged endpoint

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors