Skip to content

Commit

Permalink
Merge pull request #82 from ramsayleung/ramsay/support-for-async-await
Browse files Browse the repository at this point in the history
Add async/await
  • Loading branch information
ramsayleung authored Feb 27, 2020
2 parents f35504d + a4be156 commit 22a995a
Show file tree
Hide file tree
Showing 155 changed files with 6,391 additions and 800 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
.tern-port
cmake-build-debug
*/.test_token
Cargo.lock
Cargo.lock
.DS_Store
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 0.9 (2020/02/28)

- Adds `async/await` support.
- Keeps the previous synchronous API, enabled by extra feature `blocking`, disabled by default.
- Shorten the import path.
- Add missing `Show` and `Episode` types.

## 0.8 (2020/01/30)

- Provide more informational error strings for API.
Expand Down
337 changes: 335 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
authors = ["Ramsay Leung <[email protected]>"]
name = "rspotify"
version = "0.8.0"
version = "0.9.0"
license = "MIT"
readme = "README.md"
description="Spotify API wrapper"
Expand All @@ -19,7 +19,7 @@ log = "0.4"
percent-encoding = "1.0.1"
rand = "0.6.5"
random = "0.12.2"
reqwest ={ version = "0.10.1", features=["json","blocking","socks"]}
reqwest = { version = "0.10", features = ["json", "socks"] }
serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0"
Expand All @@ -31,3 +31,336 @@ failure = "0.1"
[dependencies.chrono]
features = ["serde", "rustc-serialize"]
version = "0.4"

[dev-dependencies]
tokio = { version = "0.2", features = ["full"] }
futures = "0.3"

[features]
blocking = []

[[example]]
name = "device"
required-features = ["blocking"]
path = "examples/blocking/device.rs"

[[example]]
name = "artist_top_tracks"
required-features = ["blocking"]
path = "examples/blocking/artist_top_tracks.rs"

[[example]]
name = "categories"
required-features = ["blocking"]
path = "examples/blocking/categories.rs"

[[example]]
name = "current_playback"
required-features = ["blocking"]
path = "examples/blocking/current_playback.rs"


[[example]]
name = "current_playing"
required-features = ["blocking"]
path = "examples/blocking/current_playing.rs"


[[example]]
name = "current_user_followed_artists"
required-features = ["blocking"]
path = "examples/blocking/current_user_followed_artists.rs"


[[example]]
name = "current_user_playing_track"
required-features = ["blocking"]
path = "examples/blocking/current_user_playing_track.rs"


[[example]]
name = "current_user_playlists"
required-features = ["blocking"]
path = "examples/blocking/current_user_playlists.rs"


[[example]]
name = "current_user_recently_played"
required-features = ["blocking"]
path = "examples/blocking/current_user_recently_played.rs"


[[example]]
name = "current_user_saved_albums_add"
required-features = ["blocking"]
path = "examples/blocking/current_user_saved_albums_add.rs"


[[example]]
name = "current_user_saved_albums_contains"
required-features = ["blocking"]
path = "examples/blocking/current_user_saved_albums_contains.rs"


[[example]]
name = "current_user_saved_albums_delete"
required-features = ["blocking"]
path = "examples/blocking/current_user_saved_albums_delete.rs"


[[example]]
name = "current_user_saved_albums"
required-features = ["blocking"]
path = "examples/blocking/current_user_saved_albums.rs"


[[example]]
name = "current_user_saved_tracks_add"
required-features = ["blocking"]
path = "examples/blocking/current_user_saved_tracks_add.rs"


[[example]]
name = "current_user_saved_tracks_contains"
required-features = ["blocking"]
path = "examples/blocking/current_user_saved_tracks_contains.rs"


[[example]]
name = "current_user_saved_tracks_delete"
required-features = ["blocking"]
path = "examples/blocking/current_user_saved_tracks_delete.rs"


[[example]]
name = "current_user_saved_tracks"
required-features = ["blocking"]
path = "examples/blocking/current_user_saved_tracks.rs"


[[example]]
name = "current_user_top_artists"
required-features = ["blocking"]
path = "examples/blocking/current_user_top_artists.rs"


[[example]]
name = "current_user_top_tracks"
required-features = ["blocking"]
path = "examples/blocking/current_user_top_tracks.rs"


[[example]]
name = "featured_playlists"
required-features = ["blocking"]
path = "examples/blocking/featured_playlists.rs"


[[example]]
name = "me"
required-features = ["blocking"]
path = "examples/blocking/me.rs"


[[example]]
name = "new_releases"
required-features = ["blocking"]
path = "examples/blocking/new_releases.rs"


[[example]]
name = "next_playback"
required-features = ["blocking"]
path = "examples/blocking/next_playback.rs"


[[example]]
name = "pause_playback"
required-features = ["blocking"]
path = "examples/blocking/pause_playback.rs"


[[example]]
name = "playlist"
required-features = ["blocking"]
path = "examples/blocking/playlist.rs"


[[example]]
name = "previous_playback"
required-features = ["blocking"]
path = "examples/blocking/previous_playback.rs"


[[example]]
name = "recommendations"
required-features = ["blocking"]
path = "examples/blocking/recommendations.rs"


[[example]]
name = "repeat"
required-features = ["blocking"]
path = "examples/blocking/repeat.rs"


[[example]]
name = "search_album"
required-features = ["blocking"]
path = "examples/blocking/search_album.rs"


[[example]]
name = "search_artist"
required-features = ["blocking"]
path = "examples/blocking/search_artist.rs"


[[example]]
name = "search_playlist"
required-features = ["blocking"]
path = "examples/blocking/search_playlist.rs"


[[example]]
name = "search_track"
required-features = ["blocking"]
path = "examples/blocking/search_track.rs"


[[example]]
name = "seek_track"
required-features = ["blocking"]
path = "examples/blocking/seek_track.rs"


[[example]]
name = "shuffle"
required-features = ["blocking"]
path = "examples/blocking/shuffle.rs"


[[example]]
name = "start_playback"
required-features = ["blocking"]
path = "examples/blocking/start_playback.rs"


[[example]]
name = "transfer_playback"
required-features = ["blocking"]
path = "examples/blocking/transfer_playback.rs"


[[example]]
name = "user_artist_check_follow"
required-features = ["blocking"]
path = "examples/blocking/user_artist_check_follow.rs"


[[example]]
name = "user_follow_artists"
required-features = ["blocking"]
path = "examples/blocking/user_follow_artists.rs"


[[example]]
name = "user_follow_users"
required-features = ["blocking"]
path = "examples/blocking/user_follow_users.rs"


[[example]]
name = "user_playlist_add_tracks"
required-features = ["blocking"]
path = "examples/blocking/user_playlist_add_tracks.rs"


[[example]]
name = "user_playlist_change_detail"
required-features = ["blocking"]
path = "examples/blocking/user_playlist_change_detail.rs"


[[example]]
name = "user_playlist_check_follow"
required-features = ["blocking"]
path = "examples/blocking/user_playlist_check_follow.rs"


[[example]]
name = "user_playlist_create"
required-features = ["blocking"]
path = "examples/blocking/user_playlist_create.rs"


[[example]]
name = "user_playlist_follow_playlist"
required-features = ["blocking"]
path = "examples/blocking/user_playlist_follow_playlist.rs"


[[example]]
name = "user_playlist_recorder_tracks"
required-features = ["blocking"]
path = "examples/blocking/user_playlist_recorder_tracks.rs"


[[example]]
name = "user_playlist_remove_all_occurrences_of_tracks"
required-features = ["blocking"]
path = "examples/blocking/user_playlist_remove_all_occurrences_of_tracks.rs"


[[example]]
name = "user_playlist_remove_specific_occurrenes_of_tracks"
required-features = ["blocking"]
path = "examples/blocking/user_playlist_remove_specific_occurrenes_of_tracks.rs"


[[example]]
name = "user_playlist_replace_tracks"
required-features = ["blocking"]
path = "examples/blocking/user_playlist_replace_tracks.rs"


[[example]]
name = "user_playlist"
required-features = ["blocking"]
path = "examples/blocking/user_playlist.rs"


[[example]]
name = "user_playlists"
required-features = ["blocking"]
path = "examples/blocking/user_playlists.rs"


[[example]]
name = "user_playlist_tracks"
required-features = ["blocking"]
path = "examples/blocking/user_playlist_tracks.rs"


[[example]]
name = "user_playlist_unfollow"
required-features = ["blocking"]
path = "examples/blocking/user_playlist_unfollow.rs"


[[example]]
name = "user_unfollow_artists"
required-features = ["blocking"]
path = "examples/blocking/user_unfollow_artists.rs"


[[example]]
name = "user_unfollow_users"
required-features = ["blocking"]
path = "examples/blocking/user_unfollow_users.rs"


[[example]]
name = "volume"
required-features = ["blocking"]
path = "examples/blocking/volume.rs"
Loading

0 comments on commit 22a995a

Please sign in to comment.