Skip to content

Commit

Permalink
Fix user agent (#32)
Browse files Browse the repository at this point in the history
Co-authored-by: jellejurre <[email protected]>
  • Loading branch information
C0D3-M4513R and jellejurre authored Nov 25, 2024
1 parent 2b1bd59 commit 9e32ec4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion examples/cookies_load.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion examples/cookies_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion examples/example.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 9e32ec4

Please sign in to comment.