Package blue.starry.penicillin.extensions.cursor

Functions

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
fun <M : PenicillinCursorModel<T>, T : Any> CursorJsonObjectApiAction<M, T>.untilLast(vararg options: Option): Flow<T>
fun <M : PenicillinCursorModel<T>, T : Any> CursorJsonObjectResponse<M, T>.untilLast(vararg options: Option): Flow<T>

Retrieves all the responses with current ApiAction.

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.

Properties

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

If true, next cursor exists.

Whether current search result has next.

val JsonObjectResponse<Search>.hasNext: Boolean

Whether if current search result has next page.

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

If true, previous cursor exists.

Link copied to clipboard

New ApiAction with next cursor.

val JsonObjectResponse<Search>.next: JsonObjectApiAction<Search>

Creates next page api action.

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
val JsonObjectResponse<Search>.refresh: JsonObjectApiAction<Search>

Creates refreshed page api action.

Link copied to clipboard
val JsonObjectResponse<Search>.refreshable: Boolean

Whether if current search result is refreshable.