Changes a playlist's name and/or public/private state, collaborative state, and/or description Parameters: - playlist_id - the id of the playlist - name - optional name of the playlist - public - optional is the playlist publi
(
self,
playlist_id,
name=None,
public=None,
collaborative=None,
description=None,
)
| 1156 | return self.playlist_is_following(playlist_id, user_ids) |
| 1157 | |
| 1158 | def playlist_change_details( |
| 1159 | self, |
| 1160 | playlist_id, |
| 1161 | name=None, |
| 1162 | public=None, |
| 1163 | collaborative=None, |
| 1164 | description=None, |
| 1165 | ): |
| 1166 | """ Changes a playlist's name and/or public/private state, |
| 1167 | collaborative state, and/or description |
| 1168 | |
| 1169 | Parameters: |
| 1170 | - playlist_id - the id of the playlist |
| 1171 | - name - optional name of the playlist |
| 1172 | - public - optional is the playlist public |
| 1173 | - collaborative - optional is the playlist collaborative |
| 1174 | - description - optional description of the playlist |
| 1175 | """ |
| 1176 | |
| 1177 | data = {} |
| 1178 | if isinstance(name, str): |
| 1179 | data["name"] = name |
| 1180 | if isinstance(public, bool): |
| 1181 | data["public"] = public |
| 1182 | if isinstance(collaborative, bool): |
| 1183 | data["collaborative"] = collaborative |
| 1184 | if isinstance(description, str): |
| 1185 | data["description"] = description |
| 1186 | return self._put( |
| 1187 | f"playlists/{self._get_id('playlist', playlist_id)}", payload=data |
| 1188 | ) |
| 1189 | |
| 1190 | def current_user_unfollow_playlist(self, playlist_id): |
| 1191 | """ Unfollows (deletes) a playlist for the current authenticated |