Update client.py

added available market on search and search now is also for artist by default
This commit is contained in:
eugenio412 2016-06-10 13:33:45 +02:00 committed by GitHub
parent b412de8d75
commit 0b9a0276c1
1 changed files with 2 additions and 2 deletions

View File

@ -310,7 +310,7 @@ class Spotify(object):
tlist = [self._get_id('album', a) for a in albums]
return self._get('albums/?ids=' + ','.join(tlist))
def search(self, q, limit=10, offset=0, type='track'):
def search(self, q, limit=10, offset=0, type='track,artist',market='US'):
''' searches for an item
Parameters:
@ -320,7 +320,7 @@ class Spotify(object):
- type - the type of item to return. One of 'artist', 'album',
'track' or 'playlist'
'''
return self._get('search', q=q, limit=limit, offset=offset, type=type)
return self._get('search', q=q, limit=limit, offset=offset, type=type,market=market)
def user(self, user):
''' Gets basic profile information about a Spotify User