13 releases

0.13.3 Aug 29, 2024
0.13.2 Jun 4, 2024
0.13.1 Apr 2, 2024
0.13.0 Mar 8, 2024
0.11.3 Nov 29, 2021

#916 in Audio

Download history 987/week @ 2024-08-17 1229/week @ 2024-08-24 1189/week @ 2024-08-31 1105/week @ 2024-09-07 1231/week @ 2024-09-14 1192/week @ 2024-09-21 1216/week @ 2024-09-28 901/week @ 2024-10-05 1267/week @ 2024-10-12 1226/week @ 2024-10-19 1334/week @ 2024-10-26 1314/week @ 2024-11-02 773/week @ 2024-11-09 1005/week @ 2024-11-16 1203/week @ 2024-11-23 1500/week @ 2024-11-30

4,639 downloads per month
Used in 21 crates (3 directly)

MIT license

8KB

Continuous Integration License Crates.io Docs

RSpotify

RSpotify is a wrapper for the Spotify Web API, inspired by spotipy. It includes support for all the authorization flows, and helper functions for all endpoints.

To learn how to use RSpotify, please refer to the documentation. There are some examples that may be useful as well.

Changelog

Please see the changelog for a release history and indications on how to upgrade from one version to another.

Contributing

If you find any problems or have suggestions about this crate, please submit an issue. Moreover, any pull request, code review and feedback are welcome.

Code Guide

We use GitHub Actions to make sure the codebase is consistent (cargo fmt) and continuously tested (cargo test). We try to keep comments at a maximum of 80 characters of length (which isn't automatically checked by cargo fmt) and code at 120.

Trait Hierarchy

Crate Hierarchy

Building

RSpotify uses maybe_async to switch between async and blocking clients, which is triggered inside Cargo.toml. So that must be taken into account when building rspotify. Read the Configuration section in the docs for more information about how to build with custom TLS implementations, and more.

client-reqwest is used by default. It should be as easy as

$ cargo build

client-ureq is also available as the blocking interface, which compiles RSpotify with ureq (a TLS has to be specified as well):

$ cargo build --no-default-features --features client-ureq,ureq-rustls-tls

Notice that you can't build rspotify with all features like this:

$ cargo build --all-features

Because in order to switch between clients, the different clients have to implement the same base trait in src/http/mod.rs, so if you build with all features, you'll get duplicate definitions error. As every coin has two sides, you can only have one side at a time, not all sides of it.

WASM support

RSpotify supports building for the wasm32-unknown-unknown target. It should be as easy as:

$ cargo build --target wasm32-unknown-unknown

Refer to the documentation for more details

License

MIT

No runtime deps