mirror of
https://github.com/c0de-archive/spotipy.git
synced 2024-11-04 23:17:48 +00:00
Merge pull request #5 from fsahin/master
Add country parameter to artist_albums
This commit is contained in:
commit
95e2d354e1
@ -124,12 +124,12 @@ class Spotify(object):
|
||||
tlist = [self._get_id('artist', a) for a in artists]
|
||||
return self.get('artists/?ids=' + ','.join(tlist))
|
||||
|
||||
def artist_albums(self, artist_id, album_type=None, limit=20, offset=0):
|
||||
def artist_albums(self, artist_id, album_type=None, country=None, limit=20, offset=0):
|
||||
''' Get Spotify catalog information about an artist’s albums
|
||||
'''
|
||||
|
||||
trid = self._get_id('artist', artist_id)
|
||||
return self.get('artists/' + trid + '/albums', album_type=album_type, limit=limit, offset=offset)
|
||||
return self.get('artists/' + trid + '/albums', album_type=album_type, country=country, limit=limit, offset=offset)
|
||||
|
||||
def artist_top_tracks(self, artist_id, country='US'):
|
||||
''' Get Spotify catalog information about an artist’s top 10 tracks by country.
|
||||
|
Loading…
Reference in New Issue
Block a user