From 014dd0fe58e46dae696cc80f976f01d70b862663 Mon Sep 17 00:00:00 2001 From: VRCCat Date: Mon, 10 Oct 2022 09:16:33 +0000 Subject: [PATCH] Upgrade Rust SDK to spec 1.7.5 --- Cargo.toml | 2 +- docs/AuthenticationApi.md | 2 +- docs/World.md | 1 - src/apis/authentication_api.rs | 2 +- src/models/world.rs | 6 +----- 5 files changed, 4 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index cc66c63..18ce1fe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vrchatapi" -version = "1.7.4" +version = "1.7.5" authors = ["OpenAPI Generator team and contributors"] license = "MIT" edition = "2018" diff --git a/docs/AuthenticationApi.md b/docs/AuthenticationApi.md index dac6fbe..1a6c241 100644 --- a/docs/AuthenticationApi.md +++ b/docs/AuthenticationApi.md @@ -82,7 +82,7 @@ Name | Type | Description | Required | Notes > crate::models::CurrentUser get_current_user() Login and/or Get Current User Info -This endpoint does the following two operations: 1) Checks if you are already logged in by looking for a valid `auth` cookie. If you are have a valid auth cookie then no additional auth-related actions are taken. If you are **not** logged in then it will log you in with the `Authorization` header and set the `auth` cookie. The `auth` cookie will only be sent once. 2) If logged in, this function will also return the CurrentUser object containing detailed information about the currently logged in user. **WARNING: Session Limit:** Each authentication with login credentials counts as a separate session, out of which you have a limited amount. Make sure to save and reuse the `auth` cookie if you are often restarting the program. The provided API libraries automatically save cookies during runtime, but does not persist during restart. While it can be fine to use username/password during development, expect in production to very fast run into the rate-limit and be temporarily blocked from making new sessions until older ones expire. The exact number of simultaneous sessions is unknown/undisclosed. +This endpoint does the following two operations: 1) Checks if you are already logged in by looking for a valid `auth` cookie. If you are have a valid auth cookie then no additional auth-related actions are taken. If you are **not** logged in then it will log you in with the `Authorization` header and set the `auth` cookie. The `auth` cookie will only be sent once. 2) If logged in, this function will also return the CurrentUser object containing detailed information about the currently logged in user. The auth string after `Authorization: Basic {string}` is a base64-encoded string of the username and password, both individually url-encoded, and then joined with a colon. > base64(urlencode(username):urlencode(password)) **WARNING: Session Limit:** Each authentication with login credentials counts as a separate session, out of which you have a limited amount. Make sure to save and reuse the `auth` cookie if you are often restarting the program. The provided API libraries automatically save cookies during runtime, but does not persist during restart. While it can be fine to use username/password during development, expect in production to very fast run into the rate-limit and be temporarily blocked from making new sessions until older ones expire. The exact number of simultaneous sessions is unknown/undisclosed. ### Parameters diff --git a/docs/World.md b/docs/World.md index c6339c9..1806ca4 100644 --- a/docs/World.md +++ b/docs/World.md @@ -4,7 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**asset_url** | **String** | Empty if unauthenticated. | **author_id** | **String** | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. | **author_name** | **String** | | **capacity** | **i32** | | diff --git a/src/apis/authentication_api.rs b/src/apis/authentication_api.rs index 3224edc..6f1c0b5 100644 --- a/src/apis/authentication_api.rs +++ b/src/apis/authentication_api.rs @@ -138,7 +138,7 @@ pub fn delete_user(configuration: &configuration::Configuration, user_id: &str) } } -/// This endpoint does the following two operations: 1) Checks if you are already logged in by looking for a valid `auth` cookie. If you are have a valid auth cookie then no additional auth-related actions are taken. If you are **not** logged in then it will log you in with the `Authorization` header and set the `auth` cookie. The `auth` cookie will only be sent once. 2) If logged in, this function will also return the CurrentUser object containing detailed information about the currently logged in user. **WARNING: Session Limit:** Each authentication with login credentials counts as a separate session, out of which you have a limited amount. Make sure to save and reuse the `auth` cookie if you are often restarting the program. The provided API libraries automatically save cookies during runtime, but does not persist during restart. While it can be fine to use username/password during development, expect in production to very fast run into the rate-limit and be temporarily blocked from making new sessions until older ones expire. The exact number of simultaneous sessions is unknown/undisclosed. +/// This endpoint does the following two operations: 1) Checks if you are already logged in by looking for a valid `auth` cookie. If you are have a valid auth cookie then no additional auth-related actions are taken. If you are **not** logged in then it will log you in with the `Authorization` header and set the `auth` cookie. The `auth` cookie will only be sent once. 2) If logged in, this function will also return the CurrentUser object containing detailed information about the currently logged in user. The auth string after `Authorization: Basic {string}` is a base64-encoded string of the username and password, both individually url-encoded, and then joined with a colon. > base64(urlencode(username):urlencode(password)) **WARNING: Session Limit:** Each authentication with login credentials counts as a separate session, out of which you have a limited amount. Make sure to save and reuse the `auth` cookie if you are often restarting the program. The provided API libraries automatically save cookies during runtime, but does not persist during restart. While it can be fine to use username/password during development, expect in production to very fast run into the rate-limit and be temporarily blocked from making new sessions until older ones expire. The exact number of simultaneous sessions is unknown/undisclosed. pub fn get_current_user(configuration: &configuration::Configuration, ) -> Result> { let local_var_configuration = configuration; diff --git a/src/models/world.rs b/src/models/world.rs index b3d2e28..846bdcc 100644 --- a/src/models/world.rs +++ b/src/models/world.rs @@ -11,9 +11,6 @@ #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct World { - /// Empty if unauthenticated. - #[serde(rename = "assetUrl")] - pub asset_url: String, /// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. #[serde(rename = "authorId")] pub author_id: String, @@ -76,9 +73,8 @@ pub struct World { } impl World { - pub fn new(asset_url: String, author_id: String, author_name: String, capacity: i32, created_at: String, description: String, featured: bool, heat: i32, id: String, image_url: String, labs_publication_date: String, name: String, namespace: String, organization: String, popularity: i32, publication_date: String, release_status: crate::models::ReleaseStatus, tags: Vec, thumbnail_image_url: String, unity_packages: Vec, updated_at: String, version: i32, visits: i32) -> World { + pub fn new(author_id: String, author_name: String, capacity: i32, created_at: String, description: String, featured: bool, heat: i32, id: String, image_url: String, labs_publication_date: String, name: String, namespace: String, organization: String, popularity: i32, publication_date: String, release_status: crate::models::ReleaseStatus, tags: Vec, thumbnail_image_url: String, unity_packages: Vec, updated_at: String, version: i32, visits: i32) -> World { World { - asset_url, author_id, author_name, capacity,