ApiAction

interface ApiAction<R>

Represents lazy ApiRequest invoker.

Functions

Link copied to clipboard
abstract suspend fun execute(): R

Executes ApiAction and returns its result. This function is suspendable.

Properties

Link copied to clipboard
abstract val client: ApiClient

Current ApiClient instance.

Link copied to clipboard
abstract val request: ApiRequest

Current lazy ApiRequest instance.

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Extensions

Link copied to clipboard
fun <R : Any> ApiAction<R>.edit(block: ApiRequestBuilder.() -> Unit): ApiAction<R>

Modifies current ApiRequestBuilder with the block.

Link copied to clipboard
suspend fun <R : Any> ApiAction<R>.executeWithTimeout(timeout: Duration): R?

Awaits api execution and returns its result with timeout. This function is suspend-function.

Link copied to clipboard
val ApiAction<*>.session: Session

Shorthand extension to ApiClient.