getAllBy

inline fun <T, R> R.getAllBy(initialPagination: Pagination = FirstPagePagination(), paginationMapper: R.(PaginationResult<T>) -> Pagination?, block: R.(Pagination) -> PaginationResult<T>): List<T>(source)

Retrieves all items from a paginated source using a receiver context. This is useful when the pagination logic depends on the receiver object's state.

Return

A list containing all retrieved items from all pages

Parameters

initialPagination

The pagination to start with. Defaults to FirstPagePagination

paginationMapper

Function that determines the next pagination based on the current result

block

Function that retrieves a page of results for the given pagination using the receiver context

Type Parameters

T

The type of items being retrieved

R

The receiver type