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:
kenmacf authored and GitHub committed 2020-06-19 22:30:54 +01:00
1 parent ccc73b9d22
commit d7ebc611b2
2 files changed
+5 -2

No files matched your search

+4 -2
View File
@@ -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):