Crates.io | youtube-music |
lib.rs | youtube-music |
version | 2.2.1 |
source | src |
created_at | 2022-10-03 17:50:56.99247 |
updated_at | 2024-06-22 09:20:11.044926 |
description | A library for fetching Youtube Music metadata |
homepage | |
repository | https://github.com/jakubslaby09/rust-ytmapi |
max_upload_size | |
id | 679209 |
size | 27,394 |
currently, these features are included:
this library was inspired by youtube-music-api written in javascript
// Request configs from youtube music
let client = Client::init().await.unwrap();
// Get an album from the first artist in the search results
let album = client.search_artists("Tři sestry").await.unwrap()
[0].request(&client).await.unwrap()
.albums[0].request(&client).await.unwrap();
println!("first album: {:#?}", album);
// Request configs from youtube music
let client = Client::init().await.unwrap();
// Get an album from the first artist in the search results
// Search for an artist
let search_results = client.search_artists(QUERY).await.unwrap();
// Get the first result
let artist = client.get_artist(&search_results[0].browse_id).await.unwrap();
// Get it's first album
let album = client.get_album(&artist.albums[0].browse_id).await.unwrap();
println!("first album: {:#?}", album);