googleapis / googleapis/google-api-nodejs-client
[Feature request] Optional automatic get of nextPages.
- Lingua principale
- TypeScript
- Stelle
- 12.2k
- Fork
- 2k
- Merge medio
- 1g 9h
- PR unite (30g)
- 24
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia tracciando il punto di ingresso googleapis.drive.files.list() e il modo in cui i suoi valori nextPageToken e pageToken vengono attualmente esposti. Definisci il comportamento di un parametro opzionale per la paginazione automatica, incluso il modo in cui la risposta combinata viene passata al callback e cosa succede quando non rimane più alcun nextPageToken. Il lavoro è completato quando il comportamento è implementato in modo coerente e verificato per le richieste paginate e non paginate.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- nodejs, typescript
- Ambito
- api
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 30/100