node-rest-client icon indicating copy to clipboard operation
node-rest-client copied to clipboard

Pagination

Open ayyagari opened this issue 8 years ago • 0 comments

How to work with pagination?

I was trying to use node-rest-client with github api, and found that github api returns the link header in its response as: <https://github-enterprise/api/v3/repositories/12345/issues?per_page=30&page=2>; rel="next", <https://github-enterprise/api/v3/repositories/12346/issues?per_page=30&page=9>; rel="last" where page=9 is the last page (30 result per page are returned by default)

I would like to get all the issues (where node-rest-client manages fetching all the pages). How to do this with node-rest-client?

ayyagari avatar Oct 16 '17 21:10 ayyagari