SpotifyClientApiBuilder

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

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

Link copied to clipboard
constructor(credentials: SpotifyCredentials = SpotifyCredentials(), authorization: SpotifyUserAuthorization = SpotifyUserAuthorization(), options: SpotifyApiOptions = SpotifyApiOptions(), usesPkceAuth: Boolean? = null)

Properties

Link copied to clipboard

Allows you to authenticate a SpotifyClientApi with an authorization code or build SpotifyApi using a refresh token

Link copied to clipboard
open override var credentials: SpotifyCredentials

A block in which Spotify application credentials (accessible via the Spotify dashboard) should be put

Link copied to clipboard
open override var options: SpotifyApiOptions

Allows you to override default values for caching, token refresh, and logging

Link copied to clipboard

Functions

Link copied to clipboard

Allows you to authenticate a SpotifyClientApi with an authorization code or build SpotifyApi using a refresh token

Link copied to clipboard

Allows you to authenticate a SpotifyClientApi with an authorization code or build SpotifyApi using a refresh token

Link copied to clipboard
open suspend override fun build(enableDefaultTokenRefreshProducerIfNoneExists: Boolean): SpotifyClientApi

Build the T by provided information

Link copied to clipboard
open fun buildRestAction(enableDefaultTokenRefreshProducerIfNoneExists: Boolean = true): SpotifyRestAction<SpotifyClientApi>

Build the T by provided information

Link copied to clipboard

A block in which Spotify application credentials (accessible via the Spotify dashboard) should be put

Link copied to clipboard
open override fun getAuthorizationUrl(vararg scopes: SpotifyScope, state: String?): String

Create a Spotify authorization URL from which API access can be obtained

Link copied to clipboard

Allows you to override default values for caching, token refresh, and logging