Package-level declarations

Types

Link copied to clipboard
@Serializable
data class CopyrightObject(val text: String? = null, val type: String? = null)
Link copied to clipboard
@Serializable
data class CursorPaging<T>(val href: String, val limit: Int, val next: String? = null, val cursors: Cursors? = null, val total: Int? = null, val items: List<T>)

Generic Spotify cursor-based paging object.

Link copied to clipboard
@Serializable
data class Cursors(val after: String? = null, val before: String? = null)
Link copied to clipboard
@Serializable
data class ExternalIds(val isrc: String? = null, val ean: String? = null, val upc: String? = null)
Link copied to clipboard
@Serializable
data class ExternalUrls(val spotify: String? = null)
Link copied to clipboard
@Serializable
data class ImageObject(val url: String, val height: Int?, val width: Int?)
Link copied to clipboard
@Serializable
data class Paging<T>(val href: String, val limit: Int, val next: String? = null, val offset: Int, val previous: String? = null, val total: Int, val items: List<T>)

Generic Spotify offset-based paging object.

Link copied to clipboard

Reason why a Spotify resource is restricted.

Link copied to clipboard
@Serializable
data class Restrictions(val reason: RestrictionReason? = null)
Link copied to clipboard
@Serializable
data class SnapshotIdResponse(val snapshotId: String)
Link copied to clipboard
class SpotifyApiException(val statusCode: Int, message: String)

Exception thrown by SpotifyResult.getOrThrow when a SpotifyResult carries a failure.

Link copied to clipboard
@Serializable
data class SpotifyError(val status: Int, val message: String)
Link copied to clipboard
@Serializable
data class SpotifyErrorResponse(val error: SpotifyError)
Link copied to clipboard
sealed interface SpotifyFailure
Link copied to clipboard
sealed interface SpotifyResult<out T>

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
inline fun <T, R> SpotifyResult<T>.fold(onSuccess: (T) -> R, onFailure: (SpotifyFailure) -> R): R
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> SpotifyResult<T>.onSuccess(block: (T) -> Unit): SpotifyResult<T>