From 1e05bdba67f8b7e8fcd4b419176a0048c329b1b7 Mon Sep 17 00:00:00 2001 From: JackDyre <83248599+JackDyre@users.noreply.github.com> Date: Sun, 30 Jun 2024 14:34:14 -0500 Subject: [PATCH] ID support for `current_user_unfollow_playlist()` (#1143) * ID support for `current_user_unfollow_playlist()` * turned double quotes into single quotes * Clarified changelog entry --- CHANGELOG.md | 1 + spotipy/client.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e602185..f9d46ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ Add your changes below. ### Fixed - Audiobook integration tests - Edited docstrings for certain functions in client.py for functions that are no longer in use and have been replaced. +- `current_user_unfollow_playlist()` now supports playlist IDs, URLs, and URIs rather than previously where it only supported playlist IDs. ### Removed - `mock` no longer listed as a test dependency. Only built-in `unittest.mock` is actually used. diff --git a/spotipy/client.py b/spotipy/client.py index caaf9ca..61924a5 100644 --- a/spotipy/client.py +++ b/spotipy/client.py @@ -1096,10 +1096,10 @@ class Spotify: user Parameters: - - name - the name of the playlist + - playlist_id - the id of the playlist """ return self._delete( - f"playlists/{playlist_id}/followers" + f"playlists/{self._get_id('playlist', playlist_id)}/followers" ) def playlist_add_items(