Package com. adamratzman. spotify
Types
AuthorizationType
Link copied to clipboard
GenericSpotifyApi
Link copied to clipboard
ISpotifyApiBuilder
Link copied to clipboard
interface ISpotifyApiBuilder<T : SpotifyApi<T, B>, B : ISpotifyApiBuilder<T, B>>
Content copied to clipboard
ISpotifyAppApiBuilder
Link copied to clipboard
interface ISpotifyAppApiBuilder : ISpotifyApiBuilder<SpotifyAppApi, SpotifyAppApiBuilder>
Content copied to clipboard
ISpotifyClientApiBuilder
Link copied to clipboard
interface ISpotifyClientApiBuilder : ISpotifyApiBuilder<SpotifyClientApi, SpotifyClientApiBuilder>
Content copied to clipboard
Client interface exposing getAuthorizationUrl
SpotifyApi
Link copied to clipboard
sealed class SpotifyApi<T : SpotifyApi<T, B>, B : ISpotifyApiBuilder<T, B>>
Content copied to clipboard
Represents an instance of the Spotify API client, with common functionality and information between the SpotifyClientApi and SpotifyAppApi implementations of the API
SpotifyApiBuilder
Link copied to clipboard
class SpotifyApiBuilder(clientId: String?, clientSecret: String?, redirectUri: String?)
Content copied to clipboard
SpotifyApiOptions
Link copied to clipboard
data class SpotifyApiOptions(useCache: Boolean, cacheLimit: Int?, automaticRefresh: Boolean, retryWhenRateLimited: Boolean, enableLogger: Boolean, testTokenValidity: Boolean, defaultLimit: Int, allowBulkRequests: Boolean, requestTimeoutMillis: Long?, json: Json, refreshTokenProducer: suspend (GenericSpotifyApi) -> Token?, onTokenRefresh: suspend (GenericSpotifyApi) -> Unit?, requiredScopes: List<SpotifyScope>?, proxyBaseUrl: String?, retryOnInternalServerErrorTimes: Int?, enableDebugMode: Boolean, afterTokenRefresh: suspend (GenericSpotifyApi) -> Unit?)
Content copied to clipboard
SpotifyAppApi
Link copied to clipboard
SpotifyAppApiBuilder
Link copied to clipboard
class SpotifyAppApiBuilder(credentials: SpotifyCredentials, authorization: SpotifyUserAuthorization, options: SpotifyApiOptions) : ISpotifyAppApiBuilder
Content copied to clipboard
SpotifyAppApi builder for api creation using client authorization
SpotifyClientApi
Link copied to clipboard
open class SpotifyClientApi(clientId: String?, clientSecret: String?, redirectUri: String?, token: Token, usesPkceAuth: Boolean, enableDefaultTokenRefreshProducerIfNoneExists: Boolean, spotifyApiOptions: SpotifyApiOptions) : SpotifyApi<SpotifyClientApi, SpotifyClientApiBuilder>
Content copied to clipboard
An API instance created through client authentication, with access to private information managed through the scopes exposed in token
SpotifyClientApiBuilder
Link copied to clipboard
class SpotifyClientApiBuilder(credentials: SpotifyCredentials, authorization: SpotifyUserAuthorization, options: SpotifyApiOptions, usesPkceAuth: Boolean?) : ISpotifyClientApiBuilder
Content copied to clipboard
SpotifyClientApi builder for api creation using client authorization
SpotifyCredentials
Link copied to clipboard
SpotifyException
Link copied to clipboard
SpotifyImplicitGrantApi
Link copied to clipboard
class SpotifyImplicitGrantApi(clientId: String?, token: Token, spotifyApiOptions: SpotifyApiOptions) : SpotifyClientApi
Content copied to clipboard
An API instance created through implicit grant flow, with access to private information managed through the scopes exposed in token.
SpotifyScope
Link copied to clipboard
SpotifyUserAuthorization
Link copied to clipboard
Functions
getSpotifyAuthorizationUrl
Link copied to clipboard
fun getSpotifyAuthorizationUrl(vararg scopes: SpotifyScope, clientId: String, redirectUri: String, isImplicitGrantFlow: Boolean = false, shouldShowDialog: Boolean = false, state: String? = null): String
Content copied to clipboard
getSpotifyPkceAuthorizationUrl
Link copied to clipboard
fun getSpotifyPkceAuthorizationUrl(vararg scopes: SpotifyScope, clientId: String, redirectUri: String, codeChallenge: String, state: String? = null): String
Content copied to clipboard
getSpotifyPkceCodeChallenge
Link copied to clipboard
spotifyAppApi
Link copied to clipboard
fun spotifyAppApi(block: SpotifyAppApiBuilder.() -> Unit): SpotifyAppApiBuilder
Content copied to clipboard
fun spotifyAppApi(clientId: String, clientSecret: String): SpotifyAppApiBuilder
Content copied to clipboard
fun spotifyAppApi(clientId: String, clientSecret: String, block: SpotifyAppApiBuilder.() -> Unit = {}): SpotifyAppApiBuilder
Content copied to clipboard
Instantiate a new SpotifyAppApiBuilder using a Spotify clientId and clientSecret, with the ability to configure the api settings by providing a builder initialization blockUse case: I am using the client credentials flow.
fun spotifyAppApi(clientId: String?, clientSecret: String?, authorization: SpotifyUserAuthorization, block: SpotifyApiOptions.() -> Unit = {}): SpotifyAppApiBuilder
Content copied to clipboard
Instantiate a new SpotifyAppApiBuilder using a TokenUse case: I am using the client credentials flow.
fun spotifyAppApi(clientId: String?, clientSecret: String?, token: Token, block: SpotifyApiOptions.() -> Unit = {}): SpotifyAppApiBuilder
Content copied to clipboard
Instantiate a new SpotifyAppApiBuilder using a TokenUse case: I am using the client credentials flow.
spotifyClientApi
Link copied to clipboard
fun spotifyClientApi(block: SpotifyClientApiBuilder.() -> Unit): SpotifyClientApiBuilder
Content copied to clipboard
Instantiate a new SpotifyClientApiBuilder by providing a builder initialization blockNote: If trying to build SpotifyClientApi, you must provide client authorization in the SpotifyClientApiBuilder.authorization blockUse case: I am using the client authorization flow.
fun spotifyClientApi(clientId: String, clientSecret: String, redirectUri: String): SpotifyClientApiBuilder
Content copied to clipboard
fun spotifyClientApi(clientId: String, clientSecret: String, redirectUri: String, block: SpotifyClientApiBuilder.() -> Unit): SpotifyClientApiBuilder
Content copied to clipboard
Instantiate a new SpotifyClientApiBuilder using a Spotify clientId, clientSecret, and redirectUri, with the ability to configure the api settings by providing a builder initialization blockNote: If trying to build SpotifyClientApi, you must provide client authorization in the SpotifyClientApiBuilder.authorization blockUse case: I am using the client authorization flow.
fun spotifyClientApi(clientId: String?, clientSecret: String?, redirectUri: String?, authorization: SpotifyUserAuthorization, block: SpotifyApiOptions.() -> Unit = {}): SpotifyClientApiBuilder
Content copied to clipboard
Instantiate a new SpotifyClientApiBuilder using a Spotify clientId, clientSecret, and redirectUri, with an existing SpotifyUserAuthorization.
fun spotifyClientApi(clientId: String?, clientSecret: String?, redirectUri: String?, token: Token, block: SpotifyApiOptions.() -> Unit = {}): SpotifyClientApiBuilder
Content copied to clipboard
Instantiate a new SpotifyClientApiBuilder using a Spotify clientId, clientSecret, and redirectUri, with an existing SpotifyUserAuthorization.
spotifyClientPkceApi
Link copied to clipboard
fun spotifyClientPkceApi(clientId: String?, redirectUri: String?, authorization: SpotifyUserAuthorization, block: SpotifyApiOptions.() -> Unit = {}): SpotifyClientApiBuilder
Content copied to clipboard
Instantiate a new SpotifyClientApiBuilder.
fun spotifyClientPkceApi(clientId: String?, redirectUri: String?, token: Token, block: SpotifyApiOptions.() -> Unit = {}): SpotifyClientApiBuilder
Content copied to clipboard
Instantiate a new SpotifyClientApiBuilder.
fun spotifyClientPkceApi(clientId: String?, redirectUri: String?, authorizationCode: String, pkceCodeVerifier: String): SpotifyClientApiBuilder
Content copied to clipboard
Instantiate a new SpotifyClientApiBuilder.
fun spotifyClientPkceApi(clientId: String?, redirectUri: String?, authorizationCode: String, pkceCodeVerifier: String, block: SpotifyApiOptions.() -> Unit): SpotifyClientApiBuilder
Content copied to clipboard
Instantiate a new SpotifyClientApiBuilder.
spotifyImplicitGrantApi
Link copied to clipboard
fun spotifyImplicitGrantApi(clientId: String?, token: Token): SpotifyImplicitGrantApi
Content copied to clipboard
Instantiate a new SpotifyImplicitGrantApi using a Spotify clientId, and token retrieved from the implicit grant flow.
fun spotifyImplicitGrantApi(clientId: String?, token: Token, block: SpotifyApiOptions.() -> Unit): SpotifyImplicitGrantApi
Content copied to clipboard
Instantiate a new SpotifyImplicitGrantApi using a Spotify clientId, and token retrieved from the implicit grant flow.