piped-rust-sdk/examples/playlist.rs

19 lines
411 B
Rust
Raw Normal View History

use piped::PipedClient;
use reqwest::Client;
const INSTANCE: &'static str = "https://pipedapi.kavin.rocks";
2021-04-29 16:41:32 +00:00
#[tokio::main]
async fn main() {
let httpclient = Client::new();
2021-04-29 16:41:32 +00:00
let client = PipedClient::new(&httpclient, INSTANCE);
2021-04-29 16:41:32 +00:00
let playlist = client
.playlist_from_id("PLQSoWXSpjA38FIQCvwnVNPlGPVA63WTD8".to_string())
2021-04-29 16:41:32 +00:00
.await
.unwrap();
println!("{:#?}", playlist);
2021-04-29 16:41:32 +00:00
}