send
Paginated
Request
fun <T> sendPaginatedRequest(request: AmetistaRequester.() -> <Error class: unknown class>, supplier: (<Error class: unknown class>) -> T, onSuccess: (<Error class: unknown class><T>) -> Unit, onFailure: (<Error class: unknown class>) -> Unit, onConnectionError: (<Error class: unknown class>) -> Unit? = null)
Method to execute and manage the paginated response of a request
Parameters
request
The request to execute
supplier
The supplier function to instantiate a T item
on Success
The action to execute if the request has been successful
on Failure
The action to execute if the request has been failed
on Connection Error
The action to execute if the request has been failed for a connection error
T
generic type of the items in the page response