Update current_user_follow_playlist (#1040)

* Update current_user_follow_playlist

The API specifies a `public` parameter as seen [here](https://developer.spotify.com/documentation/web-api/reference/follow-playlist)

* Update CHANGELOG.md

---------

Co-authored-by: Stéphane Bruckert <stephane.bruckert@gmail.com>
This commit is contained in:
Nick 2024-05-30 21:43:10 +03:00 committed by GitHub
parent a810edf5da
commit 22e3b7406d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added extra installation step to TUTORIAL.md for required installation packages. - Added extra installation step to TUTORIAL.md for required installation packages.
- Added Troubleshooting Tips section to TUTORIAL.md to address common installation issues. - Added Troubleshooting Tips section to TUTORIAL.md to address common installation issues.
- Added link to Spotipy Tutorial for Beginners under Getting Started. - Added link to Spotipy Tutorial for Beginners under Getting Started.
- Added `update` field to `current_user_follow_playlist`.
### Changed ### Changed
- Changes the YouTube video link for authentication tutorial (the old video was in low definition, the new one is in high definition) - Changes the YouTube video link for authentication tutorial (the old video was in low definition, the new one is in high definition)

View File

@ -1200,7 +1200,7 @@ class Spotify:
f"playlists/{plid}/tracks", payload=payload f"playlists/{plid}/tracks", payload=payload
) )
def current_user_follow_playlist(self, playlist_id): def current_user_follow_playlist(self, playlist_id, public=True):
""" """
Add the current authenticated user as a follower of a playlist. Add the current authenticated user as a follower of a playlist.
@ -1209,7 +1209,8 @@ class Spotify:
""" """
return self._put( return self._put(
f"playlists/{playlist_id}/followers" f"playlists/{playlist_id}/followers",
payload={"public": public}
) )
def playlist_is_following( def playlist_is_following(