Skip to content

Commit

Permalink
ID support for current_user_unfollow_playlist() (#1143)
Browse files Browse the repository at this point in the history
* ID support for `current_user_unfollow_playlist()`

* turned double quotes into single quotes

* Clarified changelog entry
  • Loading branch information
JackDyre authored Jun 30, 2024
1 parent 66ad716 commit 1e05bdb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions spotipy/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1096,10 +1096,10 @@ def current_user_unfollow_playlist(self, playlist_id):
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(
Expand Down

0 comments on commit 1e05bdb

Please sign in to comment.