- New: Various model objects now implement
Serialize
. - New:
native-tls
andrustls-tls
crate feature flags to select which TLS library to use for secure connections. - Changed: Documentation improvements.
- Changed: The
ScopedClient
andUnscopedClient
traits now requireSelf: crate::private::Sealed
. This shouldn't break anything, unless you're implementing the traits for your own types, which you shouldn't be doing anyways. - Fixed:
.playback_state()
and.currently_playing_item()
returnErr(EmptyResponse)
when nothing is playing and Spotify responds with 204 No Content (#6)
- New: The following new endpoints have been implemented:
- Scoped:
current_user_profile
(Get current user's profile]) - Unscoped:
user_profile
(Get user's profile)
- Scoped:
- Changed: Request builders internally uses a hash map to store query parameters. This prevents certain bugs with trying to append the same parameter multiple times.
- Changed: Better handling of 403 Forbidden errors to account for:
- Restricted player control calls failing (see the play example).
- Target user not having a Spotify Premium account.
- Changed: Update
base64
dependency to 0.21.0. - Fixed: Build fails with just the model enabled (
default-features = false
). - Fixed: User IDs failed to deserialize as bare IDs.
Every endpoint function has been changed to return a request builder that allows for setting certain parameters for the request before sending it. The request builder may be sent with the .send_async()
and .send_sync()
functions on the builder. Because of this change, there are no longer separate async and sync traits for scoped and unscoped clients; they have been merged into just ScopedClient
and UnscopedClient
.
This change allows, for one:
- Choosing whether or not Ferrispot automatically reacts to being rate limited per-request using the
react_to_rate_limit
-function in every request builder. Default:true
. - Choosing whether or not Ferrispot automatically refreshes the client's access token when it expires, if applicable, using the
auto_refresh_access_token
-function in every request builder. Default:true
. - Neater way of choosing opt-in options such as the device ID in player requests or the market country code in catalog searches.
- More easily implementing new endpoints in the future.
- Breaking:
.context()
inPublicPlayingItem
now returnsOption<Context>
to account for cases where the playing context is not publicly available. - Breaking: The previously deprecated functions in Id have been removed.
- Fixed: The album in a relinked track object fails to deserialize.
- ... and likely something else as well I've missed, my commit messages are terrible.
- Fixed: Synchronous player control calls fail with an unhandled HTTP 411 error.
- New: Add support for user IDs and collection URIs / URLs, which refer to a user's Liked Songs playlist.
- New: The following new endpoints have been implemented:
- Scoped:
next
(Skip to next) - Scoped:
previous
(Skip to previous) - Scoped:
seek
(Seek to position)
- Scoped:
- Fixed: Player control calls (pause, resume, volume etc.) fail with an unhandled HTTP 411 error.
- Fixed: Access token refreshing uses the wrong credentials and fails with
InvalidClient
(#2).
- Breaking: The various
.id()
functions in model objects have been changed to return anId
struct that borrow from the models respectively. - New:
id()
,uri()
andurl()
inIdTrait
have been deprecated and new functionsas_str()
,as_uri()
andas_url()
respectively have been added. Their functionality is identical, but the new functions better describe their return values and fit the naming scheme better. The old functions will be removed in a future release. - New: The scoped function
currently_playing_track()
has been deprecated and a new functioncurrently_playing_item()
has been added. Its functionality is identical, but the new function more accurately describes that the currently playing item may be something other than a track. The old function will be removed in a future release. - New: Add
IdTrait::as_borrowed()
that returns a newId
borrowing from the given Id which must not outlive the givenId
, essentially acting as a reference without being a reference (&Id
). - New: Add
RelinkedTrackEquality
trait that allows comparing tracks when Spotify track relinking is applied to either or both of them. - New: Add ability to compare full, partial and local tracks, albums and artists between each other of the same kind. Item IDs will be compared for full and partial items, otherwise all available fields are compared for local items.
- Changed: Change equality comparison method for tracks, albums and objects: only compare their IDs for full and partial items, and all the fields for local items.
- Changed: The unscoped
.track()
call returns aNonexistentTrack
error for 404 responses. - Changed:
Device
equality is now based only on its ID. - Fixed: Properly build URL for single track lookup.
- Fix authorization code user client with PKCE freezing while refreshing the access token.
- Remove chance of authorization code user client state parameter being an empty string.
- A functional object model for the endpoints so far.
- Synchronous (blocking) API, available with the
sync
crate feature.
- Initial release.