#1227 - Formatted code and updated changelog

This commit is contained in:
tonarec 2026-02-18 19:13:10 +01:00
parent 10294e18bc
commit eb7830f303
2 changed files with 11 additions and 6 deletions

View File

@ -10,8 +10,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Add your changes below. Add your changes below.
### Added ### Added
- Created generic methods to get user saved items
### Fixed ### Fixed
- Updated `/tracks` endpoints to `/items`
- Switching IDs to URIs to use `/me/library` endpoint
- Fixed playlist limit to 50 (according to API)
- Added warnings for deprecated methods
### Removed ### Removed

View File

@ -446,10 +446,10 @@ class Spotify:
""" """
warnings.warn( warnings.warn(
"You're using `artist_top_tracks(...)`, " "You're using `artist_top_tracks(...)`, "
"which is marked as deprecated by Spotify.", "which is marked as deprecated by Spotify.",
DeprecationWarning, DeprecationWarning,
) )
trid = self._get_id("artist", artist_id) trid = self._get_id("artist", artist_id)
return self._get("artists/" + trid + "/top-tracks", country=country) return self._get("artists/" + trid + "/top-tracks", country=country)
@ -1341,10 +1341,10 @@ class Spotify:
"current_user_follow_playlist(...) instead.", "current_user_follow_playlist(...) instead.",
DeprecationWarning, DeprecationWarning,
) )
endpoint = f"playlists/{playlist_id}/followers/contains?ids={','.join(user_ids)}" endpoint = f"playlists/{playlist_id}/followers/contains?ids={','.join(user_ids)}"
return self._get(endpoint) return self._get(endpoint)
def current_user_saved_items(self, uris): def current_user_saved_items(self, uris):
""" """
Check if the current user is following the given artists, users, or playlists Check if the current user is following the given artists, users, or playlists