Breaking changes
- (#487) Change the type of
TrackLink.id
fromTrackId<'static>
toOption<TrackId<'static>>
Bugfixes
- (#494) Fix endless sequential pagination problem.
New features
- (#496) Add support for searching multiple types
- (#512) Add
AuthCodePkceSpotify::from_token_with_config()
- (#513)
- Automatically spawn a local TCPListener to handle redirect url without manually copy/paste URL into terminal
- Mark
artist_related_artists
,track_features
,tracks_features
,track_analysis
as deprecated because Spotify has deprecated these endpoints
New features
- (#490) Add impls for
Clone
,Debug
,PartialEq
,Eq
,Serialize
andHash
forPlayContextId
andPlayableId
- (#480) Fix deserialize empty images from null.
Bugfixes
- (#471) Fix
ureq-native-tls
feature to actually use native-tls
New features
- (#458) Support for the
wasm32-unknown-unknown
build target
Bugfixes
- (#440) Add Smartwatch device type, fix for json parse error: unknown variant Smartwatch.
- (#447) Replace the deprecated
dotenv
crate withdotenvy
New features
- (#390) The
scopes!
macro supports to split the scope by whitespace. - (#418) Add a user-settable callback function whenever token is updated.
Breaking changes
- (#409) Change type of
position
parameter inplaylist_add_items
endpoint fromOpinion<Duration>
toOpinion<u32>
- (#421) Change type of
AudioFeaturesPayload.audio_features
fromVec<AudioFeatures>
toVec<Option<AudioFeatures>>
- (#429) Enable Token refreshing by default.
- (#432) Add optional
market
field totrack
,album
,albums
, andalbum_track[_manual]
. Makemarket
field inartist_top_tracks
optional.
Bugfixes
- (#419) Base64url encode instead of plain base64 encode for PKCE challenge code.
- (#421) Filter
null
s ontracks_features
requests - (#424) Fix PKCE refresh token invalid error
- (#428) Fix PKCE url in doc
- (#399) Add a new variant
Collectionyourepisodes
forType
enum. - (#375) We now use
chrono::Duration
in more places for consistency and usability:start_uris_playback
,start_context_playback
,rspotify_model::Offset
,resume_playback
,seek_track
. Some of these fields have been renamed fromposition_ms
toposition
. - ((#356)[#356]) We now support custom authentication base URLs.
Config::prefix
has been renamed toConfig::api_base_url
, and we've introducedConfig::auth_base_url
. - (#384) Add STB alias for Stb device type, fix for
json parse error: unknown variant STB
. - (#386) Support
BaseClient::artist_albums
with zero or moreAlbumType
. - (#393) Add
ureq-rustls-tls-native-certs
feature flag. - (#402) Add
ureq-native-tls
feature flag.
Bugfixes
- (#394) Set a common 10 second timeout for both http clients.
- (#331)
Market
is nowCopy
- (#366) Replace all
std::time::Duration
withchrono::Duration
to support negative duration.
Bugfixes:
- (#332) Fix typo in
RestrictionReason
enum values
Breaking changes:
-
(#336)
Offset::for_position
andOffset::for_uri
have been removed, as they were unnecessary. UseOffset::Position
andOffset::Uri
instead, respectively. -
(#305) The
Id
types have been refactored to maximize usability. Instead of focusing on having an object-safe trait and usingdyn Id
, we now have enums to group up the IDs. This is based on howenum_dispatch
works, and it's not only easier to use, but also more efficient. It makes it possible to have borrowed IDs again, so we've chosen to useCow
internally for flexibility. Check out the docs for more information!Please let us know if there is anything that could be improved. Unfortunately, this breaks many methods in
BaseClient
andOAuthClient
, but the errors should occur at compile-time only. -
(#325) The
auth_code
,auth_code_pkce
,client_creds
,clients::base
andclients::oauth
modules have been removed from the public API; you should access the same types from their parent modules instead -
(#326) The
rspotify::clients::mutex
module has been renamed torspotify::sync
-
(#330)
search
now acceptsOption<IncludeExternal>
instead ofOption<&IncludeExternal>
-
(#330)
featured_playlists
now acceptsOption<chrono::DateTime<chrono::Utc>>
instead ofOption<&chrono::DateTime<chrono::Utc>>
-
(#330)
current_user_top_artists[_manual]
andcurrent_user_top_tracks[_manual]
now acceptOption<TimeRange>
instead ofOption<&TimeRange>
-
(#331) All enums now implement
Into<&'static str>
instead ofAsRef<str>
-
(#331)
Option<&Market>
parameters have been changed toOption<Market>
New features
- (362) Add "Get the User's Queue" endpoint
Breaking changes:
- (#306) The
collection
variant has been added toType
- (#295) The
Tv
variant inDeviceType
is actually case insensitive. - (#296) The
Avr
variant inDeviceType
is actually case insensitive. - (#302) Added undocumented
label
field toFullAlbum
.
Breaking changes:
- (#303) The
cursors
field inCursorBasedPage
is now optional.
- (#281) The documentation website for the Spotify API has been changed, so the links in the
rspotify
crate have been updated. Unfortunately, the object model section has been removed, so we've had to delete most reference links inrspotify-model
. From now on, you should refer to the endpoints where they are used to see their definition.
Breaking changes:
This release contains lots of breaking changes. These were necessary to continue RSpotify's development, and this shouldn't happen again. From now on we'll work on getting closer to the first stable release. Lots of internal code was rewritten to make RSpotify more flexible, performant and easier to use. Sorry for the inconvenience!
If we missed any change or there's something you'd like to discuss about this version, please open a new issue and let us know.
This guide should make it easier to upgrade your code, rather than checking out the changelog line by line. The most important changes are:
- Support for multiple HTTP clients. Instead of using
rspotify::blocking
for synchronous access, you just need to configure theureq-client
feature and its TLS (learn more in the docs). However, note that this is subject to changes after #221 is fixed. - No need for the builder pattern anymore:
Spotify
has been split up into multiple clients depending on the authentication process you want to follow. This means that you'll be required touse rspotify::prelude::*
in order to access the traits with the endpoints, since they're written in a base trait now.- Client Credentials Flow: see
ClientCredsSpotify
. - Authorization Code Flow: see
AuthCodeSpotify
. - Authorization Code Flow with Proof Key for Code Exchange (PKCE): see
AuthCodePkceSpotify
. This is new! You might be interested in using PKCE for your app if you don't want to expose your client secret. - Implicit Grant Flow: unimplemented, as RSpotify has not been tested on a browser yet. If you'd like support for it, let us know in an issue!
- Client Credentials Flow: see
- There's now support for (both sync and async) automatic pagination! Make sure you upgrade to these after checking out the
pagination_async.rs
andpagination_sync.rs
examples. You can use the_manual
-suffixed endpoints for the previous pagination style. - We've renamed a few structs and endpoints. The new names are quite similar, so the Rust compiler should suggest you what to change after an error. The only one you might not notice is the environmental variables: they're now
RSPOTIFY_CLIENT_ID
,RSPOTIFY_CLIENT_SECRET
andRSPOTIFY_REDIRECT_URI
to avoid collisions with other libraries. - We always use
Option<T>
for optional parameters now. This means that you might have to addSome(...)
to some of your parameters. We were using bothInto<Option<T>>
andOption<T>
but decided that either of these would be best as long as it's consistent.Option<T>
has less magic, so we went for that one. - The core library has been split up with features. If you need
dotenv
just activateenv-file
, and if you need CLI functionality (prompt_for_token
and similars), activatecli
. - We use custom errors now instead of the
failure
crate. - The Spotify clients now have a
Config
struct for configuration. This includes cached tokens (saved/loaded automatically in a JSON file), and refreshing tokens (reauthenticated automatically when they become expired).
Now to a quick example: here's how you used to query the current user saved tracks:
extern crate rspotify;
use rspotify::blocking::client::Spotify;
use rspotify::blocking::oauth2::{SpotifyClientCredentials, SpotifyOAuth};
use rspotify::blocking::util::get_token;
fn main() {
let mut oauth = SpotifyOAuth::default().scope("user-library-read").build(); // Turns out this reads from the environment variables!
let token_info = get_token(&mut oauth).unwrap(); // How does it get the token? Why is it not in the client if it makes a request?
let client_credential = SpotifyClientCredentials::default() // This also accesses the environment variables with no warning.
.token_info(token_info)
.build(); // So verbose...
let spotify = Spotify::default() // So verbose and easy to mess up... What auth flow is this again?
.client_credentials_manager(client_credential)
.build();
let tracks = spotify.current_user_saved_tracks(10, 0); // Iterating is hard
println!("{:?}", tracks);
}
And here's how you do it now:
use rspotify::{prelude::*, scopes, AuthCodeSpotify, Credentials, OAuth};
fn main() {
let oauth = OAuth::from_env(scopes!("user-library-read")).unwrap(); // Concise & explicit with `from_env`
let creds = Credentials::from_env().unwrap(); // Same, concise & explicit
let mut spotify = AuthCodeSpotify::new(creds, oauth); // Simpler initialization
let url = spotify.get_authorize_url(false).unwrap(); // More flexible, lets us implement PKCE
spotify.prompt_for_token(&url).unwrap(); // Explicit: the token is obtained by interacting with the user
let stream = spotify.current_user_saved_tracks(None);
println!("Items:");
for item in stream { // Easy iteration instead of manual pagination
println!("* {}", item.unwrap().track.name);
}
}
Hopefully this will convince you that the new breaking changes are good; you'll find the new interface easier to read, more intuitive and less error prone.
Here are a few examples of upgrades:
Name | Old | New |
---|---|---|
[Sync] device | examples/blocking/device.rs |
examples/ureq/device.rs |
[Sync] me | examples/blocking/me.rs |
examples/ureq/me.rs |
[Sync] search | examples/blocking/search_track.rs |
examples/ureq/search.rs |
[Sync] seek_track | examples/blocking/seek_track.rs |
examples/ureq/seek_track.rs |
[Sync] current_user_saved_tracks | examples/blocking/current_user_saved_tracks.rs |
examples/pagination_sync.rs |
[Async] current_user_saved_tracks | examples/current_user_saved_tracks.rs |
examples/pagination_async.rs |
[Async] current_user_saved_tracks (manually) | examples/current_user_saved_tracks.rs |
examples/pagination_manual.rs |
[Async] current_playing | examples/current_playing.rs |
examples/auth_code.rs |
[Async] current_playback | examples/current_playback.rs |
examples/auth_code_pkce.rs |
[Async] album | examples/album.rs |
examples/client_creds.rs |
[Async] webapp with Rocket | examples/webapp |
examples/webapp |
More in the examples
directory!
- Rewritten documentation in hopes that it's easier to get started with RSpotify.
- Reduced the number of examples. Instead of having an example for each endpoint, which is repetitive and unhelpful for newcomers, some real-life examples are now included. If you'd like to add your own example, please do! (#113)
- RSpotify now uses macros internally to make the endpoints as concise as possible and nice to read.
- Add
add_item_to_queue
endpoint. - Add
category_playlists
endpoint (#153). - Add
resume_playback
endpoint. - Fix race condition when using a single client from multiple threads (#114).
- RSpotify should now be considerably lighter and less bloated (discussion in #108):
- Remove unused dependencies:
base64
,env_logger
,random
,url
. - Remove
itertools
dependency by using the standard library. - Remove
rand
in place ofgetrandom
to reduce total dependencies and compile times. - Cleanup, reduced repetitive code and boilerplate internally in several places (#117, #113, #107, #106).
- Added internal zero-copy type for Spotify ids, reduced number of allocations/clones (#161).
- Updated dependencies to the latest versions, integrated Dependabot to keep track of them (#105, #111).
- Remove unused dependencies:
- (#145) Mark
SimplifiedEpisode.language
as deprecated. - (#145) Derive
PartialEq
andEq
for models:Actions
AudioAnalysisMeta
AudioAnalysisSection
AudioAnalysisSegment
AudioAnalysisTrack
AudioAnalysis
AudioFeaturesPayload
AudioFeatures
Category
Context
Copyright
CurrentPlaybackContext
CurrentlyPlayingContext
CursorBasedPage
CursorPageFullArtists
Cursor
DevicePayload
Device
ExplicitContent
FeaturedPlaylists
FullAlbum
FullArtist
FullEpisode
FullPlayingContext
FullPlaylist
FullShow
FullTrack
Image
Offset
PageCategory
Page
PlayHistory
PlayableItem
PlayingItem
PlaylistItem
PlaylistResult
PrivateUser
PublicUser
RecommendationsSeedType
RecommendationsSeed
Recommendations
Restrictions
ResumePoint
SavedTrack
SearchAlbums
SearchArtists
SearchEpisodes
SearchPlaylists
SearchResult
SearchShows
SearchTracks
SeversalSimplifiedShows
Show
SimplifiedAlbum
SimplifiedArtist
SimplifiedEpisode
SimplifiedPlayingContext
SimplifiedPlaylist
SimplifiedShow
SimplifiedTrack
TrackLink
TrackRestriction
- Fix broken model links refering to Spotify documentation
- (#188) Replace html links with intra-documentation links
- (#189) Add
scopes!
macro to generate scopes forToken
from string literal - RSpotify has now been split up into independent crates, so that it can be used without the client. See
rspotify-macros
andrspotify-model
. - (#128) Reexport
model
module to allow user to writerspotify::model::FullAlbum
instead ofrspotify::model::album::FullAlbum
. - (#246) Add support for PKCE, see
AuthCodePkceSpotify
. - (#257)
parse_response_code
now checks that the state is the same in the request and in the callback.
Breaking changes:
-
(#202) RSpotify now consistently uses
Option<T>
for optional parameters. Those generic overInto<Option<T>>
have been changed, which makes calling endpoints a bit ugiler but more consistent and simpler. -
SpotifyClientCredentials
has been renamed toCredentials
(#129), and its membersclient_id
andclient_secret
toid
andsecret
, respectively. -
TokenInfo
has been renamed toToken
. It no longer has thetoken_type
member, as it's alwaysBearer
for now (#129). -
SpotifyOAuth
has been renamed toOAuth
. It only contains the necessary parameters for OAuth authorization instead of repeating the items fromCredentials
andSpotify
, soclient_id
,client_secret
andcache_path
are no longer inOAuth
(#129). -
TokenBuilder
andOAuthBuilder
will only read from environment variables whenfrom_env
is used, instead ofdefault
. -
dotenv
support is now optional. You can enable it with theenv-file
feature to have the same behavior as before (#108). It may be used withfrom_env
as well. -
Renamed environmental variables to
RSPOTIFY_CLIENT_ID
,RSPOTIFY_CLIENT_SECRET
andRSPOTIFY_REDIRECT_URI
to avoid name collisions with other libraries that use OAuth2 (#118). -
The
blocking
module has been removed, since RSpotify is able to use multiple HTTP clients now.reqwest
andureq
are currently supported, meaning that you can still use blocking code by enabling theclient-ureq
feature and a TLS likeureq-rustls-tls
. Read the docs for more information (#129). -
The
Spotify
client has been split up by authorization flows (ClientCredsSpotify
,AuthCodeSpotify
,AuthCodePkceSpotify
), which allows us to remove the builder pattern. The authentication process has been rewritten. (#216). -
Fix typo in
user_playlist_remove_specific_occurrenes_of_tracks
, now it'suser_playlist_remove_specific_occurrences_of_tracks
. -
(#123) All fallible calls in the client return a
ClientError
rather than usingfailure
. -
(#244) Model objects like
FullTrack
orAudioFeatures
have had their_type
anduri
fields removed. These can be accessed instead with theid
field:id._type()
orid.uri()
. -
(#244) Endpoints taking
Vec<String>/&[String]
as parameter have changed toimpl IntoIterator<Item = &Id>
.- The endpoints which changes parameter from
Vec<String>
toimpl IntoIterator<Item = &Id>
:albums
artists
check_users_saved_shows
get_several_episodes
remove_users_saved_shows
save_shows
- The endpoints which changes parameter from
&[String]
toimpl IntoIterator<Item = &Id>
:audios_features
current_user_saved_albums_add
current_user_saved_albums_contains
current_user_saved_albums_delete
current_user_saved_tracks_add
current_user_saved_tracks_contains
current_user_saved_tracks_delete
user_artist_check_follow
user_follow_artists
user_follow_users
user_playlist_add_tracks
user_playlist_remove_all_occurrences_of_tracks
user_playlist_replace_tracks
user_unfollow_artists
user_unfollow_users
- The endpoints which changes parameter from
String
to&Id
: -get_a_show
-get_an_episode
-get_shows_episodes
- The endpoint which changes parameter from
Vec<Map<String, Value>>
toVec<TrackPositions>
: -playlist_remove_specific_occurrences_of_tracks
- The endpoints which changes parameter from
-
The
Offset
type is now an enum to match API logic,Offset::Position
isu32
now (it's not a position in time, it's a position in a playlist, and you can't have bothposition
anduri
fields at the same time). -
(#128) Rename endpoints with more fitting name:
audio_analysis
->track_analysis
audio_features
->track_features
audios_features
->tracks_features
-
(#128) Split single
senum.rs
file into a separate module namedenums
(which is more appropriate compared withsenum
) with three filescountry.rs
,types.rs
,misc.rs
, and moveenums
module intomodel
module, which should be part of themodel
module, check enums mod.rs file for details. -
(#128) Refactor all enum files with
strum
, reduced boilerplate code.- All enums don't have a method named
as_str()
anymore, by leveragingstrum
, it's easy to convert strings to enum variants based on their name, with methodas_ref()
.
- All enums don't have a method named
-
Fix typo in
transfer_playback
:device_id
todevice_ids
. -
(#249) The
recommendations
endpoint has been made simpler to use; the attributes are now serialized withRecommendationsAttribute
. -
(#145) Refactor models to make it easier to use:
- Changed type of
track
inPlayHistory
toFullTrack
(#139). - Rename model
CurrentlyPlaybackContext
toCurrentPlaybackContext
- Change
copyrights
fromVec<HashMap<String, String>>
toVec<Copyright>
- Add missing field
is_private_session
forDevice
- Change
PublicUser.images
fromOption<Vec<Image>>
toVec<Image>
- Add three missing fields
is_playable
,linked_from
,restrictions
forSimplifiedTrack
- Delete deprecated field
birthday
and Add missing fieldsproduct
andexplicit_content
forPrivateUser
- Rename PlayingTrack to PlayingItem and change
added_at
to Option - Replace
Playing
withCurrentlyPlayingContext
, since it's the same - Make
Device.id
andDevice.volume_percent
, since they would be null - Rename
Restrictions
toRestriction
and move it to top level ofmodel
module - Rename
AudioAnalysisMeasure
toTimeInterval
- Replace
start
,duration
,confidence
fields fromAudioAnalysisSection
andAudioAnalysisSegment
toTimeInterval
field - Remove useless
FullPlayingContext
, since it has been replaced withCurrentPlayingContext
- Rename
CUDResult
toPlaylistResult
, since this original name isn't self-explaining - Change
{FullArtist, FullPlaylist, PublicUser, PrivateUser}::followers
fromHashMap<String, Option<Value>>
to structFollowers
- Replace
Actions::disallows
with aVec<DisallowKey>
by removing all entires whose value is false, which will result in a simpler API - Replace
{FullAlbum, SimplifiedEpisode, FullEpisode}::release_date_precision
fromString
toDatePrecision
enum, makes it easier to use. - Id and URI parameters are type-safe now everywhere thanks to the
Id
trait and its implementations.
- Changed type of
-
(#157) Keep polishing models to make it easier to use:
- Constrain visibility of
FullArtists
struct withpub (in crate)
, makeartists
andartist_related_artists
endpoints return aVec<FullArtist>
instead. - Constrain visibility of
FullTracks
struct withpub (in crate)
, maketracks
andartist_top_tracks
endpoints return aVec<FullTrack>
instead. - Constrain visibility of
AudioFeaturesPayload
struct withpub (in crate)
, maketracks_features
endpoints return aVec<AudioFeatures>
instead. - Constrain visibility of
FullAlbums
struct withpub (in crate)
, makealbums
endpoints return aVec<FullAlbum>
instead. - Constrain visibility of
PageSimpliedAlbums
struct withpub (in crate)
, makenew_releases
endpoints return aPage<SimplifiedAlbum>
instead. - Constrain visibility of
CursorPageFullArtists
struct withpub (in crate)
, makecurrent_user_followed_artists
endpoints return aCursorBasedPage<FullArtist>
instead. - Constrain visibility of
PageCategory
struct withpub (in crate)
, makecategories
endpoints return aPage<Category>
instead. - Constrain visibility of
DevicePayload
struct withpub (in crate)
, makedevice
endpoints return aVec<Device>
instead. - Constrain visibility of
SeversalSimplifiedShows
struct withpub (in crate)
, makeget_several_shows
endpoints return aVec<SimplifiedShow>
instead. - Constrain visibility of
SeversalEpisodes
struct withpub (in crate)
, makeget_several_episodes
endpoints return aVec<FullEpisode>
instead. - Rename
AudioFeatures.duration_ms
toduration
, and change its type fromu32
tostd::time::Duration
. - Rename
FullEpisode.duration_ms
toduration
, and change its type fromu32
tostd::time::Duration
. - Rename
SimplifiedEpisode.duration_ms
toduration
, and change its type fromu32
tostd::time::Duration
. - Rename
FullTrack.duration_ms
toduration
, and change its type fromu32
tostd::time::Duration
. - Rename
SimplifiedTrack.duration_ms
toduration
, and change its type fromu32
tostd::time::Duration
. - Rename
ResumePoint.resume_position_ms
toresume_position
, and change its type fromu32
tostd::time::Duration
. - Rename
CurrentlyPlayingContext.progress_ms
toprogress
, and change its type fromOption<u32>
toOption<std::time::Duration>
. - Rename
CurrentPlaybackContext.progress_ms
toprogress
, and change its type fromOption<u32>
toOption<std::time::Duration>
. - Change
CurrentlyPlayingContext.timestamp
's type fromu64
tochrono::DateTime<Utc>
. - Change
CurrentPlaybackContext.timestamp
's type fromu64
tochrono::DateTime<Utc>
. - Change
Offset.position
's type fromOption<u32>
toOption<std::time::Duration>
- Remove
SimplifiedPlayingContext
, since it's useless.
- Constrain visibility of
-
(#177) Change
mode
fromf32
toenum Modality
:- Change
AudioAnalysisSection::mode
,AudioAnalysisTrack::mode
andAudioFeatures::mode
fromf32
toenum Modality
.
- Change
-
(#185) Polish the
Token.expires_at
,Token.expires_in
fields- Change
Token.expires_in
from u32 tochrono::Duration
- Change
Token.expires_at
from i64 tochrono::DateTime<Utc>
- Change
Token.scopes
fromString
toHashSet
. - Change
OAuth.scopes
fromString
toHashSet
. - Change
SimplifiedPlaylist::tracks
fromHashMap
toPlaylistTracksRef
- Change
-
(#194) Rename
PlayingItem
toPlayableItem
,PlaylistItem::track
type changed toOption<PlayableItem>
, so playlists can contain episodes as well -
(#197) Making acronyms lowercase:
- Rename
ClientError::ParseJSON
toClientError::ParseJson
- Rename
ClientError::ParseURL
toClientError::ParseUrl
- Rename
ClientError::IO
toClientError::Io
- Rename
ClientError::CLI
toClientError::Cli
- Rename
BaseHTTPClient
toBaseHttpClient
- Rename
-
(#166 #201) Add automatic pagination, which is now enabled by default. You can still use the methods with the
_manual
suffix to have access to manual pagination. There are three new examples for this, check outexamples/pagination*
to learn more!As a side effect, some methods now take references instead of values (so that they can be used multiple times when querying), and the parameters have been reordered so that the
limit
andoffset
are consistently the last two.The pagination chunk size can be configured with the
Spotify::pagination_chunks
field, which is set to 50 items by default. -
No default values are set from RSpotify now, they will be left to the Spotify API.
-
(#202) Add a
collaborative
parameter touser_playlist_create
. -
(#202) Add a
uris
parameter toplaylist_reorder_tracks
. -
(#206) Update the endpoint signatures to pass parameters by reference, affected endpoint list:
tracks
artist_albums
artist_albums_manual
artist_top_tracks
search
playlist
playlist_remove_specific_occurences_of_tracks
featured_playlists
recommendations
current_playlist
repeat
get_seversal_shows
get_an_episode
get_several_episodes
remove_users_saved_shows
-
(#261)
PageSimpliedAlbums
has been renamed toPageSimplifiedAlbums
-
(#261)
Default
has been implemented for all the possible models -
(#257) Fix naming for most playlist-related endpoints. They used to work only for tracks, but they've been extended to episodes as well, so we call the contents of a playlist "items" instead of "tracks".
playlist_add_tracks
is nowplaylist_add_items
playlist_tracks
is nowplaylist_items
playlist_tracks_manual
is nowplaylist_items_manual
playlist_replace_tracks
is nowplaylist_replace_items
playlist_reorder_tracks
is nowplaylist_reorder_items
playlist_remove_all_occurrences_of_tracks
is nowplaylist_remove_all_occurrences_of_items
playlist_remove_specific_occurrences_of_tracks
is nowplaylist_remove_specific_occurrences_of_items
model::TrackPositions
is nowmodel::ItemPositions
current_user_playing_track
is nowcurrent_user_playing_item
-
(#260) The
current_user_saved_albums
andcurrent_user_saved_tracks
now have amarket
parameter -
(#256, #198) Added missing
before
andafter
parameters fromcurrent_user_recently_played
-
Add
get_access_token_without_cache
andrefresh_access_token_without_cache
to get and refresh access token without caching it. -
Add
cross compile
support. -
Add
podcast
support:- add
save_shows
endpoint. - add
get_saved_shows
endpoint. - add
get_a_show
endpoint. - add
get_several_shows
endpoint. - add
get_shows_episodes
endpoint. - add
get_an_episode
endpoint. - add
get_several_episodes
endpoint. - add
check_users_saved_shows
endpoint. - add
remove_users_saved_shows
endpoint
Breaking Change
- update the
current_playing
endpoint, add a new parameter namedadditional_types
, and add some new fields for return object, change the return object type fromSimplifiedPlayingContext
toCurrentlyPlaybackContext.
- update the
current_playback
endpoint, add a new parameter namedcurrent_playback
, and add some new fields for return object, change the return object type fromFullPlayingContext
toCurrentlyPlaybackContext
. - update the
search
endpoint, which adds support of podcast shows and spisodes, add a new parameter namedinclude_external
, changesearch
function from private to public. - remove
search_album
,search_artist
,search_playlist
, andsearch_track
, now there is only search method left, it's thesearch
endpoint.
- add
- Adds
async/await
support. - Keeps the previous synchronous API, enabled by extra feature
blocking
, disabled by default. - Shorten the import path.
- Add missing
Show
andEpisode
types.
- Provide more informational error strings for API.
- Fix tuneable attribute passing for recommendations.
- Support system proxy setting.
- Add two endpoint functions:
current_user_saved_albums_contains
,user_artist_check_follow
. - (Breaking change)Change
AlbumType::from_str
,SearchType::from_str
,RepeatState::from_str
,Country::from_str
,TimeRange::from_str
,Type::from_str
,AlbumType::from_str
, implementFromStr
trait for all of them.
- Code optimize, remove a unnecessary mut and add a missing reference
- Fix reqwest breaking change
- Add missing devices type
- Add
position_ms
tostart_playback
- Make PrivateUser country optional
- Replace println! with log!
- FIx errors when email or birthdate are missing
- Fix de-serialization panics for null values
- Implement unsaving albums and unfollowing users/artists
- Allow application to perform error handling
- update dependencies to fix issus on Windows
- fix failed test
- Hide warning on successful authentication
- Remove unneeded extern crate from examples/new_releases.rs
- Changes to Spotify.user_playlist and Spotify.playlist methods
- add new field
Unknown
forDeviceType
enum
- update reqwest to 0.9
- add debug and clone derives to spotify client and credentials
- Change state field for authorization URL to have default
- Fix show_dialog field to be checked before setting true _ Fix typo in show_dialog
- rspotify first release, Cheers!