Home
Head's Up: I'm in the middle of upgrading my site. Most things are in place, but there are something missing and/or broken including image alt text. Please bear with me while I'm getting things fixed.

Get Spotiry Track Analysis From The API In Rust

rust
//! ```cargo
//! [dependencies]
//! rspotify = { version = "0.12.0", default-features = false, features = ["client-ureq", "ureq-rustls-tls", "env-file"] }
//! ```

use rspotify::{model::TrackId, prelude::*, ClientCredsSpotify, Credentials};

fn main() {
    let creds = Credentials::from_env().unwrap();
    let spotify = ClientCredsSpotify::new(creds);
    spotify.request_token().unwrap();
    let track_id = TrackId::from_uri("spotify:track:4rc6aeLJCWqZ3GBW5rU1P1").unwrap();
    let track = spotify.track_analysis(track_id);
    dbg!(track.ok());
}
results start