The Page<T> type
Every list() method returns a Promise<Page<T>>. The Page<T> object has three properties:
Use links.next to detect when there are more pages and increment page manually.
Every resource exposes an iter() method (or iterDeadlines() for compliance) that returns an AsyncGenerator<T>. Pages are fetched lazily — only when the current batch is exhausted.
TypeScript infers the correct item type from the generator signature:
Early exit
Because iter() is a lazy AsyncGenerator, breaking out of the loop stops further fetches immediately.
Controlling page size
Pass perPage to iter() or list() to tune the number of items fetched per HTTP request. Valid range is 1–100; default is 20.
For large datasets, a higher perPage value reduces the number of HTTP round-trips. For interactive UIs where you want to display results quickly, a smaller perPage value returns the first items faster.
Collecting all results into an array
Collecting all results into memory with a helper like collectAll is convenient but be mindful of response size. For large resources such as requirements or articles across all frameworks, stream and process items one-by-one inside the for await loop instead.