Fetches all pages of results for the given endpoint and parameters. This is a generator function that yields each page as it is fetched.
The endpoint to fetch.
The initial parameters to use for the endpoint.
Optional
The options to use when making requests.
The maximum number of pages to fetch.
An array of all results.
The next page of results.
const pages = fetchApiPagesGenerator(getV1badgesicons, { badgeIds: [1, 2, 3] });for await (const page of pages) { console.log(page.data);} Copy
const pages = fetchApiPagesGenerator(getV1badgesicons, { badgeIds: [1, 2, 3] });for await (const page of pages) { console.log(page.data);}
Fetches all pages of results for the given endpoint and parameters. This is a generator function that yields each page as it is fetched.