API

Inheritance diagram of musify.libraries.remote.spotify.api.api

Mixin for all implementations of RemoteAPI for the Spotify API.

Also includes the default arguments to be used when requesting authorisation from the Spotify API.

Classes:

SpotifyAPI([client_id, client_secret, ...])

Collection of endpoints for the Spotify API.

class musify.libraries.remote.spotify.api.api.SpotifyAPI(client_id=None, client_secret=None, scope=(), cache=None, token_file_path=None)

Bases: SpotifyAPIMisc, SpotifyAPIItems, SpotifyAPIPlaylists

Collection of endpoints for the Spotify API.

Parameters:
  • client_id (str | None (default: None)) – The client ID to use when authorising requests.

  • client_secret (str | None (default: None)) – The client secret to use when authorising requests.

  • scope (GenericAlias[str] (default: ())) – The scopes to request access to.

  • cache (ResponseCache | None (default: None)) – When given, attempt to use this cache for certain request types before calling the API.

  • token_file_path (str | Path (default: None)) – Optionally, provide a path to save/load a response token.

Attributes:

user_id

ID of the currently authenticated user

user_name

Name of the currently authenticated user

property user_id: str | None

ID of the currently authenticated user

property user_name: str | None

Name of the currently authenticated user