mirror of
https://github.com/c0de-archive/spotipy.git
synced 2025-01-07 23:22:49 +00:00
Support optional collaborative kwarg
This commit is contained in:
parent
7c5bfbdf86
commit
5ecfad1d3a
@ -383,7 +383,8 @@ class Spotify(object):
|
|||||||
return self._post("users/%s/playlists" % (user,), payload=data)
|
return self._post("users/%s/playlists" % (user,), payload=data)
|
||||||
|
|
||||||
def user_playlist_change_details(
|
def user_playlist_change_details(
|
||||||
self, user, playlist_id, name=None, public=None):
|
self, user, playlist_id, name=None, public=None,
|
||||||
|
collaborative=None):
|
||||||
''' Changes a playlist's name and/or public/private state
|
''' Changes a playlist's name and/or public/private state
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
@ -391,12 +392,15 @@ class Spotify(object):
|
|||||||
- playlist_id - the id of the playlist
|
- playlist_id - the id of the playlist
|
||||||
- name - optional name of the playlist
|
- name - optional name of the playlist
|
||||||
- public - optional is the playlist public
|
- public - optional is the playlist public
|
||||||
|
- collaborative - optional is the playlist collaborative
|
||||||
'''
|
'''
|
||||||
data = {}
|
data = {}
|
||||||
if name is not None:
|
if name is not None:
|
||||||
data['name'] = name
|
data['name'] = name
|
||||||
if public is not None:
|
if isinstance(public, bool):
|
||||||
data['public'] = public
|
data['public'] = public
|
||||||
|
if isinstance(collaborative, bool):
|
||||||
|
data['collaborative'] = collaborative
|
||||||
return self._put("users/%s/playlists/%s" % (user, playlist_id),
|
return self._put("users/%s/playlists/%s" % (user, playlist_id),
|
||||||
payload=data)
|
payload=data)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user