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