piped-rust-sdk/examples/channel.rs

19 lines
398 B
Rust
Raw Permalink Normal View History

use piped::PipedClient;
use reqwest::Client;
const INSTANCE: &'static str = "https://pipedapi.kavin.rocks";
2021-04-29 15:26:18 +00:00
#[tokio::main]
async fn main() {
let httpclient = Client::new();
2021-04-29 15:26:18 +00:00
let client = PipedClient::new(&httpclient, INSTANCE);
2021-04-29 15:26:18 +00:00
let channel = client
.channel_from_id("UCXuqSBlHAE6Xw-yeJA0Tunw".to_string())
2021-04-29 15:26:18 +00:00
.await
.unwrap();
println!("{:#?}", channel);
2021-04-29 15:26:18 +00:00
}