PagingObjectBase

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
@Transient
lateinit var api: GenericSpotifyApi

The API client associated with the request

Link copied to clipboard
abstract val href: String

A link to the Web API endpoint returning the full result of the request.

Link copied to clipboard
abstract val items: List<T?>

The requested data.

Link copied to clipboard
abstract val limit: Int

The maximum number of items in the response (as set in the query or by default).

Link copied to clipboard
abstract val next: String?

URL to the next page of items. ( null if none)

Link copied to clipboard
abstract val offset: Int

The offset of the items returned (as set in the query or by default).

Link copied to clipboard
abstract val previous: String?

URL to the previous page of items. ( null if none)

Link copied to clipboard
open override val size: Int
Link copied to clipboard
abstract val total: Int

The maximum number of items available to return.

Functions

Link copied to clipboard
open operator override fun contains(element: T?): Boolean
Link copied to clipboard
open override fun containsAll(elements: Collection<T?>): Boolean
Link copied to clipboard
@FlowPreview
@ExperimentalCoroutinesApi
fun flow(context: CoroutineContext = Dispatchers.Default): Flow<T?>

Flow the Paging action.

Link copied to clipboard
fun flowBackward(): Flow<Z>

Flow from current page backwards.

Link copied to clipboard
@ExperimentalCoroutinesApi
fun flowEndOrdered(): Flow<Z>
Link copied to clipboard
@ExperimentalCoroutinesApi
fun flowForward(): Flow<Z>

Flow from current page forwards.

Link copied to clipboard
@FlowPreview
@ExperimentalCoroutinesApi
fun flowOrdered(context: CoroutineContext = Dispatchers.Default): Flow<T?>

Flow the paging action ordered. This can be less performant than flow if you are in the middle of the pages.

Link copied to clipboard
@ExperimentalCoroutinesApi
fun flowPagingObjects(context: CoroutineContext = Dispatchers.Default): Flow<Z>

Flow the paging objects.

Link copied to clipboard
@ExperimentalCoroutinesApi
fun flowPagingObjectsOrdered(context: CoroutineContext = Dispatchers.Default): Flow<Z>

Flow the paging objects ordered. This can be less performant than flowPagingObjects if you are in the middle of the pages.

Link copied to clipboard
@ExperimentalCoroutinesApi
fun flowStartOrdered(): Flow<Z>
Link copied to clipboard
open operator override fun get(index: Int): T?
Link copied to clipboard
abstract suspend fun getAllItems(): List<T?>

Retrieve all T associated with this rest action

Link copied to clipboard
suspend fun getAllItemsNotNull(): List<T>

Get all items of type T associated with the request. Filters out null objects.

Link copied to clipboard

Get all items of type T associated with the request. Filters out null objects.

Link copied to clipboard

Retrieve all T associated with this rest action

Link copied to clipboard
abstract suspend fun getAllPagingObjects(): List<Z>

Retrieve all PagingObjectBase associated with this rest action

Link copied to clipboard

Retrieve all PagingObjectBase associated with this rest action

Link copied to clipboard
suspend fun getNext(): Z?
Link copied to clipboard
Link copied to clipboard
suspend fun getPrevious(): Z?
Link copied to clipboard
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.

Link copied to clipboard

Retrieve the items associated with the next total paging objects associated with this rest action, including the current one.

Link copied to clipboard
abstract suspend fun getWithNextTotalPagingObjects(total: Int): List<Z>

Synchronously retrieve the next total paging objects associated with this PagingObjectBase, including this PagingObjectBase.

Link copied to clipboard

Synchronously retrieve the next total paging objects associated with this PagingObjectBase, including this PagingObjectBase.

Link copied to clipboard
open override fun indexOf(element: T?): Int
Link copied to clipboard
open override fun isEmpty(): Boolean
Link copied to clipboard
abstract operator override fun iterator(): Iterator<T?>
Link copied to clipboard
open override fun lastIndexOf(element: T?): Int
Link copied to clipboard
abstract fun listIterator(): ListIterator<T?>
abstract fun listIterator(index: Int): ListIterator<T?>
Link copied to clipboard
abstract fun subList(fromIndex: Int, toIndex: Int): List<T?>
Link copied to clipboard
open suspend fun take(n: Int): List<T?>

Returns a list containing at most first n elements. Note that additional requests may be performed. The limit used in the request used to produce this PagingObjectBase will be respected, so choose limit carefully.