piped-rust-sdk/examples/video.rs

19 lines
379 B
Rust
Raw Permalink Normal View History

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