CursorJsonObjectApiAction

class CursorJsonObjectApiAction<M : PenicillinCursorModel<T>, T : Any>(    val client: ApiClient,     val request: ApiRequest,     val converter: (JsonObject) -> M) : AbstractFlow<T> , JsonRequest<M> , ApiAction<CursorJsonObjectResponse<M, T>>

The ApiAction that provides parsed json object with json model. This class supports cursor api operation.

Constructors

Link copied to clipboard
fun <M : PenicillinCursorModel<T>> CursorJsonObjectApiAction(    client: ApiClient,     request: ApiRequest,     converter: (JsonObject) -> M)

Functions

Link copied to clipboard
suspend override fun collect(collector: FlowCollector<T>)
Link copied to clipboard
open suspend override fun collectSafely(collector: FlowCollector<T>)
Link copied to clipboard
open suspend override fun execute(): CursorJsonObjectResponse<M, T>

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

Properties

Link copied to clipboard
open override val client: ApiClient

Current ApiClient instance.

Link copied to clipboard
open override val converter: (JsonObject) -> M

Json model converter.

Link copied to clipboard
open override val request: ApiRequest

Current lazy ApiRequest instance.

Extensions

Link copied to clipboard
fun <M : PenicillinCursorModel<T>, T : Any> CursorJsonObjectApiAction<M, T>.untilLast(vararg options: Option): Flow<T>

Retrieves all the responses with current ApiAction.