doForAllWithNextPaging

inline fun <T> doForAllWithNextPaging(initialPagination: Pagination = FirstPagePagination(), block: (Pagination) -> PaginationResult<T>)(source)

Executes block for each page in a paginated sequence, automatically moving to the next page until an empty page or the last page is reached.

Parameters

initialPagination

The pagination to start with. Defaults to FirstPagePagination

block

Function that processes each page and returns a PaginationResult

Type Parameters

T

The type of items in each page