OpenRoadCode
Public API reference for OpenRoadCode
Loading...
Searching...
No Matches
spotify.spotify_config Namespace Reference

Spotify OAuth and Web API configuration. More...

Classes

class  SpotifyConfig
 Spotify OAuth and API configuration. More...
 

Functions

Optional[SpotifyConfig] load_spotify_config_from_secrets (SecretManagerIf secret_manager, *str client_id_secret_name=SPOTIFY_CLIENT_ID_SECRET_NAME, str redirect_uri_secret_name=SPOTIFY_REDIRECT_URI_SECRET_NAME)
 Load Spotify configuration from a secret manager.
 

Detailed Description

Spotify OAuth and Web API configuration.

Function Documentation

◆ load_spotify_config_from_secrets()

Optional[SpotifyConfig] spotify.spotify_config.load_spotify_config_from_secrets ( SecretManagerIf  secret_manager,
*str   client_id_secret_name = SPOTIFY_CLIENT_ID_SECRET_NAME,
str   redirect_uri_secret_name = SPOTIFY_REDIRECT_URI_SECRET_NAME 
)

Load Spotify configuration from a secret manager.

Spotify uses OAuth PKCE, so no client secret is required.

Parameters
secret_managerSource of runtime secrets.
client_id_secret_nameSecret key containing the Spotify client ID.
redirect_uri_secret_nameOptional secret key overriding the callback.
Returns
Configured Spotify settings, or None when no client ID exists.