Releases: Bogpan/spotify-rs
Releases · Bogpan/spotify-rs
v0.3.14
v0.3.13
v0.3.11
Changed
- Removed
vscode
folder - Fixed formatting in
README.md
so crates.io would format the code block correctly
Note: I have resumed work on the library, the (pretty major) rewrite is almost done, then testing is in order, after which I can resume normal development (as well as adding proper tests, examples and a CI pipeline).
v0.3.10
v0.3.9
Added
- Added top-level documentation with examples for each auth flow and general usage.
- Added constructors for the auth flow structs.
- Renamed
AuthCodeGrantFlow
,AuthCodePKCEGrantFlow
andClientCredsGrantFlow
toAuthCodeFlow
,AuthCodePkceFlow
andClientCredsFlow
respectively. - Added the
AuthCodeClient
,AuthCodePkceClient
andClientCredsClient
type aliases for each of the client's authflows.
These are what you should use when referring to theClient
type.
Changed
Client::authenticate()
doesn't takescopes
anymore for the client credentials flow, as they were needless.- Moved the CSRF token and PKCE verifier inside the client to make the auth flow simpler.
- Removed
scopes
andredirect_uri
parameters fromClient::from_refresh_token()
, as they were pointless. Client::shows().get()
now returnsVec<Option<SimplifiedShow>>
, as the API returns null for some shows
and the user likely wants to know that some of their shows can't be obtained.- Made the
ExternalIds
andExternalUrls
structs' fields public. - Removed the ability to implement marker traits (such as
AuthFlow
,Verifier
etc.) for library users, using the sealed trait pattern.
v0.3.7
Added
- Added documentation for everything apart from the model. If anything is missing, please let me know and I'll add it in the future.
Changed
- Moved several endpoints (save/remove/check albums/episodes etc.) from needless builders.
- Re-exported the
error::Result
type alias. - In the recently played tracks endpoint, you can now either set
before
orafter
, not both (as per the Spotify API documentation). - Renamed several builder methods from various names (e.g. follow, unfollow, set) to, simply,
send
.
Removed
- Removed the
fields
option from the get-playlist builder, as it would be used to filter responses, in which case aPlaylist
couldn't be deserialized
properly. Users can do filtering by accessing specific fields of thePlaylist
struct anyway.
v0.3.5
v.0.3.4
Added
- Implemented the missing track-related endpoints.
- Added an optional
tracks
method to the builder for creating playlists. It takes a slice of track or episode URIs and makes two additional API calls
to add tracks to the newly created playlist: one for adding the tracks and one for getting their details.
v0.3.3
Added
- Added endpoints: playlists, search, shows, tracks, users.
Client::from_refresh_token()
method that allows you get a new client using an existing refresh token.- Internal
BoundedU32<const MIN: u32, const MAX: u32>
type that clamps a u32 toMIN, MAX
upon creation.Limit
is aBoundedU32<1, 50>
-
what Spotify uses for its limits. u32s passed by users are converted to said type. This might be unpredictable behaviour for the users,
but it will be documented and I believe it's for the better - however, I am open to suggestions and might remove it in the future.
Changed
- Methods with empty API responses now return
Nil
instead of()
, in order to make deserialization from empty responses easy while keeping flexibility.
v0.3.2
Changed
-
Changed the approach to the builders, the public API now being endpoint-oriented.
Getting an album with the optional
market
parameter set:// before let album = spotify.get_album(AlbumQuery::new("id").market("GB")).await?; // after let album = spotify.album("id").market("RO").get().await?;