mirror of
https://github.com/c0de-archive/spotipy.git
synced 2025-01-07 23:22:49 +00:00
Merge pull request #62 from mattiamaestrini/search_market
Add 'market' parameter to the search endpoint
This commit is contained in:
commit
bfef299e43
@ -322,7 +322,7 @@ class Spotify(object):
|
|||||||
tlist = [self._get_id('album', a) for a in albums]
|
tlist = [self._get_id('album', a) for a in albums]
|
||||||
return self._get('albums/?ids=' + ','.join(tlist))
|
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', market=None):
|
||||||
''' searches for an item
|
''' searches for an item
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
@ -331,8 +331,9 @@ class Spotify(object):
|
|||||||
- offset - the index of the first item to return
|
- offset - the index of the first item to return
|
||||||
- type - the type of item to return. One of 'artist', 'album',
|
- type - the type of item to return. One of 'artist', 'album',
|
||||||
'track' or 'playlist'
|
'track' or 'playlist'
|
||||||
|
- market - An ISO 3166-1 alpha-2 country code or the string from_token.
|
||||||
'''
|
'''
|
||||||
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):
|
def user(self, user):
|
||||||
''' Gets basic profile information about a Spotify User
|
''' Gets basic profile information about a Spotify User
|
||||||
|
Loading…
Reference in New Issue
Block a user