Skip to content

tsirysndr/spotify-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spotify-rs

License: BSD Twitter: tsiry_sndr

spotify-rs is a Rust client library for accessing the Spotify API

Install

[dependencies]
spotify-rs = { git = "https://github.com/tsirysndr/spotify-rs" }

Usage

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);
}

Author

👤 Tsiry Sandratraina

Show your support

Give a ⭐️ if this project helped you!

Releases

No releases published

Packages

No packages published

Languages