Update user-agent.

This commit is contained in:
Kavin 2023-08-12 12:05:51 +01:00
parent 784a837762
commit 057e32b6aa
No known key found for this signature in database
GPG Key ID: 6E4598CA5C92C41F
2 changed files with 2 additions and 5 deletions

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

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