Skip to content

Commit 1e05bdb

Browse files
authored
ID support for current_user_unfollow_playlist() (#1143)
* ID support for `current_user_unfollow_playlist()` * turned double quotes into single quotes * Clarified changelog entry
1 parent 66ad716 commit 1e05bdb

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Add your changes below.
2020
### Fixed
2121
- Audiobook integration tests
2222
- Edited docstrings for certain functions in client.py for functions that are no longer in use and have been replaced.
23+
- `current_user_unfollow_playlist()` now supports playlist IDs, URLs, and URIs rather than previously where it only supported playlist IDs.
2324

2425
### Removed
2526
- `mock` no longer listed as a test dependency. Only built-in `unittest.mock` is actually used.

spotipy/client.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1096,10 +1096,10 @@ def current_user_unfollow_playlist(self, playlist_id):
10961096
user
10971097
10981098
Parameters:
1099-
- name - the name of the playlist
1099+
- playlist_id - the id of the playlist
11001100
"""
11011101
return self._delete(
1102-
f"playlists/{playlist_id}/followers"
1102+
f"playlists/{self._get_id('playlist', playlist_id)}/followers"
11031103
)
11041104

11051105
def playlist_add_items(

0 commit comments

Comments
 (0)