piped-rust-sdk/examples/playlist.rs
Schmiddiii 8a7a87824f
More cleanup (#2)
* Make functions take references, moved user agent into lib

* Improved error handling
2021-10-06 11:19:11 +01:00

19 lines
411 B
Rust

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