diff --git a/CHANGELOG.md b/CHANGELOG.md index db15a87..5f035a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/spotipy/client.py b/spotipy/client.py index f39ab8c..ac72eb0 100644 --- a/spotipy/client.py +++ b/spotipy/client.py @@ -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):