PagingHelpers

Functions

Link copied to clipboard
suspend fun <TPage, TItem> collectAllItems(firstPageResponse: SpotifyApiResponse<TPage>, nextUrlSelector: (TPage) -> String?, itemsSelector: (TPage) -> List<TItem>, fetchNextPage: suspend (PagingOptions) -> SpotifyApiResponse<TPage>, maxPages: Int = 1000): SpotifyApiResponse<List<TItem>>
suspend fun <TPage, TItem> collectAllItems(initialPagingOptions: PagingOptions = PagingOptions(), fetchFirstPage: suspend (PagingOptions) -> SpotifyApiResponse<TPage>, nextUrlSelector: (TPage) -> String?, itemsSelector: (TPage) -> List<TItem>, fetchNextPage: suspend (PagingOptions) -> SpotifyApiResponse<TPage>, maxPages: Int = 1000): SpotifyApiResponse<List<TItem>>

Executes collectAllItems.

Link copied to clipboard

Executes nextPagingOptions.