From 976b0d07e415303dabb06a55bd439c37aefdf60f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20Lindman=20H=C3=B6rnlund?= Date: Tue, 18 Oct 2016 17:51:08 +0200 Subject: [PATCH] Add market parameter to tracks() call --- spotipy/client.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spotipy/client.py b/spotipy/client.py index c3b4b69..a2f1880 100644 --- a/spotipy/client.py +++ b/spotipy/client.py @@ -208,15 +208,16 @@ class Spotify(object): trid = self._get_id('track', track_id) return self._get('tracks/' + trid) - def tracks(self, tracks): + def tracks(self, tracks, market = None): ''' returns a list of tracks given a list of track IDs, URIs, or URLs Parameters: - tracks - a list of spotify URIs, URLs or IDs + - market - an ISO 3166-1 alpha-2 country code. ''' tlist = [self._get_id('track', t) for t in tracks] - return self._get('tracks/?ids=' + ','.join(tlist)) + return self._get('tracks/?ids=' + ','.join(tlist), market = market) def artist(self, artist_id): ''' returns a single artist given the artist's ID, URI or URL