Compare commits
6 Commits
ebf5364cc2
...
caffeddcb6
Author | SHA1 | Date |
---|---|---|
renovate[bot] | caffeddcb6 | |
Kavin | 0c01bab17a | |
Kavin | 5394ad6eff | |
Kavin | 057e32b6aa | |
Kavin | 784a837762 | |
Kavin | 9f05aa2cb6 |
|
@ -1,2 +1,3 @@
|
|||
/target
|
||||
Cargo.lock
|
||||
.idea/
|
||||
|
|
|
@ -6,8 +6,8 @@ version = "0.0.0"
|
|||
|
||||
[dev-dependencies]
|
||||
piped = {path = "../piped"}
|
||||
reqwest = "0.11.4"
|
||||
tokio = {version = "1.12.0", features = ["macros", "rt-multi-thread"]}
|
||||
reqwest = "^0.11"
|
||||
tokio = {version = "1", features = ["macros", "rt-multi-thread"]}
|
||||
|
||||
[[example]]
|
||||
name = "channel"
|
||||
|
|
|
@ -10,10 +10,7 @@ async fn main() {
|
|||
|
||||
let client = PipedClient::new(&httpclient, INSTANCE);
|
||||
|
||||
let videos = client
|
||||
.bulk_feed(CHANNELS)
|
||||
.await
|
||||
.unwrap();
|
||||
let videos = client.bulk_feed(CHANNELS).await.unwrap();
|
||||
|
||||
println!("{:#?}", videos);
|
||||
}
|
||||
|
|
|
@ -6,12 +6,12 @@ keywords = ["youtube"]
|
|||
license = "GPL-3.0"
|
||||
name = "piped"
|
||||
repository = "https://github.com/TeamPiped/piped-rust-sdk"
|
||||
version = "0.0.3"
|
||||
version = "0.0.4"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
reqwest = "^0.11"
|
||||
reqwest = { version = "^0.11", default-features = false }
|
||||
serde = {version = "^1.0", features = ["derive"]}
|
||||
serde_json = "^1.0"
|
||||
url = "^2.2"
|
||||
|
|
|
@ -9,7 +9,7 @@ pub struct PipedClient {
|
|||
pub instance: String,
|
||||
}
|
||||
|
||||
const USER_AGENT: &str = "Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0";
|
||||
const USER_AGENT: &str = concat!("piped-rust-sdk/{}", env!("CARGO_PKG_VERSION"));
|
||||
|
||||
impl PipedClient {
|
||||
pub fn new<S: AsRef<str>>(httpclient: &Client, instance: S) -> PipedClient {
|
||||
|
|
Loading…
Reference in New Issue