SpotifyClientApiBuilder

class SpotifyClientApiBuilder(credentials: SpotifyCredentials, authorization: SpotifyUserAuthorization, options: SpotifyApiOptions, usesPkceAuth: Boolean?) : ISpotifyClientApiBuilder

SpotifyClientApi builder for api creation using client authorization

Parameters

usesPkceAuth

Set this if PKCE authorization is used to build this API. Note: this is not required to be true if SpotifyUserAuthorization.pkceCodeVerifier (options.pkceCodeVerifier) is set. If options.pkceCodeVerifier, this builder will always build a Spotify client api with PKCE auth.

Constructors

SpotifyClientApiBuilder
Link copied to clipboard
common
fun SpotifyClientApiBuilder(credentials: SpotifyCredentials = SpotifyCredentials(), authorization: SpotifyUserAuthorization = SpotifyUserAuthorization(), options: SpotifyApiOptions = SpotifyApiOptions(), usesPkceAuth: Boolean? = null)
Set this if PKCE authorization is used to build this API.

Functions

authentication
Link copied to clipboard
common
Allows you to authenticate a SpotifyClientApi with an authorization code or build SpotifyApi using a refresh token
authorization
Link copied to clipboard
common
Allows you to authenticate a SpotifyClientApi with an authorization code or build SpotifyApi using a refresh token
build
Link copied to clipboard
common
open suspend override fun build(enableDefaultTokenRefreshProducerIfNoneExists: Boolean): SpotifyClientApi
Build the T by provided information
buildRestAction
Link copied to clipboard
common
open fun buildRestAction(enableDefaultTokenRefreshProducerIfNoneExists: Boolean = true): SpotifyRestAction<SpotifyClientApi>
Build the T by provided information
credentials
Link copied to clipboard
common
A block in which Spotify application credentials (accessible via the Spotify dashboard) should be put
equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
getAuthorizationUrl
Link copied to clipboard
common
open override fun getAuthorizationUrl(vararg scopes: SpotifyScope, state: String?): String
Create a Spotify authorization URL from which API access can be obtained
hashCode
Link copied to clipboard
common
open fun hashCode(): Int
options
Link copied to clipboard
common
Allows you to override default values for caching, token refresh, and logging
open fun options(block: SpotifyApiOptions.() -> Unit): ISpotifyApiBuilder<SpotifyClientApi, SpotifyClientApiBuilder>
Allows you to override default values for caching, token refresh, and logging
toString
Link copied to clipboard
common
open fun toString(): String

Properties

authorization
Link copied to clipboard
common
open override var authorization: SpotifyUserAuthorization
Allows you to authenticate a SpotifyClientApi with an authorization code or build SpotifyApi using a refresh token
credentials
Link copied to clipboard
common
open override var credentials: SpotifyCredentials
A block in which Spotify application credentials (accessible via the Spotify dashboard) should be put
options
Link copied to clipboard
common
open override var options: SpotifyApiOptions
Allows you to override default values for caching, token refresh, and logging
usesPkceAuth
Link copied to clipboard
common
var usesPkceAuth: Boolean? = null
Set this if PKCE authorization is used to build this API.

Sources

(source)
Link copied to clipboard