mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-06-19 01:03:53 +00:00
Enable market parameter for album_tracks (#516)
* enable market parameter for album_tracks * update album_tracks docstring, add CHANGELOG entry
This commit is contained in:
parent
ccc73b9d22
commit
d7ebc611b2
@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Added two new attributes: error and error_description to `SpotifyOauthError` exception class to show
|
||||
authorization/authentication web api errors details.
|
||||
- Allow extending `SpotifyClientCredentials` and `SpotifyOAuth`
|
||||
- Added the market paramter to `album_tracks`
|
||||
|
||||
### Deprecated
|
||||
|
||||
|
||||
@ -339,18 +339,20 @@ class Spotify(object):
|
||||
trid = self._get_id("album", album_id)
|
||||
return self._get("albums/" + trid)
|
||||
|
||||
def album_tracks(self, album_id, limit=50, offset=0):
|
||||
def album_tracks(self, album_id, limit=50, offset=0, market=None):
|
||||
""" Get Spotify catalog information about an album's tracks
|
||||
|
||||
Parameters:
|
||||
- album_id - the album ID, URI or URL
|
||||
- limit - the number of items to return
|
||||
- offset - the index of the first item to return
|
||||
- market - an ISO 3166-1 alpha-2 country code.
|
||||
|
||||
"""
|
||||
|
||||
trid = self._get_id("album", album_id)
|
||||
return self._get(
|
||||
"albums/" + trid + "/tracks/", limit=limit, offset=offset
|
||||
"albums/" + trid + "/tracks/", limit=limit, offset=offset, market=market
|
||||
)
|
||||
|
||||
def albums(self, albums):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user