Hi all, I am trying to work on some safeguards for api calls where the number of IDs that are requested exceed what Spotify is willing to accept. I understand that they fall into 3 groups of maximums allowed: 20, 50, and 100. Below is the enum I created while going through the documentation a couple days ago.
pub enum BatchLimits {
Albums, // 20
AlbumTracks, // 50
GetSavedAlbums, // 50
ModifyCurrentUserAlbums, // 50 This applies to 'save albums for current user', 'remove users' saved albums', & 'check users saved albums'
NewReleases, // 50
Artists, // 50
ArtistAlbums, //50
Audiobooks, //50
AudiobookChapters, //50
SavedAudiobooks, //50
ModifyCurrentUserAudiobook, //50 This applies to 'save audiobook for current user', 'remove users' saved audiobook', & 'check users saved audiobook'
BrowseCategories, //50
AudiobooksChapters, //50
Episodes, //50
GetSavedEpisodes, //50
ModifyCurrentUserEpisodes, //50 This applies to 'save episode for current user', 'remove users' saved episode', & 'check users saved episode'
RecentlyPlayed, //50
PlaylistItems, //50
ModifyPlaylistItems, //100 This applies to 'add playlist items', 'remove playlist items', & 'update playlist items'
UserPlaylists, //50 This applies to a public user and private/current user
GetPlaylists, //50 This applies to category and featured playlists
SearchItem, //50
GetShows, //50
GetShowEpisodes, //50
GetUserSavedShows, //50
ModifyCurrentUserShows, //50 This applies to 'save show for current user', 'remove user's saved show', & 'check user's saved show'
Tracks, //50
GetSavedTracks, //50
ModifyCurrentUserTracks, //50 This applies to 'save track for current user', 'remove user's saved track', & 'check user's saved track'
TracksAudioFeatures, //100
Recommendations, //100
CurrentUserTopItems, //50
CurrentUserFollowedArtists, //50
ModifyWhoCurrentUserFollows, //50 This applies to 'follow artists or users', 'unfollow artists or users', & 'check if current user follows artists or users'
CurrentUserPlaylists, //50
}
I have seen several posts such as this and this regarding inaccuracies in the documentation. Do these maximums change frequently? How can I ensure the rust crate I'm working on is correctly updated to reflect changes made to the API itself?
A final question that I just thought of while writing this is to ask about the existence of (or likelihood of developing) an api endpoint that can give users a response outlining the request maximums for each endpoint? That way, applications can be updated much more easily and automatically instead of testing vector lengths after an api change.
Thanks in advance!