Compare commits

...

6 Commits

Author SHA1 Message Date
renovate[bot] caffeddcb6
Merge 0fdc0423d1 into 0c01bab17a 2023-08-13 17:31:44 +00:00
Kavin 0c01bab17a
Don't include any features in reqwest by default. 2023-08-12 12:08:00 +01:00
Kavin 5394ad6eff
Bump version. 2023-08-12 12:06:18 +01:00
Kavin 057e32b6aa
Update user-agent. 2023-08-12 12:05:51 +01:00
Kavin 784a837762
Update dependencies. 2023-08-12 12:04:53 +01:00
Kavin 9f05aa2cb6
Ignore idea files. 2023-08-12 12:04:41 +01:00
5 changed files with 7 additions and 9 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
/target
Cargo.lock
.idea/

View File

@ -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"

View File

@ -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);
}

View File

@ -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"

View File

@ -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 {