From 9e32ec42e1847da74940278e717768ab36f5abf5 Mon Sep 17 00:00:00 2001 From: C0D3 M4513R <28912031+C0D3-M4513R@users.noreply.github.com> Date: Mon, 25 Nov 2024 18:30:03 +0100 Subject: [PATCH] Fix user agent (#32) Co-authored-by: jellejurre --- README.md | 2 +- examples/cookies_load.rs | 2 +- examples/cookies_store.rs | 2 +- examples/example.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3591306..56b7e48 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Put the package under your project folder and add the following to `Cargo.toml` vrchatapi = "^1.0" ``` -See the [examples/online.rs](https://github.com/vrchatapi/vrchatapi-rust/blob/main/examples/online.rs) for getting started. +See the [examples/example.rs](https://github.com/vrchatapi/vrchatapi-rust/blob/main/examples/example.rs) for getting started. ## Contributing diff --git a/examples/cookies_load.rs b/examples/cookies_load.rs index 6f954ba..d43351c 100644 --- a/examples/cookies_load.rs +++ b/examples/cookies_load.rs @@ -9,7 +9,7 @@ use vrchatapi::models::EitherUserOrTwoFactor; async fn main() { let mut config = apis::configuration::Configuration::default(); config.basic_auth = Some((String::from("username"), Some(String::from("password")))); - config.user_agent = Some(String::from("ProjectName/0.0.1 email@example.com")); + config.user_agent = Some(String::from("ExampleProgram/0.0.1 my@email.com")); let mut jar = reqwest::cookie::Jar::default(); jar.set_cookies( diff --git a/examples/cookies_store.rs b/examples/cookies_store.rs index 52e58a0..f1547e7 100644 --- a/examples/cookies_store.rs +++ b/examples/cookies_store.rs @@ -9,7 +9,7 @@ use vrchatapi::models::{EitherUserOrTwoFactor, TwoFactorAuthCode, TwoFactorEmail async fn main() { let mut config = apis::configuration::Configuration::default(); config.basic_auth = Some((String::from("username"), Some(String::from("password")))); - config.user_agent = Some(String::from("ProjectName/0.0.1 email@example.com")); + config.user_agent = Some(String::from("ExampleProgram/0.0.1 my@email.com")); let cookie_store = std::sync::Arc::new(reqwest::cookie::Jar::default()); config.client = reqwest::Client::builder() diff --git a/examples/example.rs b/examples/example.rs index 39fb5da..a29acdc 100644 --- a/examples/example.rs +++ b/examples/example.rs @@ -6,7 +6,7 @@ use vrchatapi::models::{EitherUserOrTwoFactor, TwoFactorAuthCode, TwoFactorEmail async fn main() { let mut config = apis::configuration::Configuration::default(); config.basic_auth = Some((String::from("username"), Some(String::from("password")))); - config.user_agent = Some(String::from("ProjectName/0.0.1 email@example.com")); + config.user_agent = Some(String::from("ExampleProgram/0.0.1 my@email.com")); match apis::authentication_api::get_current_user(&config) .await .unwrap()