Web API endpoints.
tekore
API summary | |
---|---|
client-album |
Album information |
client-artist |
Artist information |
client-audiobook |
Audiobook information |
client-browse |
Spotify featured catalogue |
client-chapter |
Chapter information |
client-episode |
Episode information |
client-follow |
Follow artists, playlists and users |
client-library |
Save (like) albums, shows and tracks |
client-markets |
Spotify market information |
client-personalisation |
User top listens |
client-player |
Playback operations |
client-playlist |
Playlist operations |
client-search |
Search functionality |
client-show |
Show information |
client-track |
Track information and analysis |
client-user |
User information |
Each method of the client corresponds to an API call, with some exceptions <client-non-endpoint>
. Further documentation on endpoints can be viewed in the Web API reference.
import tekore as tk
# Initialise the client
spotify = tk.Spotify(token)
# Call the API
album = spotify.album('3RBULTZJ97bvVzZLpxcB0j')
for track in album.tracks.items:
print(track.track_number, track.name)
Required and optional scopes to call any endpoint can be determined in code. Endpoints provide required_scope
and optional_scope
attributes which return a Scope
. A combination of the two is provided in scope
. They can be accessed via the class itself or its instances.
scope_cls = tk.Spotify.current_user_top_tracks.scope
scope_inst = tk.Spotify().current_user_top_tracks.scope
assert scope_cls == scope_inst
Spotify
Spotify.chunked Spotify.max_limits Spotify.token_as Spotify.follow_short_link is_short_link Spotify.send Spotify.close
Spotify.chunked
Spotify.max_limits
Spotify.token_as
Spotify.follow_short_link
is_short_link
Spotify.send
Spotify.close
Spotify.next Spotify.previous Spotify.all_items Spotify.all_pages
Spotify.next
Spotify.previous
Spotify.all_items
Spotify.all_pages
Spotify.album Spotify.album_tracks Spotify.albums
Spotify.album
Spotify.album_tracks
Spotify.albums
Spotify.artist Spotify.artist_albums Spotify.artist_related_artists Spotify.artist_top_tracks Spotify.artists
Spotify.artist
Spotify.artist_albums
Spotify.artist_related_artists
Spotify.artist_top_tracks
Spotify.artists
Spotify.audiobook Spotify.audiobook_chapters Spotify.audiobooks
Spotify.audiobook
Spotify.audiobook_chapters
Spotify.audiobooks
Spotify.categories Spotify.category Spotify.category_playlists Spotify.featured_playlists Spotify.new_releases Spotify.recommendation_genre_seeds Spotify.recommendations
Spotify.categories
Spotify.category
Spotify.category_playlists
Spotify.featured_playlists
Spotify.new_releases
Spotify.recommendation_genre_seeds
Spotify.recommendations
Spotify.chapter Spotify.chapters
Spotify.chapter
Spotify.chapters
Spotify.episode Spotify.episodes
Spotify.episode
Spotify.episodes
Spotify.artists_follow Spotify.artists_is_following Spotify.artists_unfollow Spotify.followed_artists Spotify.playlist_follow Spotify.playlist_is_following Spotify.playlist_unfollow Spotify.followed_playlists Spotify.users_follow Spotify.users_is_following Spotify.users_unfollow
Spotify.artists_follow
Spotify.artists_is_following
Spotify.artists_unfollow
Spotify.followed_artists
Spotify.playlist_follow
Spotify.playlist_is_following
Spotify.playlist_unfollow
Spotify.followed_playlists
Spotify.users_follow
Spotify.users_is_following
Spotify.users_unfollow
Spotify.saved_albums Spotify.saved_albums_add Spotify.saved_albums_contains Spotify.saved_albums_delete Spotify.saved_episodes Spotify.saved_episodes_add Spotify.saved_episodes_contains Spotify.saved_episodes_delete Spotify.saved_shows Spotify.saved_shows_add Spotify.saved_shows_contains Spotify.saved_shows_delete Spotify.saved_tracks Spotify.saved_tracks_add Spotify.saved_tracks_contains Spotify.saved_tracks_delete
Spotify.saved_albums
Spotify.saved_albums_add
Spotify.saved_albums_contains
Spotify.saved_albums_delete
Spotify.saved_episodes
Spotify.saved_episodes_add
Spotify.saved_episodes_contains
Spotify.saved_episodes_delete
Spotify.saved_shows
Spotify.saved_shows_add
Spotify.saved_shows_contains
Spotify.saved_shows_delete
Spotify.saved_tracks
Spotify.saved_tracks_add
Spotify.saved_tracks_contains
Spotify.saved_tracks_delete
Spotify.markets
Spotify.markets
Spotify.current_user_top_artists Spotify.current_user_top_tracks
Spotify.current_user_top_artists
Spotify.current_user_top_tracks
Spotify.playback Spotify.playback_currently_playing Spotify.playback_devices Spotify.playback_next Spotify.playback_pause Spotify.playback_previous Spotify.playback_queue Spotify.playback_queue_add Spotify.playback_recently_played Spotify.playback_repeat Spotify.playback_resume Spotify.playback_seek Spotify.playback_shuffle Spotify.playback_start_context Spotify.playback_start_tracks Spotify.playback_transfer Spotify.playback_volume
Spotify.playback
Spotify.playback_currently_playing
Spotify.playback_devices
Spotify.playback_next
Spotify.playback_pause
Spotify.playback_previous
Spotify.playback_queue
Spotify.playback_queue_add
Spotify.playback_recently_played
Spotify.playback_repeat
Spotify.playback_resume
Spotify.playback_seek
Spotify.playback_shuffle
Spotify.playback_start_context
Spotify.playback_start_tracks
Spotify.playback_transfer
Spotify.playback_volume
Spotify.playlist Spotify.playlists Spotify.playlist_create Spotify.playlist_change_details Spotify.playlist_cover_image Spotify.playlist_cover_image_upload Spotify.playlist_items Spotify.playlist_add Spotify.playlist_clear Spotify.playlist_remove Spotify.playlist_reorder Spotify.playlist_replace
See Spotify's guide on working with playlists <https://developer.spotify.com/ documentation/general/guides/working-with-playlists/> for additional information.
Spotify.playlist
Spotify.playlists
Spotify.playlist_create
Spotify.playlist_change_details
Spotify.playlist_cover_image
Spotify.playlist_cover_image_upload
Spotify.playlist_items
Spotify.playlist_add
Spotify.playlist_clear
Spotify.playlist_remove
Spotify.playlist_reorder
Spotify.playlist_replace
Spotify.search
Spotify.show Spotify.show_episodes Spotify.shows
Spotify.show
Spotify.show_episodes
Spotify.shows
Spotify.track Spotify.track_audio_analysis Spotify.track_audio_features Spotify.tracks Spotify.tracks_audio_features
Spotify.track
Spotify.track_audio_analysis
Spotify.track_audio_features
Spotify.tracks
Spotify.tracks_audio_features
Spotify.current_user Spotify.user
Spotify.current_user
Spotify.user