mirror of
https://github.com/TeamPiped/piped-rust-sdk.git
synced 2024-08-14 23:56:06 +00:00
General Cleanup (#1)
- Split large lib-file into smaller files - Renamed getters to follow rust naming convention - Pretty debug print in examples - No hardcoded dependency versions in lib
This commit is contained in:
parent
125fdee6c2
commit
412a8ffa52
10 changed files with 310 additions and 314 deletions
|
@ -1,4 +1,4 @@
|
|||
use piped::piped::PipedClient;
|
||||
use piped::PipedClient;
|
||||
use reqwest::ClientBuilder;
|
||||
|
||||
#[tokio::main]
|
||||
|
@ -13,9 +13,9 @@ async fn main() {
|
|||
let client = PipedClient::new(httpclient, instance);
|
||||
|
||||
let channel = client
|
||||
.get_channel_from_id("UCXuqSBlHAE6Xw-yeJA0Tunw".to_string())
|
||||
.channel_from_id("UCXuqSBlHAE6Xw-yeJA0Tunw".to_string())
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
println!("{:?}", channel);
|
||||
println!("{:#?}", channel);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use piped::piped::PipedClient;
|
||||
use piped::PipedClient;
|
||||
use reqwest::ClientBuilder;
|
||||
|
||||
#[tokio::main]
|
||||
|
@ -13,9 +13,9 @@ async fn main() {
|
|||
let client = PipedClient::new(httpclient, instance);
|
||||
|
||||
let comments = client
|
||||
.get_comments_from_id("__hYx6ZzFbQ".to_string())
|
||||
.comments_from_id("__hYx6ZzFbQ".to_string())
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
println!("{:?}", comments);
|
||||
println!("{:#?}", comments);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use piped::piped::PipedClient;
|
||||
use piped::PipedClient;
|
||||
use reqwest::ClientBuilder;
|
||||
|
||||
#[tokio::main]
|
||||
|
@ -13,9 +13,9 @@ async fn main() {
|
|||
let client = PipedClient::new(httpclient, instance);
|
||||
|
||||
let playlist = client
|
||||
.get_playlist_from_id("PLQSoWXSpjA38FIQCvwnVNPlGPVA63WTD8".to_string())
|
||||
.playlist_from_id("PLQSoWXSpjA38FIQCvwnVNPlGPVA63WTD8".to_string())
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
println!("{:?}", playlist);
|
||||
println!("{:#?}", playlist);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use piped::piped::PipedClient;
|
||||
use piped::PipedClient;
|
||||
use reqwest::ClientBuilder;
|
||||
|
||||
#[tokio::main]
|
||||
|
@ -13,9 +13,9 @@ async fn main() {
|
|||
let client = PipedClient::new(httpclient, instance);
|
||||
|
||||
let suggestions = client
|
||||
.get_search_suggestions("techlore".to_string())
|
||||
.search_suggestions("techlore".to_string())
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
println!("{:?}", suggestions);
|
||||
println!("{:#?}", suggestions);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use piped::piped::PipedClient;
|
||||
use piped::PipedClient;
|
||||
use reqwest::ClientBuilder;
|
||||
|
||||
#[tokio::main]
|
||||
|
@ -12,7 +12,7 @@ async fn main() {
|
|||
|
||||
let client = PipedClient::new(httpclient, instance);
|
||||
|
||||
let streams = client.get_trending("US".to_string()).await.unwrap();
|
||||
let streams = client.trending("US".to_string()).await.unwrap();
|
||||
|
||||
println!("{:?}", streams);
|
||||
println!("{:#?}", streams);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use piped::piped::PipedClient;
|
||||
use piped::PipedClient;
|
||||
use reqwest::ClientBuilder;
|
||||
|
||||
#[tokio::main]
|
||||
|
@ -13,9 +13,9 @@ async fn main() {
|
|||
let client = PipedClient::new(httpclient, instance);
|
||||
|
||||
let video = client
|
||||
.get_video_from_id("__hYx6ZzFbQ".to_string())
|
||||
.video_from_id("__hYx6ZzFbQ".to_string())
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
println!("{:?}", video);
|
||||
println!("{:#?}", video);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue