Skip to content

Releases: Bogpan/spotify-rs

v0.3.14

11 Aug 19:02
Compare
Choose a tag to compare

Changed

  • Merged #9.

v0.3.13

27 Jul 11:07
Compare
Choose a tag to compare

Changed

  • Fixed #7 - the auth_code and csrf_state wouldn't be correct if they contained newline characters

v0.3.11

23 Jul 21:21
Compare
Choose a tag to compare

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

31 Dec 20:50
Compare
Choose a tag to compare

Changed

  • Merged PR #1 (thanks domanteli0 for the PR!)
    which fixes an issue where the token timestamp wouldn't get set if using the client credentials flow.

v0.3.9

01 Sep 18:39
Compare
Choose a tag to compare

Added

  • Added top-level documentation with examples for each auth flow and general usage.
  • Added constructors for the auth flow structs.
  • Renamed AuthCodeGrantFlow, AuthCodePKCEGrantFlow and ClientCredsGrantFlow to AuthCodeFlow, AuthCodePkceFlow and ClientCredsFlow respectively.
  • Added the AuthCodeClient, AuthCodePkceClient and ClientCredsClient type aliases for each of the client's authflows.
    These are what you should use when referring to the Client type.

Changed

  • Client::authenticate() doesn't take scopes 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 and redirect_uri parameters from Client::from_refresh_token(), as they were pointless.
  • Client::shows().get() now returns Vec<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 and ExternalUrls 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

30 Aug 20:11
Compare
Choose a tag to compare

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 or after, 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 a Playlist couldn't be deserialized
    properly. Users can do filtering by accessing specific fields of the Playlist struct anyway.

v0.3.5

23 Aug 23:42
Compare
Choose a tag to compare

Added

  • Added the player endpoints.
    Two of them return 403 Forbidden "Player command failed: Restriction violated" (set repeat mode and toggle playback shuffle).
    It seems to be an issue with the Spotify API again.

v.0.3.4

21 Aug 13:42
Compare
Choose a tag to compare

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

20 Aug 14:29
Compare
Choose a tag to compare

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 to MIN, MAX upon creation. Limit is a BoundedU32<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

17 Aug 11:47
Compare
Choose a tag to compare

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?;