JsonArrayApiAction

class JsonArrayApiAction<M : PenicillinModel>(    val client: ApiClient,     val request: ApiRequest,     val converter: (JsonObject) -> M) : AbstractFlow<M> , JsonRequest<M> , ApiAction<JsonArrayResponse<M>>

The ApiAction that provides parsed json array with json model.

Constructors

Link copied to clipboard
fun <M : PenicillinModel> JsonArrayApiAction(    client: ApiClient,     request: ApiRequest,     converter: (JsonObject) -> M)

Functions

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

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 JsonArrayApiAction<Status>.untilLast(count: Int = 200, vararg options: Option): Flow<Status>

Retrieves all the statuses until last from current action. This operation is sequence.