mirror of
https://github.com/TeamPiped/piped-rust-sdk.git
synced 2024-08-14 23:56:06 +00:00
Bulk feed loading
This commit is contained in:
parent
23f987f100
commit
e1051004e6
4 changed files with 50 additions and 2 deletions
|
@ -36,3 +36,7 @@ path = "search_channel.rs"
|
|||
[[example]]
|
||||
name = "comments"
|
||||
path = "comments.rs"
|
||||
|
||||
[[example]]
|
||||
name = "bulk_feed"
|
||||
path = "bulk_feed.rs"
|
||||
|
|
19
examples/bulk_feed.rs
Normal file
19
examples/bulk_feed.rs
Normal file
|
@ -0,0 +1,19 @@
|
|||
use piped::PipedClient;
|
||||
use reqwest::Client;
|
||||
|
||||
const INSTANCE: &'static str = "https://pipedapi.kavin.rocks";
|
||||
const CHANNELS: &[&str; 2] = &["UCXuqSBlHAE6Xw-yeJA0Tunw", "UCdBK94H6oZT2Q7l0-b0xmMg"];
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
let httpclient = Client::new();
|
||||
|
||||
let client = PipedClient::new(&httpclient, INSTANCE);
|
||||
|
||||
let videos = client
|
||||
.bulk_feed(CHANNELS)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
println!("{:#?}", videos);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue