collect All Items By Cursor
Fetches subsequent pages using a cursor (after token) rather than a next URL, and flattens all items into a single list until the cursor runs out or maxPages is reached.
Return
The API response including status code and parsed Spotify payload; on the first error response, that error is returned as-is instead of the collected items.
Parameters
The already-fetched first page response.
Extracts the next cursor (after token) from a page payload.
Extracts the list of items from a page payload.
Fetches the next page for the given cursor.
Maximum number of pages to fetch, including the first page.
Throws
if maxPages is less than 1.
Fetches subsequent pages starting from an already-retrieved first CursorPaging page using the cursor after token, and flattens all items into a single list until the cursor runs out or maxPages is reached.
Return
The API response including status code and parsed Spotify payload; on the first error response, that error is returned as-is instead of the collected items.
Parameters
The already-fetched first page response.
Fetches the next page for the given cursor.
Maximum number of pages to fetch, including the first page.
Throws
if maxPages is less than 1.