spotify-rs is a Rust client library for accessing the Spotify API
[dependencies]
spotify-rs = { git = "https://github.com/tsirysndr/spotify-rs" }
Construct a new Spotify client, then use the various services on the client to access different parts of the Spotify API. For example:
use spotify_rs::Spotify;
#[tokio::main]
async fn main() {
const ACCESS_TOKEN: &str = "<YOUR ACCESS TOKEN>";
let client = Spotify::new(ACCESS_TOKEN);
let album = client.album.get("382ObEPsp2rxGrnsizN5TX").await;
let results = client.search.get("Muse", "track,artist", 50, 0).await;
println!("{:#?}\n", album);
println!("{:#?}\n", results);
}
👤 Tsiry Sandratraina
- Website: https://tsiry-sandratraina.netlify.com
- Twitter: @tsiry_sndr
- Github: @tsirysndr
Give a ⭐️ if this project helped you!