AbstractPagingObject

abstract class AbstractPagingObject<T : Any, Z : AbstractPagingObject<T, Z>> : PagingObjectBase<T, Z> , List<T?>

The offset-based paging object is a container for a set of objects. It contains a key called items (whose value is an array of the requested objects) along with other keys like previous, next and limit that can be useful in future calls.

Constructors

AbstractPagingObject
Link copied to clipboard
common
fun AbstractPagingObject()

Functions

contains
Link copied to clipboard
common
open operator override fun contains(element: T?): Boolean
containsAll
Link copied to clipboard
common
open override fun containsAll(elements: Collection<T?>): Boolean
equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
flow
Link copied to clipboard
common
@FlowPreview()
@ExperimentalCoroutinesApi()
fun flow(context: CoroutineContext = Dispatchers.Default): Flow<T?>
Flow the Paging action.
flowBackward
Link copied to clipboard
common
fun flowBackward(): Flow<Z>
Flow from current page backwards.
flowEndOrdered
Link copied to clipboard
common
@ExperimentalCoroutinesApi()
fun flowEndOrdered(): Flow<Z>
flowForward
Link copied to clipboard
common
@ExperimentalCoroutinesApi()
fun flowForward(): Flow<Z>
Flow from current page forwards.
flowOrdered
Link copied to clipboard
common
@FlowPreview()
@ExperimentalCoroutinesApi()
fun flowOrdered(context: CoroutineContext = Dispatchers.Default): Flow<T?>
Flow the paging action ordered.
flowPagingObjects
Link copied to clipboard
common
@ExperimentalCoroutinesApi()
fun flowPagingObjects(context: CoroutineContext = Dispatchers.Default): Flow<Z>
Flow the paging objects.
flowPagingObjectsOrdered
Link copied to clipboard
common
@ExperimentalCoroutinesApi()
fun flowPagingObjectsOrdered(context: CoroutineContext = Dispatchers.Default): Flow<Z>
Flow the paging objects ordered.
flowStartOrdered
Link copied to clipboard
common
@ExperimentalCoroutinesApi()
fun flowStartOrdered(): Flow<Z>
get
Link copied to clipboard
common
open operator override fun get(index: Int): T?
getAllItems
Link copied to clipboard
common
open suspend override fun getAllItems(): List<T?>
Get all items of type T associated with the request
getAllItemsNotNull
Link copied to clipboard
common
suspend fun getAllItemsNotNull(): List<T>
Get all items of type T associated with the request.
getAllItemsNotNullRestAction
Link copied to clipboard
common
fun getAllItemsNotNullRestAction(): SpotifyRestAction<List<T>>
Get all items of type T associated with the request.
getAllItemsRestAction
Link copied to clipboard
common
fun getAllItemsRestAction(): SpotifyRestAction<List<T?>>
Retrieve all T associated with this rest action
getAllPagingObjects
Link copied to clipboard
common
open suspend override fun getAllPagingObjects(): List<Z>
Retrieve all PagingObjectBase associated with this rest action
getAllPagingObjectsRestAction
Link copied to clipboard
common
fun getAllPagingObjectsRestAction(): SpotifyRestAction<List<Z>>
Retrieve all PagingObjectBase associated with this rest action
getNext
Link copied to clipboard
common
suspend fun getNext(): Z?
getNextRestAction
Link copied to clipboard
common
fun getNextRestAction(): SpotifyRestAction<Z?>
getPrevious
Link copied to clipboard
common
suspend fun getPrevious(): Z?
getPreviousRestAction
Link copied to clipboard
common
fun getPreviousRestAction(): SpotifyRestAction<Z?>
getWithNext
Link copied to clipboard
common
suspend fun getWithNext(total: Int): List<Z>
Synchronously retrieve the next total paging objects associated with this AbstractPagingObject, including this AbstractPagingObject.
getWithNextItems
Link copied to clipboard
common
suspend fun getWithNextItems(total: Int): List<T?>
Retrieve the items associated with the next total paging objects associated with this rest action, including the current one.
getWithNextItemsRestAction
Link copied to clipboard
common
fun getWithNextItemsRestAction(total: Int): SpotifyRestAction<List<T?>>
Retrieve the items associated with the next total paging objects associated with this rest action, including the current one.
getWithNextTotalPagingObjects
Link copied to clipboard
common
open suspend override fun getWithNextTotalPagingObjects(total: Int): List<Z>
Synchronously retrieve the next total paging objects associated with this PagingObjectBase, including this PagingObjectBase.
getWithNextTotalPagingObjectsRestAction
Link copied to clipboard
common
fun getWithNextTotalPagingObjectsRestAction(total: Int): SpotifyRestAction<List<Z>>
Synchronously retrieve the next total paging objects associated with this PagingObjectBase, including this PagingObjectBase.
hashCode
Link copied to clipboard
common
open fun hashCode(): Int
indexOf
Link copied to clipboard
common
open override fun indexOf(element: T?): Int
isEmpty
Link copied to clipboard
common
open override fun isEmpty(): Boolean
iterator
Link copied to clipboard
common
abstract operator override fun iterator(): Iterator<T?>
lastIndexOf
Link copied to clipboard
common
open override fun lastIndexOf(element: T?): Int
listIterator
Link copied to clipboard
common
abstract fun listIterator(): ListIterator<T?>
abstract fun listIterator(index: Int): ListIterator<T?>
subList
Link copied to clipboard
common
abstract fun subList(fromIndex: Int, toIndex: Int): List<T?>
take
Link copied to clipboard
common
open suspend fun take(n: Int): List<T?>
Returns a list containing at most first n elements.
toString
Link copied to clipboard
common
open fun toString(): String

Properties

api
Link copied to clipboard
common
lateinit var api: GenericSpotifyApi
The API client associated with the request
href
Link copied to clipboard
common
abstract val href: String
A link to the Web API endpoint returning the full result of the request.
items
Link copied to clipboard
common
abstract val items: List<T?>
The requested data.
limit
Link copied to clipboard
common
abstract val limit: Int
The maximum number of items in the response (as set in the query or by default).
next
Link copied to clipboard
common
abstract val next: String?
URL to the next page of items.
offset
Link copied to clipboard
common
abstract val offset: Int
The offset of the items returned (as set in the query or by default).
previous
Link copied to clipboard
common
abstract val previous: String?
URL to the previous page of items.
size
Link copied to clipboard
common
open override val size: Int
total
Link copied to clipboard
common
abstract val total: Int
The maximum number of items available to return.

Inheritors

NullablePagingObject
Link copied to clipboard
PagingObject
Link copied to clipboard

Sources

(source)
Link copied to clipboard