CursorJsonObjectResponse

data class CursorJsonObjectResponse<M : PenicillinCursorModel<T>, T : Any>(    val client: ApiClient,     val result: M,     val request: HttpRequest,     val response: HttpResponse,     val content: String,     val action: ApiAction<CursorJsonObjectResponse<M, T>>) : ApiResponse<CursorJsonObjectResponse<M, T>> , JsonResponse<M, JsonObject> , CompletedResponse

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

Constructors

Link copied to clipboard
fun <M : PenicillinCursorModel<T>, T : Any> CursorJsonObjectResponse(    client: ApiClient,     result: M,     request: HttpRequest,     response: HttpResponse,     content: String,     action: ApiAction<CursorJsonObjectResponse<M, T>>)

Properties

Link copied to clipboard
open override val action: ApiAction<CursorJsonObjectResponse<M, T>>

Executed ApiAction instance.

Link copied to clipboard
open override val client: ApiClient

Current ApiClient instance.

Link copied to clipboard
open override val content: String

Text response.

Link copied to clipboard
open override val json: JsonObject

Json element.

Link copied to clipboard
open override val request: HttpRequest

Http request object.

Link copied to clipboard
open override val response: HttpResponse

Http response object.

Link copied to clipboard
val result: M

Result of response.

Extensions

Link copied to clipboard
fun <M : PenicillinCursorModel<T>, T : Any> CursorJsonObjectResponse<M, T>.byCursor(cursor: Long, vararg options: Option): CursorJsonObjectApiAction<M, T>

New ApiAction with specified cursor.

Link copied to clipboard
val CursorJsonObjectResponse<*, *>.hasNext: Boolean

If true, next cursor exists.

Link copied to clipboard
val CursorJsonObjectResponse<*, *>.hasPrevious: Boolean

If true, previous cursor exists.

Link copied to clipboard

New ApiAction with next cursor.

Link copied to clipboard
val CursorJsonObjectResponse<*, *>.nextCursor: Long

Next cursor value.

Link copied to clipboard

New ApiAction with previous cursor.

Link copied to clipboard
val CursorJsonObjectResponse<*, *>.previousCursor: Long

Previous cursor value.

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

Retrieves all the responses with current ApiAction.