mirror of
https://github.com/c0de-archive/spotipy.git
synced 2024-11-05 07:27:47 +00:00
Support changing details for a user playlist
This commit is contained in:
parent
1e8188206a
commit
1fae780adb
@ -378,6 +378,24 @@ class Spotify(object):
|
||||
data = {'name':name, 'public':public }
|
||||
return self._post("users/%s/playlists" % (user,), payload = data)
|
||||
|
||||
def user_playlist_change_details(
|
||||
self, user, playlist_id, name=None, public=None):
|
||||
''' Changes a playlist's name and/or public/private state
|
||||
|
||||
Parameters:
|
||||
- user - the id of the user
|
||||
- playlist_id - the id of the playlist
|
||||
- name - optional name of the playlist
|
||||
- public - optional is the playlist public
|
||||
'''
|
||||
data = {}
|
||||
if name is not None:
|
||||
data['name'] = name
|
||||
if public is not None:
|
||||
data['public'] = public
|
||||
return self._put("users/%s/playlists/%s" % (user, playlist_id),
|
||||
payload=data)
|
||||
|
||||
def user_playlist_add_tracks(self, user, playlist_id, tracks,
|
||||
position=None):
|
||||
''' Adds tracks to a playlist
|
||||
|
Loading…
Reference in New Issue
Block a user