googleapis / googleapis/google-api-nodejs-client
[Feature request] Optional automatic get of nextPages.
- Dominant language
- TypeScript
- Stars
- 12.2k
- Forks
- 2k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 24
Description
Hello,
**Is your feature request related to a problem? Please describe.**
It is pretty common to fetch a large amount of resources and often pagination has to be implemented - checking if a nextPageToken is returned and asking for the rest of the response using the pageToken parameter. This has to be implemented quite often.
**Describe the solution you'd like**
It would be very useful, if you could pass a boolean parameter to the function (e.g. `googleapis.drive.files.list()`) that would cause the function to automatically repeat the request until no nextPageToken is returned and then call the callback function with the entire response in one variable. In other words, make something, that will do the nextPageToken nonsense for me, instead of having to implement it every time.
**Additional context**
It is not easy to wrap your head around the concept if you're working with such a system for the first time, I this issue: #1786, posted just a few days ago, while I was looking if this suggestion already hasn't been made.
Hope this helps,
Thanks,
GS
Contributor guide
Assessment
This issue has not been assessed yet.