From d1c16daa971ee1ce0bf87e3b7abca1f7c5831f5c Mon Sep 17 00:00:00 2001 From: BozeBro <62128128+BozeBro@users.noreply.github.com> Date: Mon, 27 Jul 2020 00:49:30 -0500 Subject: [PATCH] Added the parameter collaborative to user_playlist_create and "collaborative" key into data (#546) --- spotipy/client.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/spotipy/client.py b/spotipy/client.py index 0c5e3d8..c389eac 100644 --- a/spotipy/client.py +++ b/spotipy/client.py @@ -743,16 +743,22 @@ class Spotify(object): "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 Parameters: - user - the id of the user - name - the name of the playlist - public - is the created playlist public + - collaborative - is the created playlist collaborative - 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)