The type of data contained in a page
Function to fetch individual pages
This is an async generator wrapper around forEachPage, providing a more functional approach to page iteration. Pages may be yielded out-of-order relative to their indices due to parallel fetching.
Like forEachPage, this function fetches all pages in parallel with no concurrency limit. Consider rate-limiting the fetcher function.
for await (const { page, index } of fetchPages(fetcher)) {
console.log(`Page ${index}:`, page);
}
forEachPage for a callback-based alternative
Fetches pages as an async generator, yielding each non-null page with its index.