Spotify API Reference#
SpotifyClient#
- class lavapy.ext.spotify.SpotifyClient(clientID: str, clientSecret: str)#
Provides an interface for easily initialising and communicating with Spotify.
- Parameters
- async close() None #
This function is a coroutine.
Stops the sessions used for communicating with Spotify.
- property session: aiohttp.client.ClientSession#
Returns the session used for communicating with Spotify.
Playables#
DecodeQuery#
SpotifyBase#
- class lavapy.ext.spotify.SpotifyBase(*data: Any)#
Bases:
lavapy.tracks.Playable
A class which abstracts away a couple functions used for all Spotify resources.
SpotifyTrack#
- class lavapy.ext.spotify.SpotifyTrack(id: str, info: Dict[str, Any])#
Bases:
lavapy.tracks.Track
,lavapy.ext.spotify.tracks.SpotifyBase
A track created using a search to Spotify.
SpotifyPlaylist#
- class lavapy.ext.spotify.SpotifyPlaylist(name: str, tracks: List[lavapy.tracks.Track])#
Bases:
lavapy.tracks.MultiTrack
,lavapy.ext.spotify.tracks.SpotifyBase
A playlist created using a search to Spotify.
SpotifyAlbum#
- class lavapy.ext.spotify.SpotifyAlbum(name: str, tracks: List[lavapy.tracks.Track])#
Bases:
lavapy.tracks.MultiTrack
,lavapy.ext.spotify.tracks.SpotifyBase
An album created using a search to Spotify.
Exceptions#
- exception lavapy.ext.spotify.SpotifyAuthException#
Bases:
lavapy.exceptions.LavapyException
Exception raised when an error occurred while authorising with Spotify.