mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-06-19 01:03:53 +00:00
Added the parameter collaborative to user_playlist_create and "collaborative" key into data (#546)
This commit is contained in:
parent
f136442c2d
commit
d1c16daa97
@ -743,16 +743,22 @@ class Spotify(object):
|
|||||||
"users/%s/playlists" % user, limit=limit, offset=offset
|
"users/%s/playlists" % user, limit=limit, offset=offset
|
||||||
)
|
)
|
||||||
|
|
||||||
def user_playlist_create(self, user, name, public=True, description=""):
|
def user_playlist_create(self, user, name, public=True, collaborative=False, description=""):
|
||||||
""" Creates a playlist for a user
|
""" Creates a playlist for a user
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
- user - the id of the user
|
- user - the id of the user
|
||||||
- name - the name of the playlist
|
- name - the name of the playlist
|
||||||
- public - is the created playlist public
|
- public - is the created playlist public
|
||||||
|
- collaborative - is the created playlist collaborative
|
||||||
- description - the description of the playlist
|
- description - the description of the playlist
|
||||||
"""
|
"""
|
||||||
data = {"name": name, "public": public, "description": description}
|
data = {
|
||||||
|
"name": name,
|
||||||
|
"public": public,
|
||||||
|
"collaborative": collaborative,
|
||||||
|
"description": description
|
||||||
|
}
|
||||||
|
|
||||||
return self._post("users/%s/playlists" % (user,), payload=data)
|
return self._post("users/%s/playlists" % (user,), payload=data)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user