Upgrade Rust SDK to spec 1.4.2

This commit is contained in:
Foorack
2021-10-28 19:39:07 +00:00
parent 699637bbe1
commit c8991f4ab9
70 changed files with 467 additions and 382 deletions

View File

@ -1 +1 @@
5.3.0-SNAPSHOT 5.3.0

View File

@ -1,6 +1,6 @@
[package] [package]
name = "vrchatapi" name = "vrchatapi"
version = "1.0.0" version = "1.4.2"
authors = ["OpenAPI Generator team and contributors"] authors = ["OpenAPI Generator team and contributors"]
license = "MIT" license = "MIT"
edition = "2018" edition = "2018"

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
# #
# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" # Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
git_user_id=$1 git_user_id=$1
git_repo_id=$2 git_repo_id=$2
@ -38,14 +38,14 @@ git add .
git commit -m "$release_note" git commit -m "$release_note"
# Sets the new remote # Sets the new remote
git_remote=`git remote` git_remote=$(git remote)
if [ "$git_remote" = "" ]; then # git remote not defined if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
else else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
fi fi
fi fi
@ -55,4 +55,3 @@ git pull origin master
# Pushes (Forces) the changes in the local repository up to the remote repository # Pushes (Forces) the changes in the local repository up to the remote repository
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
git push origin master 2>&1 | grep -v 'To https' git push origin master 2>&1 | grep -v 'To https'

View File

@ -13,7 +13,7 @@ use crate::apis::ResponseContent;
use super::{Error, configuration}; use super::{Error, configuration};
/// struct for typed errors of method `check_user_exists` /// struct for typed errors of method [`check_user_exists`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum CheckUserExistsError { pub enum CheckUserExistsError {
@ -21,7 +21,7 @@ pub enum CheckUserExistsError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `delete_user` /// struct for typed errors of method [`delete_user`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum DeleteUserError { pub enum DeleteUserError {
@ -29,7 +29,7 @@ pub enum DeleteUserError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `get_current_user` /// struct for typed errors of method [`get_current_user`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetCurrentUserError { pub enum GetCurrentUserError {
@ -37,7 +37,7 @@ pub enum GetCurrentUserError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `logout` /// struct for typed errors of method [`logout`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum LogoutError { pub enum LogoutError {
@ -45,7 +45,7 @@ pub enum LogoutError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `verify2_fa` /// struct for typed errors of method [`verify2_fa`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum Verify2FaError { pub enum Verify2FaError {
@ -53,7 +53,7 @@ pub enum Verify2FaError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `verify_auth_token` /// struct for typed errors of method [`verify_auth_token`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum VerifyAuthTokenError { pub enum VerifyAuthTokenError {
@ -61,7 +61,7 @@ pub enum VerifyAuthTokenError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `verify_recovery_code` /// struct for typed errors of method [`verify_recovery_code`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum VerifyRecoveryCodeError { pub enum VerifyRecoveryCodeError {
@ -72,10 +72,11 @@ pub enum VerifyRecoveryCodeError {
/// Checks if a user by a given `username`, `displayName` or `email` exist. This is used during registration to check if a username has already been taken, during change of displayName to check if a displayName is available, and during change of email to check if the email is already used. In the later two cases the `excludeUserId` is used to exclude oneself, otherwise the result would always be true. It is **REQUIRED** to include **AT LEAST** `username`, `displayName` **or** `email` query parameter. Although they can be combined - in addition with `excludeUserId` (generally to exclude yourself) - to further fine-tune the search. /// Checks if a user by a given `username`, `displayName` or `email` exist. This is used during registration to check if a username has already been taken, during change of displayName to check if a displayName is available, and during change of email to check if the email is already used. In the later two cases the `excludeUserId` is used to exclude oneself, otherwise the result would always be true. It is **REQUIRED** to include **AT LEAST** `username`, `displayName` **or** `email` query parameter. Although they can be combined - in addition with `excludeUserId` (generally to exclude yourself) - to further fine-tune the search.
pub fn check_user_exists(configuration: &configuration::Configuration, email: Option<&str>, display_name: Option<&str>, user_id: Option<&str>, exclude_user_id: Option<&str>) -> Result<crate::models::UserExists, Error<CheckUserExistsError>> { pub fn check_user_exists(configuration: &configuration::Configuration, email: Option<&str>, display_name: Option<&str>, user_id: Option<&str>, exclude_user_id: Option<&str>) -> Result<crate::models::UserExists, Error<CheckUserExistsError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/exists", configuration.base_path); let local_var_uri_str = format!("{}/auth/exists", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_str) = email { if let Some(ref local_var_str) = email {
@ -90,7 +91,7 @@ pub fn check_user_exists(configuration: &configuration::Configuration, email: Op
if let Some(ref local_var_str) = exclude_user_id { if let Some(ref local_var_str) = exclude_user_id {
local_var_req_builder = local_var_req_builder.query(&[("excludeUserId", &local_var_str.to_string())]); local_var_req_builder = local_var_req_builder.query(&[("excludeUserId", &local_var_str.to_string())]);
} }
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -111,13 +112,14 @@ pub fn check_user_exists(configuration: &configuration::Configuration, email: Op
/// Deletes the account with given ID. Normal users only have permission to delete their own account. Account deletion is 14 days from this request, and will be cancelled if you do an authenticated request with the account afterwards. **VRC+ NOTE:** Despite the 14-days cooldown, any VRC+ subscription will be cancelled **immediately**. **METHOD NOTE:** Despite this being a Delete action, the method type required is PUT. /// Deletes the account with given ID. Normal users only have permission to delete their own account. Account deletion is 14 days from this request, and will be cancelled if you do an authenticated request with the account afterwards. **VRC+ NOTE:** Despite the 14-days cooldown, any VRC+ subscription will be cancelled **immediately**. **METHOD NOTE:** Despite this being a Delete action, the method type required is PUT.
pub fn delete_user(configuration: &configuration::Configuration, user_id: &str) -> Result<crate::models::CurrentUser, Error<DeleteUserError>> { pub fn delete_user(configuration: &configuration::Configuration, user_id: &str) -> Result<crate::models::CurrentUser, Error<DeleteUserError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/user/{userId}/delete", configuration.base_path, userId=crate::apis::urlencode(user_id)); let local_var_uri_str = format!("{}/user/{userId}/delete", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -138,16 +140,17 @@ 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. **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<crate::models::CurrentUser, Error<GetCurrentUserError>> { pub fn get_current_user(configuration: &configuration::Configuration, ) -> Result<crate::models::CurrentUser, Error<GetCurrentUserError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/user", configuration.base_path); let local_var_uri_str = format!("{}/auth/user", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
if let Some(ref local_var_auth_conf) = configuration.basic_auth { if let Some(ref local_var_auth_conf) = local_var_configuration.basic_auth {
local_var_req_builder = local_var_req_builder.basic_auth(local_var_auth_conf.0.to_owned(), local_var_auth_conf.1.to_owned()); local_var_req_builder = local_var_req_builder.basic_auth(local_var_auth_conf.0.to_owned(), local_var_auth_conf.1.to_owned());
}; };
@ -168,13 +171,14 @@ pub fn get_current_user(configuration: &configuration::Configuration, ) -> Resul
/// Invalidates the login session. /// Invalidates the login session.
pub fn logout(configuration: &configuration::Configuration, ) -> Result<crate::models::Success, Error<LogoutError>> { pub fn logout(configuration: &configuration::Configuration, ) -> Result<crate::models::Success, Error<LogoutError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/logout", configuration.base_path); let local_var_uri_str = format!("{}/logout", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -195,13 +199,14 @@ pub fn logout(configuration: &configuration::Configuration, ) -> Result<crate::m
/// Finishes the login sequence with a normal 2FA-generated code for accounts with 2FA-protection enabled. /// Finishes the login sequence with a normal 2FA-generated code for accounts with 2FA-protection enabled.
pub fn verify2_fa(configuration: &configuration::Configuration, inline_object: Option<crate::models::InlineObject>) -> Result<crate::models::InlineResponse2001, Error<Verify2FaError>> { pub fn verify2_fa(configuration: &configuration::Configuration, inline_object: Option<crate::models::InlineObject>) -> Result<crate::models::InlineResponse2001, Error<Verify2FaError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/twofactorauth/totp/verify", configuration.base_path); let local_var_uri_str = format!("{}/auth/twofactorauth/totp/verify", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
local_var_req_builder = local_var_req_builder.json(&inline_object); local_var_req_builder = local_var_req_builder.json(&inline_object);
@ -223,13 +228,14 @@ pub fn verify2_fa(configuration: &configuration::Configuration, inline_object: O
/// Verify whether the currently provided Auth Token is valid. /// Verify whether the currently provided Auth Token is valid.
pub fn verify_auth_token(configuration: &configuration::Configuration, ) -> Result<crate::models::InlineResponse200, Error<VerifyAuthTokenError>> { pub fn verify_auth_token(configuration: &configuration::Configuration, ) -> Result<crate::models::InlineResponse200, Error<VerifyAuthTokenError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth", configuration.base_path); let local_var_uri_str = format!("{}/auth", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -250,13 +256,14 @@ pub fn verify_auth_token(configuration: &configuration::Configuration, ) -> Resu
/// Finishes the login sequence with an OTP (One Time Password) recovery code for accounts with 2FA-protection enabled. /// Finishes the login sequence with an OTP (One Time Password) recovery code for accounts with 2FA-protection enabled.
pub fn verify_recovery_code(configuration: &configuration::Configuration, inline_object1: Option<crate::models::InlineObject1>) -> Result<crate::models::InlineResponse2001, Error<VerifyRecoveryCodeError>> { pub fn verify_recovery_code(configuration: &configuration::Configuration, inline_object1: Option<crate::models::InlineObject1>) -> Result<crate::models::InlineResponse2001, Error<VerifyRecoveryCodeError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/twofactorauth/otp/verify", configuration.base_path); let local_var_uri_str = format!("{}/auth/twofactorauth/otp/verify", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
local_var_req_builder = local_var_req_builder.json(&inline_object1); local_var_req_builder = local_var_req_builder.json(&inline_object1);

View File

@ -13,7 +13,7 @@ use crate::apis::ResponseContent;
use super::{Error, configuration}; use super::{Error, configuration};
/// struct for typed errors of method `create_avatar` /// struct for typed errors of method [`create_avatar`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum CreateAvatarError { pub enum CreateAvatarError {
@ -21,7 +21,7 @@ pub enum CreateAvatarError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `delete_avatar` /// struct for typed errors of method [`delete_avatar`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum DeleteAvatarError { pub enum DeleteAvatarError {
@ -30,7 +30,7 @@ pub enum DeleteAvatarError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `get_avatar` /// struct for typed errors of method [`get_avatar`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetAvatarError { pub enum GetAvatarError {
@ -39,7 +39,7 @@ pub enum GetAvatarError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `get_favorited_avatars` /// struct for typed errors of method [`get_favorited_avatars`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetFavoritedAvatarsError { pub enum GetFavoritedAvatarsError {
@ -48,7 +48,7 @@ pub enum GetFavoritedAvatarsError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `search_avatars` /// struct for typed errors of method [`search_avatars`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum SearchAvatarsError { pub enum SearchAvatarsError {
@ -56,7 +56,7 @@ pub enum SearchAvatarsError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `select_avatar` /// struct for typed errors of method [`select_avatar`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum SelectAvatarError { pub enum SelectAvatarError {
@ -65,7 +65,7 @@ pub enum SelectAvatarError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `update_avatar` /// struct for typed errors of method [`update_avatar`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum UpdateAvatarError { pub enum UpdateAvatarError {
@ -77,13 +77,14 @@ pub enum UpdateAvatarError {
/// Create an avatar. It's possible to optionally specify a ID if you want a custom one. Attempting to create an Avatar with an already claimed ID will result in a DB error. /// Create an avatar. It's possible to optionally specify a ID if you want a custom one. Attempting to create an Avatar with an already claimed ID will result in a DB error.
pub fn create_avatar(configuration: &configuration::Configuration, inline_object10: Option<crate::models::InlineObject10>) -> Result<crate::models::Avatar, Error<CreateAvatarError>> { pub fn create_avatar(configuration: &configuration::Configuration, inline_object10: Option<crate::models::InlineObject10>) -> Result<crate::models::Avatar, Error<CreateAvatarError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/avatars", configuration.base_path); let local_var_uri_str = format!("{}/avatars", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
local_var_req_builder = local_var_req_builder.json(&inline_object10); local_var_req_builder = local_var_req_builder.json(&inline_object10);
@ -105,13 +106,14 @@ pub fn create_avatar(configuration: &configuration::Configuration, inline_object
/// Delete an avatar. Notice an avatar is never fully \"deleted\", only its ReleaseStatus is set to \"hidden\" and the linked Files are deleted. The AvatarID is permanently reserved. /// Delete an avatar. Notice an avatar is never fully \"deleted\", only its ReleaseStatus is set to \"hidden\" and the linked Files are deleted. The AvatarID is permanently reserved.
pub fn delete_avatar(configuration: &configuration::Configuration, avatar_id: &str) -> Result<crate::models::Avatar, Error<DeleteAvatarError>> { pub fn delete_avatar(configuration: &configuration::Configuration, avatar_id: &str) -> Result<crate::models::Avatar, Error<DeleteAvatarError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/avatars/{avatarId}", configuration.base_path, avatarId=crate::apis::urlencode(avatar_id)); let local_var_uri_str = format!("{}/avatars/{avatarId}", local_var_configuration.base_path, avatarId=crate::apis::urlencode(avatar_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -132,13 +134,14 @@ pub fn delete_avatar(configuration: &configuration::Configuration, avatar_id: &s
/// Get information about a specific Avatar. /// Get information about a specific Avatar.
pub fn get_avatar(configuration: &configuration::Configuration, avatar_id: &str) -> Result<crate::models::Avatar, Error<GetAvatarError>> { pub fn get_avatar(configuration: &configuration::Configuration, avatar_id: &str) -> Result<crate::models::Avatar, Error<GetAvatarError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/avatars/{avatarId}", configuration.base_path, avatarId=crate::apis::urlencode(avatar_id)); let local_var_uri_str = format!("{}/avatars/{avatarId}", local_var_configuration.base_path, avatarId=crate::apis::urlencode(avatar_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -159,10 +162,11 @@ pub fn get_avatar(configuration: &configuration::Configuration, avatar_id: &str)
/// Search and list favorited avatars by query filters. /// Search and list favorited avatars by query filters.
pub fn get_favorited_avatars(configuration: &configuration::Configuration, featured: Option<&str>, sort: Option<&str>, n: Option<i32>, order: Option<&str>, offset: Option<i32>, search: Option<&str>, tag: Option<&str>, notag: Option<&str>, release_status: Option<&str>, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>, user_id: Option<&str>) -> Result<Vec<crate::models::Avatar>, Error<GetFavoritedAvatarsError>> { pub fn get_favorited_avatars(configuration: &configuration::Configuration, featured: Option<&str>, sort: Option<&str>, n: Option<i32>, order: Option<&str>, offset: Option<i32>, search: Option<&str>, tag: Option<&str>, notag: Option<&str>, release_status: Option<&str>, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>, user_id: Option<&str>) -> Result<Vec<crate::models::Avatar>, Error<GetFavoritedAvatarsError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/avatars/favorites", configuration.base_path); let local_var_uri_str = format!("{}/avatars/favorites", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_str) = featured { if let Some(ref local_var_str) = featured {
@ -204,7 +208,7 @@ pub fn get_favorited_avatars(configuration: &configuration::Configuration, featu
if let Some(ref local_var_str) = user_id { if let Some(ref local_var_str) = user_id {
local_var_req_builder = local_var_req_builder.query(&[("userId", &local_var_str.to_string())]); local_var_req_builder = local_var_req_builder.query(&[("userId", &local_var_str.to_string())]);
} }
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -225,10 +229,11 @@ pub fn get_favorited_avatars(configuration: &configuration::Configuration, featu
/// Search and list avatars by query filters. You can only search your own or featured avatars. It is not possible as a normal user to search other peoples avatars. /// Search and list avatars by query filters. You can only search your own or featured avatars. It is not possible as a normal user to search other peoples avatars.
pub fn search_avatars(configuration: &configuration::Configuration, featured: Option<&str>, sort: Option<&str>, user: Option<&str>, user_id: Option<&str>, n: Option<i32>, order: Option<&str>, offset: Option<i32>, tag: Option<&str>, notag: Option<&str>, release_status: Option<&str>, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>) -> Result<Vec<crate::models::Avatar>, Error<SearchAvatarsError>> { pub fn search_avatars(configuration: &configuration::Configuration, featured: Option<&str>, sort: Option<&str>, user: Option<&str>, user_id: Option<&str>, n: Option<i32>, order: Option<&str>, offset: Option<i32>, tag: Option<&str>, notag: Option<&str>, release_status: Option<&str>, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>) -> Result<Vec<crate::models::Avatar>, Error<SearchAvatarsError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/avatars", configuration.base_path); let local_var_uri_str = format!("{}/avatars", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_str) = featured { if let Some(ref local_var_str) = featured {
@ -270,7 +275,7 @@ pub fn search_avatars(configuration: &configuration::Configuration, featured: Op
if let Some(ref local_var_str) = platform { if let Some(ref local_var_str) = platform {
local_var_req_builder = local_var_req_builder.query(&[("platform", &local_var_str.to_string())]); local_var_req_builder = local_var_req_builder.query(&[("platform", &local_var_str.to_string())]);
} }
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -291,13 +296,14 @@ pub fn search_avatars(configuration: &configuration::Configuration, featured: Op
/// Switches into that avatar. /// Switches into that avatar.
pub fn select_avatar(configuration: &configuration::Configuration, avatar_id: &str) -> Result<crate::models::CurrentUser, Error<SelectAvatarError>> { pub fn select_avatar(configuration: &configuration::Configuration, avatar_id: &str) -> Result<crate::models::CurrentUser, Error<SelectAvatarError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/avatars/{avatarId}/select", configuration.base_path, avatarId=crate::apis::urlencode(avatar_id)); let local_var_uri_str = format!("{}/avatars/{avatarId}/select", local_var_configuration.base_path, avatarId=crate::apis::urlencode(avatar_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -318,13 +324,14 @@ pub fn select_avatar(configuration: &configuration::Configuration, avatar_id: &s
/// Update information about a specific avatar. /// Update information about a specific avatar.
pub fn update_avatar(configuration: &configuration::Configuration, avatar_id: &str, inline_object11: Option<crate::models::InlineObject11>) -> Result<crate::models::Avatar, Error<UpdateAvatarError>> { pub fn update_avatar(configuration: &configuration::Configuration, avatar_id: &str, inline_object11: Option<crate::models::InlineObject11>) -> Result<crate::models::Avatar, Error<UpdateAvatarError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/avatars/{avatarId}", configuration.base_path, avatarId=crate::apis::urlencode(avatar_id)); let local_var_uri_str = format!("{}/avatars/{avatarId}", local_var_configuration.base_path, avatarId=crate::apis::urlencode(avatar_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
local_var_req_builder = local_var_req_builder.json(&inline_object11); local_var_req_builder = local_var_req_builder.json(&inline_object11);

View File

@ -13,7 +13,7 @@ use crate::apis::ResponseContent;
use super::{Error, configuration}; use super::{Error, configuration};
/// struct for typed errors of method `add_favorite` /// struct for typed errors of method [`add_favorite`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum AddFavoriteError { pub enum AddFavoriteError {
@ -22,14 +22,14 @@ pub enum AddFavoriteError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `clear_favorite_group` /// struct for typed errors of method [`clear_favorite_group`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum ClearFavoriteGroupError { pub enum ClearFavoriteGroupError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `get_favorite` /// struct for typed errors of method [`get_favorite`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetFavoriteError { pub enum GetFavoriteError {
@ -38,14 +38,14 @@ pub enum GetFavoriteError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `get_favorite_group` /// struct for typed errors of method [`get_favorite_group`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetFavoriteGroupError { pub enum GetFavoriteGroupError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `get_favorite_groups` /// struct for typed errors of method [`get_favorite_groups`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetFavoriteGroupsError { pub enum GetFavoriteGroupsError {
@ -53,7 +53,7 @@ pub enum GetFavoriteGroupsError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `get_favorites` /// struct for typed errors of method [`get_favorites`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetFavoritesError { pub enum GetFavoritesError {
@ -61,7 +61,7 @@ pub enum GetFavoritesError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `remove_favorite` /// struct for typed errors of method [`remove_favorite`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum RemoveFavoriteError { pub enum RemoveFavoriteError {
@ -70,7 +70,7 @@ pub enum RemoveFavoriteError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `update_favorite_group` /// struct for typed errors of method [`update_favorite_group`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum UpdateFavoriteGroupError { pub enum UpdateFavoriteGroupError {
@ -80,13 +80,14 @@ pub enum UpdateFavoriteGroupError {
/// Add a new favorite. Friend groups are named `group_0` through `group_3`. Avatar and World groups are named `avatars1` to `avatar4` and `worlds1` to `worlds4`. You cannot add people whom you are not friends with to your friends list. Destroying a friendship removes the person as favorite on both sides. /// Add a new favorite. Friend groups are named `group_0` through `group_3`. Avatar and World groups are named `avatars1` to `avatar4` and `worlds1` to `worlds4`. You cannot add people whom you are not friends with to your friends list. Destroying a friendship removes the person as favorite on both sides.
pub fn add_favorite(configuration: &configuration::Configuration, inline_object8: Option<crate::models::InlineObject8>) -> Result<crate::models::Favorite, Error<AddFavoriteError>> { pub fn add_favorite(configuration: &configuration::Configuration, inline_object8: Option<crate::models::InlineObject8>) -> Result<crate::models::Favorite, Error<AddFavoriteError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/favorites", configuration.base_path); let local_var_uri_str = format!("{}/favorites", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
local_var_req_builder = local_var_req_builder.json(&inline_object8); local_var_req_builder = local_var_req_builder.json(&inline_object8);
@ -108,13 +109,14 @@ pub fn add_favorite(configuration: &configuration::Configuration, inline_object8
/// Clear ALL contents of a specific favorite group. /// Clear ALL contents of a specific favorite group.
pub fn clear_favorite_group(configuration: &configuration::Configuration, favorite_group_type: &str, favorite_group_name: &str, user_id: &str) -> Result<crate::models::Success, Error<ClearFavoriteGroupError>> { pub fn clear_favorite_group(configuration: &configuration::Configuration, favorite_group_type: &str, favorite_group_name: &str, user_id: &str) -> Result<crate::models::Success, Error<ClearFavoriteGroupError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId}", configuration.base_path, favoriteGroupType=crate::apis::urlencode(favorite_group_type), favoriteGroupName=crate::apis::urlencode(favorite_group_name), userId=crate::apis::urlencode(user_id)); let local_var_uri_str = format!("{}/favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId}", local_var_configuration.base_path, favoriteGroupType=crate::apis::urlencode(favorite_group_type), favoriteGroupName=crate::apis::urlencode(favorite_group_name), userId=crate::apis::urlencode(user_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -135,13 +137,14 @@ pub fn clear_favorite_group(configuration: &configuration::Configuration, favori
/// Return information about a specific Favorite. /// Return information about a specific Favorite.
pub fn get_favorite(configuration: &configuration::Configuration, favorite_id: &str) -> Result<crate::models::Favorite, Error<GetFavoriteError>> { pub fn get_favorite(configuration: &configuration::Configuration, favorite_id: &str) -> Result<crate::models::Favorite, Error<GetFavoriteError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/favorites/{favoriteId}", configuration.base_path, favoriteId=crate::apis::urlencode(favorite_id)); let local_var_uri_str = format!("{}/favorites/{favoriteId}", local_var_configuration.base_path, favoriteId=crate::apis::urlencode(favorite_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -162,13 +165,14 @@ pub fn get_favorite(configuration: &configuration::Configuration, favorite_id: &
/// Fetch information about a specific favorite group. /// Fetch information about a specific favorite group.
pub fn get_favorite_group(configuration: &configuration::Configuration, favorite_group_type: &str, favorite_group_name: &str, user_id: &str) -> Result<crate::models::FavoriteGroup, Error<GetFavoriteGroupError>> { pub fn get_favorite_group(configuration: &configuration::Configuration, favorite_group_type: &str, favorite_group_name: &str, user_id: &str) -> Result<crate::models::FavoriteGroup, Error<GetFavoriteGroupError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId}", configuration.base_path, favoriteGroupType=crate::apis::urlencode(favorite_group_type), favoriteGroupName=crate::apis::urlencode(favorite_group_name), userId=crate::apis::urlencode(user_id)); let local_var_uri_str = format!("{}/favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId}", local_var_configuration.base_path, favoriteGroupType=crate::apis::urlencode(favorite_group_type), favoriteGroupName=crate::apis::urlencode(favorite_group_name), userId=crate::apis::urlencode(user_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -189,10 +193,11 @@ pub fn get_favorite_group(configuration: &configuration::Configuration, favorite
/// Return a list of favorite groups owned by a user. Returns the same information as `getFavoriteGroups`. /// Return a list of favorite groups owned by a user. Returns the same information as `getFavoriteGroups`.
pub fn get_favorite_groups(configuration: &configuration::Configuration, n: Option<i32>, offset: Option<i32>, owner_id: Option<&str>) -> Result<Vec<crate::models::FavoriteGroup>, Error<GetFavoriteGroupsError>> { pub fn get_favorite_groups(configuration: &configuration::Configuration, n: Option<i32>, offset: Option<i32>, owner_id: Option<&str>) -> Result<Vec<crate::models::FavoriteGroup>, Error<GetFavoriteGroupsError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/favorite/groups", configuration.base_path); let local_var_uri_str = format!("{}/favorite/groups", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_str) = n { if let Some(ref local_var_str) = n {
@ -204,7 +209,7 @@ pub fn get_favorite_groups(configuration: &configuration::Configuration, n: Opti
if let Some(ref local_var_str) = owner_id { if let Some(ref local_var_str) = owner_id {
local_var_req_builder = local_var_req_builder.query(&[("ownerId", &local_var_str.to_string())]); local_var_req_builder = local_var_req_builder.query(&[("ownerId", &local_var_str.to_string())]);
} }
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -225,10 +230,11 @@ pub fn get_favorite_groups(configuration: &configuration::Configuration, n: Opti
/// Returns a list of favorites. /// Returns a list of favorites.
pub fn get_favorites(configuration: &configuration::Configuration, n: Option<i32>, offset: Option<i32>, _type: Option<&str>, tag: Option<&str>) -> Result<Vec<crate::models::Favorite>, Error<GetFavoritesError>> { pub fn get_favorites(configuration: &configuration::Configuration, n: Option<i32>, offset: Option<i32>, _type: Option<&str>, tag: Option<&str>) -> Result<Vec<crate::models::Favorite>, Error<GetFavoritesError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/favorites", configuration.base_path); let local_var_uri_str = format!("{}/favorites", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_str) = n { if let Some(ref local_var_str) = n {
@ -243,7 +249,7 @@ pub fn get_favorites(configuration: &configuration::Configuration, n: Option<i32
if let Some(ref local_var_str) = tag { if let Some(ref local_var_str) = tag {
local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]); local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
} }
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -264,13 +270,14 @@ pub fn get_favorites(configuration: &configuration::Configuration, n: Option<i32
/// Remove a favorite from your favorites list. /// Remove a favorite from your favorites list.
pub fn remove_favorite(configuration: &configuration::Configuration, favorite_id: &str) -> Result<crate::models::Success, Error<RemoveFavoriteError>> { pub fn remove_favorite(configuration: &configuration::Configuration, favorite_id: &str) -> Result<crate::models::Success, Error<RemoveFavoriteError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/favorites/{favoriteId}", configuration.base_path, favoriteId=crate::apis::urlencode(favorite_id)); let local_var_uri_str = format!("{}/favorites/{favoriteId}", local_var_configuration.base_path, favoriteId=crate::apis::urlencode(favorite_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -291,13 +298,14 @@ pub fn remove_favorite(configuration: &configuration::Configuration, favorite_id
/// Update information about a specific favorite group. /// Update information about a specific favorite group.
pub fn update_favorite_group(configuration: &configuration::Configuration, favorite_group_type: &str, favorite_group_name: &str, user_id: &str, inline_object9: Option<crate::models::InlineObject9>) -> Result<(), Error<UpdateFavoriteGroupError>> { pub fn update_favorite_group(configuration: &configuration::Configuration, favorite_group_type: &str, favorite_group_name: &str, user_id: &str, inline_object9: Option<crate::models::InlineObject9>) -> Result<(), Error<UpdateFavoriteGroupError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId}", configuration.base_path, favoriteGroupType=crate::apis::urlencode(favorite_group_type), favoriteGroupName=crate::apis::urlencode(favorite_group_name), userId=crate::apis::urlencode(user_id)); let local_var_uri_str = format!("{}/favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId}", local_var_configuration.base_path, favoriteGroupType=crate::apis::urlencode(favorite_group_type), favoriteGroupName=crate::apis::urlencode(favorite_group_name), userId=crate::apis::urlencode(user_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
local_var_req_builder = local_var_req_builder.json(&inline_object9); local_var_req_builder = local_var_req_builder.json(&inline_object9);

View File

@ -13,21 +13,21 @@ use crate::apis::ResponseContent;
use super::{Error, configuration}; use super::{Error, configuration};
/// struct for typed errors of method `create_file` /// struct for typed errors of method [`create_file`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum CreateFileError { pub enum CreateFileError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `create_file_version` /// struct for typed errors of method [`create_file_version`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum CreateFileVersionError { pub enum CreateFileVersionError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `delete_file` /// struct for typed errors of method [`delete_file`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum DeleteFileError { pub enum DeleteFileError {
@ -35,7 +35,7 @@ pub enum DeleteFileError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `delete_file_version` /// struct for typed errors of method [`delete_file_version`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum DeleteFileVersionError { pub enum DeleteFileVersionError {
@ -44,21 +44,21 @@ pub enum DeleteFileVersionError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `download_file_version` /// struct for typed errors of method [`download_file_version`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum DownloadFileVersionError { pub enum DownloadFileVersionError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `finish_file_data_upload` /// struct for typed errors of method [`finish_file_data_upload`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum FinishFileDataUploadError { pub enum FinishFileDataUploadError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `get_file` /// struct for typed errors of method [`get_file`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetFileError { pub enum GetFileError {
@ -66,21 +66,21 @@ pub enum GetFileError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `get_file_data_upload_status` /// struct for typed errors of method [`get_file_data_upload_status`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetFileDataUploadStatusError { pub enum GetFileDataUploadStatusError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `get_files` /// struct for typed errors of method [`get_files`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetFilesError { pub enum GetFilesError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `start_file_data_upload` /// struct for typed errors of method [`start_file_data_upload`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum StartFileDataUploadError { pub enum StartFileDataUploadError {
@ -91,13 +91,14 @@ pub enum StartFileDataUploadError {
/// Creates a new File object /// Creates a new File object
pub fn create_file(configuration: &configuration::Configuration, inline_object3: Option<crate::models::InlineObject3>) -> Result<crate::models::File, Error<CreateFileError>> { pub fn create_file(configuration: &configuration::Configuration, inline_object3: Option<crate::models::InlineObject3>) -> Result<crate::models::File, Error<CreateFileError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/file", configuration.base_path); let local_var_uri_str = format!("{}/file", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
local_var_req_builder = local_var_req_builder.json(&inline_object3); local_var_req_builder = local_var_req_builder.json(&inline_object3);
@ -119,13 +120,14 @@ pub fn create_file(configuration: &configuration::Configuration, inline_object3:
/// Creates a new FileVersion. Once a Version has been created, proceed to the `/file/{fileId}/{versionId}/file/start` endpoint to start a file upload. /// Creates a new FileVersion. Once a Version has been created, proceed to the `/file/{fileId}/{versionId}/file/start` endpoint to start a file upload.
pub fn create_file_version(configuration: &configuration::Configuration, file_id: &str, inline_object4: Option<crate::models::InlineObject4>) -> Result<crate::models::File, Error<CreateFileVersionError>> { pub fn create_file_version(configuration: &configuration::Configuration, file_id: &str, inline_object4: Option<crate::models::InlineObject4>) -> Result<crate::models::File, Error<CreateFileVersionError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/file/{fileId}", configuration.base_path, fileId=crate::apis::urlencode(file_id)); let local_var_uri_str = format!("{}/file/{fileId}", local_var_configuration.base_path, fileId=crate::apis::urlencode(file_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
local_var_req_builder = local_var_req_builder.json(&inline_object4); local_var_req_builder = local_var_req_builder.json(&inline_object4);
@ -147,13 +149,14 @@ pub fn create_file_version(configuration: &configuration::Configuration, file_id
/// Deletes a File object. /// Deletes a File object.
pub fn delete_file(configuration: &configuration::Configuration, file_id: &str) -> Result<crate::models::Success, Error<DeleteFileError>> { pub fn delete_file(configuration: &configuration::Configuration, file_id: &str) -> Result<crate::models::Success, Error<DeleteFileError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/file/{fileId}", configuration.base_path, fileId=crate::apis::urlencode(file_id)); let local_var_uri_str = format!("{}/file/{fileId}", local_var_configuration.base_path, fileId=crate::apis::urlencode(file_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -174,13 +177,14 @@ pub fn delete_file(configuration: &configuration::Configuration, file_id: &str)
/// Delete a specific version of a file. You can only delete the latest version. /// Delete a specific version of a file. You can only delete the latest version.
pub fn delete_file_version(configuration: &configuration::Configuration, file_id: &str, version_id: i32) -> Result<crate::models::File, Error<DeleteFileVersionError>> { pub fn delete_file_version(configuration: &configuration::Configuration, file_id: &str, version_id: i32) -> Result<crate::models::File, Error<DeleteFileVersionError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/file/{fileId}/{versionId}", configuration.base_path, fileId=crate::apis::urlencode(file_id), versionId=version_id); let local_var_uri_str = format!("{}/file/{fileId}/{versionId}", local_var_configuration.base_path, fileId=crate::apis::urlencode(file_id), versionId=version_id);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -201,13 +205,14 @@ pub fn delete_file_version(configuration: &configuration::Configuration, file_id
/// Downloads the file with the provided version number. **Version Note:** Version 0 is always when the file was created. The real data is usually always located in version 1 and up. **Extension Note:** Files are not guaranteed to have a file extensions. UnityPackage files tends to have it, images through this endpoint do not. You are responsible for appending file extension from the `extension` field when neccesary. /// Downloads the file with the provided version number. **Version Note:** Version 0 is always when the file was created. The real data is usually always located in version 1 and up. **Extension Note:** Files are not guaranteed to have a file extensions. UnityPackage files tends to have it, images through this endpoint do not. You are responsible for appending file extension from the `extension` field when neccesary.
pub fn download_file_version(configuration: &configuration::Configuration, file_id: &str, version_id: i32) -> Result<(), Error<DownloadFileVersionError>> { pub fn download_file_version(configuration: &configuration::Configuration, file_id: &str, version_id: i32) -> Result<(), Error<DownloadFileVersionError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/file/{fileId}/{versionId}", configuration.base_path, fileId=crate::apis::urlencode(file_id), versionId=version_id); let local_var_uri_str = format!("{}/file/{fileId}/{versionId}", local_var_configuration.base_path, fileId=crate::apis::urlencode(file_id), versionId=version_id);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -228,13 +233,14 @@ pub fn download_file_version(configuration: &configuration::Configuration, file_
/// Finish an upload of a FileData. This will mark it as \"complete\". After uploading the `file` for Avatars and Worlds you then have to upload a `signature` file. /// Finish an upload of a FileData. This will mark it as \"complete\". After uploading the `file` for Avatars and Worlds you then have to upload a `signature` file.
pub fn finish_file_data_upload(configuration: &configuration::Configuration, file_id: &str, version_id: i32, file_type: &str, inline_object5: Option<crate::models::InlineObject5>) -> Result<crate::models::File, Error<FinishFileDataUploadError>> { pub fn finish_file_data_upload(configuration: &configuration::Configuration, file_id: &str, version_id: i32, file_type: &str, inline_object5: Option<crate::models::InlineObject5>) -> Result<crate::models::File, Error<FinishFileDataUploadError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/file/{fileId}/{versionId}/{fileType}/finish", configuration.base_path, fileId=crate::apis::urlencode(file_id), versionId=version_id, fileType=crate::apis::urlencode(file_type)); let local_var_uri_str = format!("{}/file/{fileId}/{versionId}/{fileType}/finish", local_var_configuration.base_path, fileId=crate::apis::urlencode(file_id), versionId=version_id, fileType=crate::apis::urlencode(file_type));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
local_var_req_builder = local_var_req_builder.json(&inline_object5); local_var_req_builder = local_var_req_builder.json(&inline_object5);
@ -256,13 +262,14 @@ pub fn finish_file_data_upload(configuration: &configuration::Configuration, fil
/// Shows general information about the \"File\" object. Each File can have several \"Version\"'s, and each Version can have multiple real files or \"Data\" blobs. /// Shows general information about the \"File\" object. Each File can have several \"Version\"'s, and each Version can have multiple real files or \"Data\" blobs.
pub fn get_file(configuration: &configuration::Configuration, file_id: &str) -> Result<crate::models::File, Error<GetFileError>> { pub fn get_file(configuration: &configuration::Configuration, file_id: &str) -> Result<crate::models::File, Error<GetFileError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/file/{fileId}", configuration.base_path, fileId=crate::apis::urlencode(file_id)); let local_var_uri_str = format!("{}/file/{fileId}", local_var_configuration.base_path, fileId=crate::apis::urlencode(file_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -283,13 +290,14 @@ pub fn get_file(configuration: &configuration::Configuration, file_id: &str) ->
/// Retrieves the upload status for file upload. Can currently only be accessed when `status` is `waiting`. Trying to access it on a file version already uploaded currently times out. /// Retrieves the upload status for file upload. Can currently only be accessed when `status` is `waiting`. Trying to access it on a file version already uploaded currently times out.
pub fn get_file_data_upload_status(configuration: &configuration::Configuration, file_id: &str, version_id: i32, file_type: &str) -> Result<crate::models::InlineResponse2003, Error<GetFileDataUploadStatusError>> { pub fn get_file_data_upload_status(configuration: &configuration::Configuration, file_id: &str, version_id: i32, file_type: &str) -> Result<crate::models::InlineResponse2003, Error<GetFileDataUploadStatusError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/file/{fileId}/{versionId}/{fileType}/status", configuration.base_path, fileId=crate::apis::urlencode(file_id), versionId=version_id, fileType=crate::apis::urlencode(file_type)); let local_var_uri_str = format!("{}/file/{fileId}/{versionId}/{fileType}/status", local_var_configuration.base_path, fileId=crate::apis::urlencode(file_id), versionId=version_id, fileType=crate::apis::urlencode(file_type));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -310,10 +318,11 @@ pub fn get_file_data_upload_status(configuration: &configuration::Configuration,
/// Returns a list of files /// Returns a list of files
pub fn get_files(configuration: &configuration::Configuration, tag: Option<&str>, user_id: Option<&str>, n: Option<i32>, offset: Option<i32>) -> Result<Vec<crate::models::File>, Error<GetFilesError>> { pub fn get_files(configuration: &configuration::Configuration, tag: Option<&str>, user_id: Option<&str>, n: Option<i32>, offset: Option<i32>) -> Result<Vec<crate::models::File>, Error<GetFilesError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/files", configuration.base_path); let local_var_uri_str = format!("{}/files", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_str) = tag { if let Some(ref local_var_str) = tag {
@ -328,7 +337,7 @@ pub fn get_files(configuration: &configuration::Configuration, tag: Option<&str>
if let Some(ref local_var_str) = offset { if let Some(ref local_var_str) = offset {
local_var_req_builder = local_var_req_builder.query(&[("offset", &local_var_str.to_string())]); local_var_req_builder = local_var_req_builder.query(&[("offset", &local_var_str.to_string())]);
} }
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -349,14 +358,15 @@ pub fn get_files(configuration: &configuration::Configuration, tag: Option<&str>
/// Starts an upload of a specific FilePart. This endpoint will return an AWS URL which you can PUT data to. You need to call this and receive a new AWS API URL for each `partNumber`. Please see AWS's REST documentation on \"PUT Object to S3\" on how to upload. Once all parts has been uploaded, proceed to `/finish` endpoint. **Note:** `nextPartNumber` seems like it is always ignored. Despite it returning 0, first partNumber is always 1. /// Starts an upload of a specific FilePart. This endpoint will return an AWS URL which you can PUT data to. You need to call this and receive a new AWS API URL for each `partNumber`. Please see AWS's REST documentation on \"PUT Object to S3\" on how to upload. Once all parts has been uploaded, proceed to `/finish` endpoint. **Note:** `nextPartNumber` seems like it is always ignored. Despite it returning 0, first partNumber is always 1.
pub fn start_file_data_upload(configuration: &configuration::Configuration, file_id: &str, version_id: i32, file_type: &str, part_number: i32) -> Result<crate::models::InlineResponse2004, Error<StartFileDataUploadError>> { pub fn start_file_data_upload(configuration: &configuration::Configuration, file_id: &str, version_id: i32, file_type: &str, part_number: i32) -> Result<crate::models::InlineResponse2004, Error<StartFileDataUploadError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/file/{fileId}/{versionId}/{fileType}/start", configuration.base_path, fileId=crate::apis::urlencode(file_id), versionId=version_id, fileType=crate::apis::urlencode(file_type)); let local_var_uri_str = format!("{}/file/{fileId}/{versionId}/{fileType}/start", local_var_configuration.base_path, fileId=crate::apis::urlencode(file_id), versionId=version_id, fileType=crate::apis::urlencode(file_type));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
local_var_req_builder = local_var_req_builder.query(&[("partNumber", &part_number.to_string())]); local_var_req_builder = local_var_req_builder.query(&[("partNumber", &part_number.to_string())]);
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }

View File

@ -13,7 +13,7 @@ use crate::apis::ResponseContent;
use super::{Error, configuration}; use super::{Error, configuration};
/// struct for typed errors of method `delete_friend_request` /// struct for typed errors of method [`delete_friend_request`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum DeleteFriendRequestError { pub enum DeleteFriendRequestError {
@ -22,7 +22,7 @@ pub enum DeleteFriendRequestError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `friend` /// struct for typed errors of method [`friend`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum FriendError { pub enum FriendError {
@ -31,7 +31,7 @@ pub enum FriendError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `get_friend_status` /// struct for typed errors of method [`get_friend_status`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetFriendStatusError { pub enum GetFriendStatusError {
@ -39,7 +39,7 @@ pub enum GetFriendStatusError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `get_friends` /// struct for typed errors of method [`get_friends`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetFriendsError { pub enum GetFriendsError {
@ -47,7 +47,7 @@ pub enum GetFriendsError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `unfriend` /// struct for typed errors of method [`unfriend`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum UnfriendError { pub enum UnfriendError {
@ -59,13 +59,14 @@ pub enum UnfriendError {
/// Deletes an outgoing pending friend request to another user. To delete an incoming friend request, use the `deleteNotification` endpoint instead. /// Deletes an outgoing pending friend request to another user. To delete an incoming friend request, use the `deleteNotification` endpoint instead.
pub fn delete_friend_request(configuration: &configuration::Configuration, user_id: &str) -> Result<crate::models::Success, Error<DeleteFriendRequestError>> { pub fn delete_friend_request(configuration: &configuration::Configuration, user_id: &str) -> Result<crate::models::Success, Error<DeleteFriendRequestError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/user/{userId}/friendRequest", configuration.base_path, userId=crate::apis::urlencode(user_id)); let local_var_uri_str = format!("{}/user/{userId}/friendRequest", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -86,13 +87,14 @@ pub fn delete_friend_request(configuration: &configuration::Configuration, user_
/// Send a friend request to another user. /// Send a friend request to another user.
pub fn friend(configuration: &configuration::Configuration, user_id: &str) -> Result<crate::models::Notification, Error<FriendError>> { pub fn friend(configuration: &configuration::Configuration, user_id: &str) -> Result<crate::models::Notification, Error<FriendError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/user/{userId}/friendRequest", configuration.base_path, userId=crate::apis::urlencode(user_id)); let local_var_uri_str = format!("{}/user/{userId}/friendRequest", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -113,13 +115,14 @@ pub fn friend(configuration: &configuration::Configuration, user_id: &str) -> Re
/// Retrieve if the user is currently a friend with a given user, if they have an outgoing friend request, and if they have an incoming friend request. The proper way to receive and accept friend request is by checking if the user has an incoming `Notification` of type `friendRequest`, and then accepting that notification. /// Retrieve if the user is currently a friend with a given user, if they have an outgoing friend request, and if they have an incoming friend request. The proper way to receive and accept friend request is by checking if the user has an incoming `Notification` of type `friendRequest`, and then accepting that notification.
pub fn get_friend_status(configuration: &configuration::Configuration, user_id: &str) -> Result<crate::models::FriendStatus, Error<GetFriendStatusError>> { pub fn get_friend_status(configuration: &configuration::Configuration, user_id: &str) -> Result<crate::models::FriendStatus, Error<GetFriendStatusError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/user/{userId}/friendStatus", configuration.base_path, userId=crate::apis::urlencode(user_id)); let local_var_uri_str = format!("{}/user/{userId}/friendStatus", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -140,10 +143,11 @@ pub fn get_friend_status(configuration: &configuration::Configuration, user_id:
/// List information about friends. /// List information about friends.
pub fn get_friends(configuration: &configuration::Configuration, offset: Option<i32>, n: Option<i32>, offline: Option<bool>) -> Result<Vec<crate::models::LimitedUser>, Error<GetFriendsError>> { pub fn get_friends(configuration: &configuration::Configuration, offset: Option<i32>, n: Option<i32>, offline: Option<bool>) -> Result<Vec<crate::models::LimitedUser>, Error<GetFriendsError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/user/friends", configuration.base_path); let local_var_uri_str = format!("{}/auth/user/friends", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_str) = offset { if let Some(ref local_var_str) = offset {
@ -155,7 +159,7 @@ pub fn get_friends(configuration: &configuration::Configuration, offset: Option<
if let Some(ref local_var_str) = offline { if let Some(ref local_var_str) = offline {
local_var_req_builder = local_var_req_builder.query(&[("offline", &local_var_str.to_string())]); local_var_req_builder = local_var_req_builder.query(&[("offline", &local_var_str.to_string())]);
} }
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -176,13 +180,14 @@ pub fn get_friends(configuration: &configuration::Configuration, offset: Option<
/// Unfriend a user by ID. /// Unfriend a user by ID.
pub fn unfriend(configuration: &configuration::Configuration, user_id: &str) -> Result<crate::models::Success, Error<UnfriendError>> { pub fn unfriend(configuration: &configuration::Configuration, user_id: &str) -> Result<crate::models::Success, Error<UnfriendError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/user/friends/{userId}", configuration.base_path, userId=crate::apis::urlencode(user_id)); let local_var_uri_str = format!("{}/auth/user/friends/{userId}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }

View File

@ -13,7 +13,7 @@ use crate::apis::ResponseContent;
use super::{Error, configuration}; use super::{Error, configuration};
/// struct for typed errors of method `get_invite_message` /// struct for typed errors of method [`get_invite_message`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetInviteMessageError { pub enum GetInviteMessageError {
@ -22,7 +22,7 @@ pub enum GetInviteMessageError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `get_invite_messages` /// struct for typed errors of method [`get_invite_messages`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetInviteMessagesError { pub enum GetInviteMessagesError {
@ -31,7 +31,7 @@ pub enum GetInviteMessagesError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `invite_user` /// struct for typed errors of method [`invite_user`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum InviteUserError { pub enum InviteUserError {
@ -39,7 +39,7 @@ pub enum InviteUserError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `request_invite` /// struct for typed errors of method [`request_invite`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum RequestInviteError { pub enum RequestInviteError {
@ -47,7 +47,7 @@ pub enum RequestInviteError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `reset_invite_message` /// struct for typed errors of method [`reset_invite_message`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum ResetInviteMessageError { pub enum ResetInviteMessageError {
@ -57,7 +57,7 @@ pub enum ResetInviteMessageError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `respond_invite` /// struct for typed errors of method [`respond_invite`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum RespondInviteError { pub enum RespondInviteError {
@ -65,7 +65,7 @@ pub enum RespondInviteError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `update_invite_message` /// struct for typed errors of method [`update_invite_message`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum UpdateInviteMessageError { pub enum UpdateInviteMessageError {
@ -78,13 +78,14 @@ pub enum UpdateInviteMessageError {
/// Returns a single Invite Message. This returns the exact same information but less than `getInviteMessages`. Admin Credentials are required to view messages of other users! Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite /// Returns a single Invite Message. This returns the exact same information but less than `getInviteMessages`. Admin Credentials are required to view messages of other users! Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite
pub fn get_invite_message(configuration: &configuration::Configuration, user_id: &str, message_type: &str, message_id: i32) -> Result<crate::models::InviteMessage, Error<GetInviteMessageError>> { pub fn get_invite_message(configuration: &configuration::Configuration, user_id: &str, message_type: &str, message_id: i32) -> Result<crate::models::InviteMessage, Error<GetInviteMessageError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/message/{userId}/{messageType}/{messageId}", configuration.base_path, userId=crate::apis::urlencode(user_id), messageType=crate::apis::urlencode(message_type), messageId=message_id); let local_var_uri_str = format!("{}/message/{userId}/{messageType}/{messageId}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id), messageType=crate::apis::urlencode(message_type), messageId=message_id);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -105,13 +106,14 @@ pub fn get_invite_message(configuration: &configuration::Configuration, user_id:
/// Returns a list of all the users Invite Messages. Admin Credentials are required to view messages of other users! Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite /// Returns a list of all the users Invite Messages. Admin Credentials are required to view messages of other users! Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite
pub fn get_invite_messages(configuration: &configuration::Configuration, user_id: &str, message_type: &str) -> Result<Vec<crate::models::InviteMessage>, Error<GetInviteMessagesError>> { pub fn get_invite_messages(configuration: &configuration::Configuration, user_id: &str, message_type: &str) -> Result<Vec<crate::models::InviteMessage>, Error<GetInviteMessagesError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/message/{userId}/{messageType}", configuration.base_path, userId=crate::apis::urlencode(user_id), messageType=crate::apis::urlencode(message_type)); let local_var_uri_str = format!("{}/message/{userId}/{messageType}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id), messageType=crate::apis::urlencode(message_type));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -132,13 +134,14 @@ pub fn get_invite_messages(configuration: &configuration::Configuration, user_id
/// Sends an invite to a user. Returns the Notification of type `invite` that was sent. /// Sends an invite to a user. Returns the Notification of type `invite` that was sent.
pub fn invite_user(configuration: &configuration::Configuration, user_id: &str, invite_request: Option<crate::models::InviteRequest>) -> Result<crate::models::Notification, Error<InviteUserError>> { pub fn invite_user(configuration: &configuration::Configuration, user_id: &str, invite_request: Option<crate::models::InviteRequest>) -> Result<crate::models::Notification, Error<InviteUserError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/invite/{userId}", configuration.base_path, userId=crate::apis::urlencode(user_id)); let local_var_uri_str = format!("{}/invite/{userId}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
local_var_req_builder = local_var_req_builder.json(&invite_request); local_var_req_builder = local_var_req_builder.json(&invite_request);
@ -160,13 +163,14 @@ pub fn invite_user(configuration: &configuration::Configuration, user_id: &str,
/// Requests an invite from a user. Returns the Notification of type `requestInvite` that was sent. /// Requests an invite from a user. Returns the Notification of type `requestInvite` that was sent.
pub fn request_invite(configuration: &configuration::Configuration, user_id: &str) -> Result<crate::models::Notification, Error<RequestInviteError>> { pub fn request_invite(configuration: &configuration::Configuration, user_id: &str) -> Result<crate::models::Notification, Error<RequestInviteError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/requestInvite/{userId}", configuration.base_path, userId=crate::apis::urlencode(user_id)); let local_var_uri_str = format!("{}/requestInvite/{userId}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -187,13 +191,14 @@ pub fn request_invite(configuration: &configuration::Configuration, user_id: &st
/// Resets a single Invite Message back to it's original message, and then returns a list of all of them. Admin Credentials are required to update messages of other users! Resetting a message respects the rate-limit, but resetting it does not set the rate-limit to 60 like when editing it. It is possible to edit it right after resetting it. Trying to edit a message before the cooldown timer expires results in a 429 Too Fast Error. Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite /// Resets a single Invite Message back to it's original message, and then returns a list of all of them. Admin Credentials are required to update messages of other users! Resetting a message respects the rate-limit, but resetting it does not set the rate-limit to 60 like when editing it. It is possible to edit it right after resetting it. Trying to edit a message before the cooldown timer expires results in a 429 Too Fast Error. Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite
pub fn reset_invite_message(configuration: &configuration::Configuration, user_id: &str, message_type: &str, message_id: i32) -> Result<Vec<crate::models::InviteMessage>, Error<ResetInviteMessageError>> { pub fn reset_invite_message(configuration: &configuration::Configuration, user_id: &str, message_type: &str, message_id: i32) -> Result<Vec<crate::models::InviteMessage>, Error<ResetInviteMessageError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/message/{userId}/{messageType}/{messageId}", configuration.base_path, userId=crate::apis::urlencode(user_id), messageType=crate::apis::urlencode(message_type), messageId=message_id); let local_var_uri_str = format!("{}/message/{userId}/{messageType}/{messageId}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id), messageType=crate::apis::urlencode(message_type), messageId=message_id);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -214,13 +219,14 @@ pub fn reset_invite_message(configuration: &configuration::Configuration, user_i
/// Sends a world invite to a user. /// Sends a world invite to a user.
pub fn respond_invite(configuration: &configuration::Configuration, notification_id: &str, invite_response: Option<crate::models::InviteResponse>) -> Result<crate::models::Notification, Error<RespondInviteError>> { pub fn respond_invite(configuration: &configuration::Configuration, notification_id: &str, invite_response: Option<crate::models::InviteResponse>) -> Result<crate::models::Notification, Error<RespondInviteError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/invite/{notificationId}/response", configuration.base_path, notificationId=crate::apis::urlencode(notification_id)); let local_var_uri_str = format!("{}/invite/{notificationId}/response", local_var_configuration.base_path, notificationId=crate::apis::urlencode(notification_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
local_var_req_builder = local_var_req_builder.json(&invite_response); local_var_req_builder = local_var_req_builder.json(&invite_response);
@ -242,13 +248,14 @@ pub fn respond_invite(configuration: &configuration::Configuration, notification
/// Updates a single Invite Message and then returns a list of all of them. Admin Credentials are required to update messages of other users! Updating a message automatically sets the cooldown timer to 60 minutes. Trying to edit a message before the cooldown timer expires results in a 429 Too Fast Error. Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite /// Updates a single Invite Message and then returns a list of all of them. Admin Credentials are required to update messages of other users! Updating a message automatically sets the cooldown timer to 60 minutes. Trying to edit a message before the cooldown timer expires results in a 429 Too Fast Error. Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite
pub fn update_invite_message(configuration: &configuration::Configuration, user_id: &str, message_type: &str, message_id: i32) -> Result<Vec<crate::models::InviteMessage>, Error<UpdateInviteMessageError>> { pub fn update_invite_message(configuration: &configuration::Configuration, user_id: &str, message_type: &str, message_id: i32) -> Result<Vec<crate::models::InviteMessage>, Error<UpdateInviteMessageError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/message/{userId}/{messageType}/{messageId}", configuration.base_path, userId=crate::apis::urlencode(user_id), messageType=crate::apis::urlencode(message_type), messageId=message_id); let local_var_uri_str = format!("{}/message/{userId}/{messageType}/{messageId}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id), messageType=crate::apis::urlencode(message_type), messageId=message_id);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }

View File

@ -13,7 +13,7 @@ use crate::apis::ResponseContent;
use super::{Error, configuration}; use super::{Error, configuration};
/// struct for typed errors of method `accept_friend_request` /// struct for typed errors of method [`accept_friend_request`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum AcceptFriendRequestError { pub enum AcceptFriendRequestError {
@ -22,7 +22,7 @@ pub enum AcceptFriendRequestError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `clear_notifications` /// struct for typed errors of method [`clear_notifications`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum ClearNotificationsError { pub enum ClearNotificationsError {
@ -30,7 +30,7 @@ pub enum ClearNotificationsError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `delete_notification` /// struct for typed errors of method [`delete_notification`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum DeleteNotificationError { pub enum DeleteNotificationError {
@ -38,7 +38,7 @@ pub enum DeleteNotificationError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `get_notifications` /// struct for typed errors of method [`get_notifications`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetNotificationsError { pub enum GetNotificationsError {
@ -46,7 +46,7 @@ pub enum GetNotificationsError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `mark_notification_as_read` /// struct for typed errors of method [`mark_notification_as_read`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum MarkNotificationAsReadError { pub enum MarkNotificationAsReadError {
@ -57,13 +57,14 @@ pub enum MarkNotificationAsReadError {
/// Accept a friend request by notification `frq_` ID. Friend requests can be found using the NotificationsAPI `getNotifications` by filtering of type `friendRequest`. /// Accept a friend request by notification `frq_` ID. Friend requests can be found using the NotificationsAPI `getNotifications` by filtering of type `friendRequest`.
pub fn accept_friend_request(configuration: &configuration::Configuration, notification_id: &str) -> Result<crate::models::Success, Error<AcceptFriendRequestError>> { pub fn accept_friend_request(configuration: &configuration::Configuration, notification_id: &str) -> Result<crate::models::Success, Error<AcceptFriendRequestError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/user/notifications/{notificationId}/accept", configuration.base_path, notificationId=crate::apis::urlencode(notification_id)); let local_var_uri_str = format!("{}/auth/user/notifications/{notificationId}/accept", local_var_configuration.base_path, notificationId=crate::apis::urlencode(notification_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -84,13 +85,14 @@ pub fn accept_friend_request(configuration: &configuration::Configuration, notif
/// Clear **all** notifications. /// Clear **all** notifications.
pub fn clear_notifications(configuration: &configuration::Configuration, ) -> Result<crate::models::Success, Error<ClearNotificationsError>> { pub fn clear_notifications(configuration: &configuration::Configuration, ) -> Result<crate::models::Success, Error<ClearNotificationsError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/user/notifications/clear", configuration.base_path); let local_var_uri_str = format!("{}/auth/user/notifications/clear", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -111,13 +113,14 @@ pub fn clear_notifications(configuration: &configuration::Configuration, ) -> Re
/// Delete a notification. /// Delete a notification.
pub fn delete_notification(configuration: &configuration::Configuration, notification_id: &str) -> Result<crate::models::Notification, Error<DeleteNotificationError>> { pub fn delete_notification(configuration: &configuration::Configuration, notification_id: &str) -> Result<crate::models::Notification, Error<DeleteNotificationError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/user/notifications/{notificationId}/hide", configuration.base_path, notificationId=crate::apis::urlencode(notification_id)); let local_var_uri_str = format!("{}/auth/user/notifications/{notificationId}/hide", local_var_configuration.base_path, notificationId=crate::apis::urlencode(notification_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -138,10 +141,11 @@ pub fn delete_notification(configuration: &configuration::Configuration, notific
/// Retrieve all of the current user's notifications. /// Retrieve all of the current user's notifications.
pub fn get_notifications(configuration: &configuration::Configuration, _type: Option<&str>, sent: Option<bool>, hidden: Option<bool>, after: Option<&str>, n: Option<i32>, offset: Option<i32>) -> Result<Vec<crate::models::Notification>, Error<GetNotificationsError>> { pub fn get_notifications(configuration: &configuration::Configuration, _type: Option<&str>, sent: Option<bool>, hidden: Option<bool>, after: Option<&str>, n: Option<i32>, offset: Option<i32>) -> Result<Vec<crate::models::Notification>, Error<GetNotificationsError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/user/notifications", configuration.base_path); let local_var_uri_str = format!("{}/auth/user/notifications", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_str) = _type { if let Some(ref local_var_str) = _type {
@ -162,7 +166,7 @@ pub fn get_notifications(configuration: &configuration::Configuration, _type: Op
if let Some(ref local_var_str) = offset { if let Some(ref local_var_str) = offset {
local_var_req_builder = local_var_req_builder.query(&[("offset", &local_var_str.to_string())]); local_var_req_builder = local_var_req_builder.query(&[("offset", &local_var_str.to_string())]);
} }
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -183,13 +187,14 @@ pub fn get_notifications(configuration: &configuration::Configuration, _type: Op
/// Mark a notification as seen. /// Mark a notification as seen.
pub fn mark_notification_as_read(configuration: &configuration::Configuration, notification_id: &str) -> Result<crate::models::Notification, Error<MarkNotificationAsReadError>> { pub fn mark_notification_as_read(configuration: &configuration::Configuration, notification_id: &str) -> Result<crate::models::Notification, Error<MarkNotificationAsReadError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/user/notifications/{notificationId}/see", configuration.base_path, notificationId=crate::apis::urlencode(notification_id)); let local_var_uri_str = format!("{}/auth/user/notifications/{notificationId}/see", local_var_configuration.base_path, notificationId=crate::apis::urlencode(notification_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }

View File

@ -13,7 +13,7 @@ use crate::apis::ResponseContent;
use super::{Error, configuration}; use super::{Error, configuration};
/// struct for typed errors of method `get_assigned_permissions` /// struct for typed errors of method [`get_assigned_permissions`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetAssignedPermissionsError { pub enum GetAssignedPermissionsError {
@ -21,7 +21,7 @@ pub enum GetAssignedPermissionsError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `get_permission` /// struct for typed errors of method [`get_permission`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetPermissionError { pub enum GetPermissionError {
@ -32,13 +32,14 @@ pub enum GetPermissionError {
/// Returns a list of all permissions currently granted by the user. Permissions are assigned e.g. by subscribing to VRC+. /// Returns a list of all permissions currently granted by the user. Permissions are assigned e.g. by subscribing to VRC+.
pub fn get_assigned_permissions(configuration: &configuration::Configuration, ) -> Result<Vec<crate::models::Permission>, Error<GetAssignedPermissionsError>> { pub fn get_assigned_permissions(configuration: &configuration::Configuration, ) -> Result<Vec<crate::models::Permission>, Error<GetAssignedPermissionsError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/permissions", configuration.base_path); let local_var_uri_str = format!("{}/auth/permissions", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -59,13 +60,14 @@ pub fn get_assigned_permissions(configuration: &configuration::Configuration, )
/// Returns a single permission. This endpoint is pretty useless, as it returns the exact same information as `/auth/permissions`. /// Returns a single permission. This endpoint is pretty useless, as it returns the exact same information as `/auth/permissions`.
pub fn get_permission(configuration: &configuration::Configuration, permission_id: &str) -> Result<crate::models::Permission, Error<GetPermissionError>> { pub fn get_permission(configuration: &configuration::Configuration, permission_id: &str) -> Result<crate::models::Permission, Error<GetPermissionError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/permissions/{permissionId}", configuration.base_path, permissionId=crate::apis::urlencode(permission_id)); let local_var_uri_str = format!("{}/permissions/{permissionId}", local_var_configuration.base_path, permissionId=crate::apis::urlencode(permission_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }

View File

@ -13,7 +13,7 @@ use crate::apis::ResponseContent;
use super::{Error, configuration}; use super::{Error, configuration};
/// struct for typed errors of method `clear_all_player_moderations` /// struct for typed errors of method [`clear_all_player_moderations`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum ClearAllPlayerModerationsError { pub enum ClearAllPlayerModerationsError {
@ -21,7 +21,7 @@ pub enum ClearAllPlayerModerationsError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `delete_player_moderation` /// struct for typed errors of method [`delete_player_moderation`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum DeletePlayerModerationError { pub enum DeletePlayerModerationError {
@ -30,7 +30,7 @@ pub enum DeletePlayerModerationError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `get_player_moderation` /// struct for typed errors of method [`get_player_moderation`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetPlayerModerationError { pub enum GetPlayerModerationError {
@ -39,7 +39,7 @@ pub enum GetPlayerModerationError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `get_player_moderations` /// struct for typed errors of method [`get_player_moderations`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetPlayerModerationsError { pub enum GetPlayerModerationsError {
@ -47,7 +47,7 @@ pub enum GetPlayerModerationsError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `moderate_user` /// struct for typed errors of method [`moderate_user`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum ModerateUserError { pub enum ModerateUserError {
@ -55,7 +55,7 @@ pub enum ModerateUserError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `unmoderate_user` /// struct for typed errors of method [`unmoderate_user`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum UnmoderateUserError { pub enum UnmoderateUserError {
@ -66,13 +66,14 @@ pub enum UnmoderateUserError {
/// ⚠️ **This will delete every single player moderation you've ever made.** /// ⚠️ **This will delete every single player moderation you've ever made.**
pub fn clear_all_player_moderations(configuration: &configuration::Configuration, ) -> Result<crate::models::Error, Error<ClearAllPlayerModerationsError>> { pub fn clear_all_player_moderations(configuration: &configuration::Configuration, ) -> Result<crate::models::Error, Error<ClearAllPlayerModerationsError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/user/playermoderations", configuration.base_path); let local_var_uri_str = format!("{}/auth/user/playermoderations", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -93,13 +94,14 @@ pub fn clear_all_player_moderations(configuration: &configuration::Configuration
/// Deletes a specific player moderation based on it's `pmod_` ID. The website uses `unmoderateUser` instead. You can delete the same player moderation multiple times successfully. /// Deletes a specific player moderation based on it's `pmod_` ID. The website uses `unmoderateUser` instead. You can delete the same player moderation multiple times successfully.
pub fn delete_player_moderation(configuration: &configuration::Configuration, player_moderation_id: &str) -> Result<crate::models::Success, Error<DeletePlayerModerationError>> { pub fn delete_player_moderation(configuration: &configuration::Configuration, player_moderation_id: &str) -> Result<crate::models::Success, Error<DeletePlayerModerationError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/user/playermoderations/{playerModerationId}", configuration.base_path, playerModerationId=crate::apis::urlencode(player_moderation_id)); let local_var_uri_str = format!("{}/auth/user/playermoderations/{playerModerationId}", local_var_configuration.base_path, playerModerationId=crate::apis::urlencode(player_moderation_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -120,13 +122,14 @@ pub fn delete_player_moderation(configuration: &configuration::Configuration, pl
/// Returns a single Player Moderation. This returns the exact same amount of information as the more generalised `getPlayerModerations`. /// Returns a single Player Moderation. This returns the exact same amount of information as the more generalised `getPlayerModerations`.
pub fn get_player_moderation(configuration: &configuration::Configuration, player_moderation_id: &str) -> Result<crate::models::PlayerModeration, Error<GetPlayerModerationError>> { pub fn get_player_moderation(configuration: &configuration::Configuration, player_moderation_id: &str) -> Result<crate::models::PlayerModeration, Error<GetPlayerModerationError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/user/playermoderations/{playerModerationId}", configuration.base_path, playerModerationId=crate::apis::urlencode(player_moderation_id)); let local_var_uri_str = format!("{}/auth/user/playermoderations/{playerModerationId}", local_var_configuration.base_path, playerModerationId=crate::apis::urlencode(player_moderation_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -147,10 +150,11 @@ pub fn get_player_moderation(configuration: &configuration::Configuration, playe
/// Returns a list of all player moderations made by **you**. This endpoint does not have pagination, and will return *all* results. Use query parameters to limit your query if needed. /// Returns a list of all player moderations made by **you**. This endpoint does not have pagination, and will return *all* results. Use query parameters to limit your query if needed.
pub fn get_player_moderations(configuration: &configuration::Configuration, _type: Option<&str>, target_user_id: Option<&str>) -> Result<Vec<crate::models::PlayerModeration>, Error<GetPlayerModerationsError>> { pub fn get_player_moderations(configuration: &configuration::Configuration, _type: Option<&str>, target_user_id: Option<&str>) -> Result<Vec<crate::models::PlayerModeration>, Error<GetPlayerModerationsError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/user/playermoderations", configuration.base_path); let local_var_uri_str = format!("{}/auth/user/playermoderations", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_str) = _type { if let Some(ref local_var_str) = _type {
@ -159,7 +163,7 @@ pub fn get_player_moderations(configuration: &configuration::Configuration, _typ
if let Some(ref local_var_str) = target_user_id { if let Some(ref local_var_str) = target_user_id {
local_var_req_builder = local_var_req_builder.query(&[("targetUserId", &local_var_str.to_string())]); local_var_req_builder = local_var_req_builder.query(&[("targetUserId", &local_var_str.to_string())]);
} }
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -180,13 +184,14 @@ pub fn get_player_moderations(configuration: &configuration::Configuration, _typ
/// Moderate a user, e.g. unmute them or show their avatar. /// Moderate a user, e.g. unmute them or show their avatar.
pub fn moderate_user(configuration: &configuration::Configuration, inline_object12: Option<crate::models::InlineObject12>) -> Result<crate::models::PlayerModeration, Error<ModerateUserError>> { pub fn moderate_user(configuration: &configuration::Configuration, inline_object12: Option<crate::models::InlineObject12>) -> Result<crate::models::PlayerModeration, Error<ModerateUserError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/user/playermoderations", configuration.base_path); let local_var_uri_str = format!("{}/auth/user/playermoderations", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
local_var_req_builder = local_var_req_builder.json(&inline_object12); local_var_req_builder = local_var_req_builder.json(&inline_object12);
@ -208,13 +213,14 @@ pub fn moderate_user(configuration: &configuration::Configuration, inline_object
/// Removes a player moderation previously added through `moderateUser`. E.g if you previuosly have shown their avatar, but now want to reset it to default. /// Removes a player moderation previously added through `moderateUser`. E.g if you previuosly have shown their avatar, but now want to reset it to default.
pub fn unmoderate_user(configuration: &configuration::Configuration, inline_object13: Option<crate::models::InlineObject13>) -> Result<crate::models::Success, Error<UnmoderateUserError>> { pub fn unmoderate_user(configuration: &configuration::Configuration, inline_object13: Option<crate::models::InlineObject13>) -> Result<crate::models::Success, Error<UnmoderateUserError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/user/unplayermoderate", configuration.base_path); let local_var_uri_str = format!("{}/auth/user/unplayermoderate", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
local_var_req_builder = local_var_req_builder.json(&inline_object13); local_var_req_builder = local_var_req_builder.json(&inline_object13);

View File

@ -13,14 +13,14 @@ use crate::apis::ResponseContent;
use super::{Error, configuration}; use super::{Error, configuration};
/// struct for typed errors of method `get_config` /// struct for typed errors of method [`get_config`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetConfigError { pub enum GetConfigError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `get_css` /// struct for typed errors of method [`get_css`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetCssError { pub enum GetCssError {
@ -28,21 +28,21 @@ pub enum GetCssError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `get_current_online_users` /// struct for typed errors of method [`get_current_online_users`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetCurrentOnlineUsersError { pub enum GetCurrentOnlineUsersError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `get_health` /// struct for typed errors of method [`get_health`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetHealthError { pub enum GetHealthError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `get_java_script` /// struct for typed errors of method [`get_java_script`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetJavaScriptError { pub enum GetJavaScriptError {
@ -50,7 +50,7 @@ pub enum GetJavaScriptError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `get_system_time` /// struct for typed errors of method [`get_system_time`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetSystemTimeError { pub enum GetSystemTimeError {
@ -60,13 +60,14 @@ pub enum GetSystemTimeError {
/// API config contains configuration that the clients needs to work properly. Currently the most important value here is `clientApiKey` which is used for all other API endpoints. /// API config contains configuration that the clients needs to work properly. Currently the most important value here is `clientApiKey` which is used for all other API endpoints.
pub fn get_config(configuration: &configuration::Configuration, ) -> Result<crate::models::ApiConfig, Error<GetConfigError>> { pub fn get_config(configuration: &configuration::Configuration, ) -> Result<crate::models::ApiConfig, Error<GetConfigError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/config", configuration.base_path); let local_var_uri_str = format!("{}/config", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -87,10 +88,11 @@ pub fn get_config(configuration: &configuration::Configuration, ) -> Result<crat
/// Fetches the CSS code to the frontend React website. /// Fetches the CSS code to the frontend React website.
pub fn get_css(configuration: &configuration::Configuration, variant: Option<&str>, branch: Option<&str>) -> Result<String, Error<GetCssError>> { pub fn get_css(configuration: &configuration::Configuration, variant: Option<&str>, branch: Option<&str>) -> Result<String, Error<GetCssError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/css/app.js", configuration.base_path); let local_var_uri_str = format!("{}/css/app.js", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_str) = variant { if let Some(ref local_var_str) = variant {
@ -99,7 +101,7 @@ pub fn get_css(configuration: &configuration::Configuration, variant: Option<&st
if let Some(ref local_var_str) = branch { if let Some(ref local_var_str) = branch {
local_var_req_builder = local_var_req_builder.query(&[("branch", &local_var_str.to_string())]); local_var_req_builder = local_var_req_builder.query(&[("branch", &local_var_str.to_string())]);
} }
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -120,13 +122,14 @@ pub fn get_css(configuration: &configuration::Configuration, variant: Option<&st
/// Returns in plain format the number of currently online users. **NOTE:** The response type is not of JSON, but is an integer in plain ASCII format. /// Returns in plain format the number of currently online users. **NOTE:** The response type is not of JSON, but is an integer in plain ASCII format.
pub fn get_current_online_users(configuration: &configuration::Configuration, ) -> Result<i32, Error<GetCurrentOnlineUsersError>> { pub fn get_current_online_users(configuration: &configuration::Configuration, ) -> Result<i32, Error<GetCurrentOnlineUsersError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/visits", configuration.base_path); let local_var_uri_str = format!("{}/visits", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -147,13 +150,14 @@ pub fn get_current_online_users(configuration: &configuration::Configuration, )
/// ~~Gets the overall health status, the server name, and the current build version tag of the API.~~ **DEPRECATED:** VRChat has suddenly restricted this endpoint for unknown reasons, and now always return 401 Unauthorized. /// ~~Gets the overall health status, the server name, and the current build version tag of the API.~~ **DEPRECATED:** VRChat has suddenly restricted this endpoint for unknown reasons, and now always return 401 Unauthorized.
pub fn get_health(configuration: &configuration::Configuration, ) -> Result<crate::models::InlineResponse2002, Error<GetHealthError>> { pub fn get_health(configuration: &configuration::Configuration, ) -> Result<crate::models::InlineResponse2002, Error<GetHealthError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/health", configuration.base_path); let local_var_uri_str = format!("{}/health", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -174,10 +178,11 @@ pub fn get_health(configuration: &configuration::Configuration, ) -> Result<crat
/// Fetches the JavaScript code to the frontend React website. /// Fetches the JavaScript code to the frontend React website.
pub fn get_java_script(configuration: &configuration::Configuration, variant: Option<&str>, branch: Option<&str>) -> Result<String, Error<GetJavaScriptError>> { pub fn get_java_script(configuration: &configuration::Configuration, variant: Option<&str>, branch: Option<&str>) -> Result<String, Error<GetJavaScriptError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/js/app.js", configuration.base_path); let local_var_uri_str = format!("{}/js/app.js", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_str) = variant { if let Some(ref local_var_str) = variant {
@ -186,7 +191,7 @@ pub fn get_java_script(configuration: &configuration::Configuration, variant: Op
if let Some(ref local_var_str) = branch { if let Some(ref local_var_str) = branch {
local_var_req_builder = local_var_req_builder.query(&[("branch", &local_var_str.to_string())]); local_var_req_builder = local_var_req_builder.query(&[("branch", &local_var_str.to_string())]);
} }
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -207,13 +212,14 @@ pub fn get_java_script(configuration: &configuration::Configuration, variant: Op
/// Returns in plain format the current time of the API server. **NOTE:** The response type is not of JSON, but is a string in plain ASCII format. /// Returns in plain format the current time of the API server. **NOTE:** The response type is not of JSON, but is a string in plain ASCII format.
pub fn get_system_time(configuration: &configuration::Configuration, ) -> Result<String, Error<GetSystemTimeError>> { pub fn get_system_time(configuration: &configuration::Configuration, ) -> Result<String, Error<GetSystemTimeError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/time", configuration.base_path); let local_var_uri_str = format!("{}/time", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }

View File

@ -13,7 +13,7 @@ use crate::apis::ResponseContent;
use super::{Error, configuration}; use super::{Error, configuration};
/// struct for typed errors of method `get_user` /// struct for typed errors of method [`get_user`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetUserError { pub enum GetUserError {
@ -21,7 +21,7 @@ pub enum GetUserError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `get_user_by_name` /// struct for typed errors of method [`get_user_by_name`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetUserByNameError { pub enum GetUserByNameError {
@ -29,7 +29,7 @@ pub enum GetUserByNameError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `search_users` /// struct for typed errors of method [`search_users`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum SearchUsersError { pub enum SearchUsersError {
@ -38,7 +38,7 @@ pub enum SearchUsersError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `update_user` /// struct for typed errors of method [`update_user`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum UpdateUserError { pub enum UpdateUserError {
@ -48,13 +48,14 @@ pub enum UpdateUserError {
/// Get public user information about a specific user using their ID. /// Get public user information about a specific user using their ID.
pub fn get_user(configuration: &configuration::Configuration, user_id: &str) -> Result<crate::models::User, Error<GetUserError>> { pub fn get_user(configuration: &configuration::Configuration, user_id: &str) -> Result<crate::models::User, Error<GetUserError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/users/{userId}", configuration.base_path, userId=crate::apis::urlencode(user_id)); let local_var_uri_str = format!("{}/users/{userId}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -75,13 +76,14 @@ pub fn get_user(configuration: &configuration::Configuration, user_id: &str) ->
/// Get public user information about a specific user using their name. /// Get public user information about a specific user using their name.
pub fn get_user_by_name(configuration: &configuration::Configuration, username: &str) -> Result<crate::models::User, Error<GetUserByNameError>> { pub fn get_user_by_name(configuration: &configuration::Configuration, username: &str) -> Result<crate::models::User, Error<GetUserByNameError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/users/{username}/name", configuration.base_path, username=crate::apis::urlencode(username)); let local_var_uri_str = format!("{}/users/{username}/name", local_var_configuration.base_path, username=crate::apis::urlencode(username));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -102,10 +104,11 @@ pub fn get_user_by_name(configuration: &configuration::Configuration, username:
/// Search and list any users by text query /// Search and list any users by text query
pub fn search_users(configuration: &configuration::Configuration, search: Option<&str>, developer_type: Option<&str>, n: Option<i32>, offset: Option<i32>) -> Result<Vec<crate::models::LimitedUser>, Error<SearchUsersError>> { pub fn search_users(configuration: &configuration::Configuration, search: Option<&str>, developer_type: Option<&str>, n: Option<i32>, offset: Option<i32>) -> Result<Vec<crate::models::LimitedUser>, Error<SearchUsersError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/users", configuration.base_path); let local_var_uri_str = format!("{}/users", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_str) = search { if let Some(ref local_var_str) = search {
@ -120,7 +123,7 @@ pub fn search_users(configuration: &configuration::Configuration, search: Option
if let Some(ref local_var_str) = offset { if let Some(ref local_var_str) = offset {
local_var_req_builder = local_var_req_builder.query(&[("offset", &local_var_str.to_string())]); local_var_req_builder = local_var_req_builder.query(&[("offset", &local_var_str.to_string())]);
} }
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -141,13 +144,14 @@ pub fn search_users(configuration: &configuration::Configuration, search: Option
/// Update a users information such as the email and birthday. /// Update a users information such as the email and birthday.
pub fn update_user(configuration: &configuration::Configuration, user_id: &str, inline_object2: Option<crate::models::InlineObject2>) -> Result<crate::models::CurrentUser, Error<UpdateUserError>> { pub fn update_user(configuration: &configuration::Configuration, user_id: &str, inline_object2: Option<crate::models::InlineObject2>) -> Result<crate::models::CurrentUser, Error<UpdateUserError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/users/{userId}", configuration.base_path, userId=crate::apis::urlencode(user_id)); let local_var_uri_str = format!("{}/users/{userId}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
local_var_req_builder = local_var_req_builder.json(&inline_object2); local_var_req_builder = local_var_req_builder.json(&inline_object2);

View File

@ -13,7 +13,7 @@ use crate::apis::ResponseContent;
use super::{Error, configuration}; use super::{Error, configuration};
/// struct for typed errors of method `create_world` /// struct for typed errors of method [`create_world`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum CreateWorldError { pub enum CreateWorldError {
@ -22,7 +22,7 @@ pub enum CreateWorldError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `delete_world` /// struct for typed errors of method [`delete_world`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum DeleteWorldError { pub enum DeleteWorldError {
@ -31,7 +31,7 @@ pub enum DeleteWorldError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `get_active_worlds` /// struct for typed errors of method [`get_active_worlds`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetActiveWorldsError { pub enum GetActiveWorldsError {
@ -39,7 +39,7 @@ pub enum GetActiveWorldsError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `get_favorited_worlds` /// struct for typed errors of method [`get_favorited_worlds`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetFavoritedWorldsError { pub enum GetFavoritedWorldsError {
@ -48,7 +48,7 @@ pub enum GetFavoritedWorldsError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `get_recent_worlds` /// struct for typed errors of method [`get_recent_worlds`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetRecentWorldsError { pub enum GetRecentWorldsError {
@ -57,7 +57,7 @@ pub enum GetRecentWorldsError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `get_world` /// struct for typed errors of method [`get_world`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetWorldError { pub enum GetWorldError {
@ -65,7 +65,7 @@ pub enum GetWorldError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `get_world_instance` /// struct for typed errors of method [`get_world_instance`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetWorldInstanceError { pub enum GetWorldInstanceError {
@ -73,7 +73,7 @@ pub enum GetWorldInstanceError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `get_world_metadata` /// struct for typed errors of method [`get_world_metadata`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetWorldMetadataError { pub enum GetWorldMetadataError {
@ -81,7 +81,7 @@ pub enum GetWorldMetadataError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `get_world_publish_status` /// struct for typed errors of method [`get_world_publish_status`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum GetWorldPublishStatusError { pub enum GetWorldPublishStatusError {
@ -90,7 +90,7 @@ pub enum GetWorldPublishStatusError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `publish_world` /// struct for typed errors of method [`publish_world`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum PublishWorldError { pub enum PublishWorldError {
@ -99,7 +99,7 @@ pub enum PublishWorldError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `search_worlds` /// struct for typed errors of method [`search_worlds`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum SearchWorldsError { pub enum SearchWorldsError {
@ -107,7 +107,7 @@ pub enum SearchWorldsError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `unpublish_world` /// struct for typed errors of method [`unpublish_world`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum UnpublishWorldError { pub enum UnpublishWorldError {
@ -116,7 +116,7 @@ pub enum UnpublishWorldError {
UnknownValue(serde_json::Value), UnknownValue(serde_json::Value),
} }
/// struct for typed errors of method `update_world` /// struct for typed errors of method [`update_world`]
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)] #[serde(untagged)]
pub enum UpdateWorldError { pub enum UpdateWorldError {
@ -128,13 +128,14 @@ pub enum UpdateWorldError {
/// Create a new world. This endpoint requires `assetUrl` to be a valid File object with `.vrcw` file extension, and `imageUrl` to be a valid File object with an image file extension. /// Create a new world. This endpoint requires `assetUrl` to be a valid File object with `.vrcw` file extension, and `imageUrl` to be a valid File object with an image file extension.
pub fn create_world(configuration: &configuration::Configuration, inline_object6: Option<crate::models::InlineObject6>) -> Result<crate::models::World, Error<CreateWorldError>> { pub fn create_world(configuration: &configuration::Configuration, inline_object6: Option<crate::models::InlineObject6>) -> Result<crate::models::World, Error<CreateWorldError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/worlds", configuration.base_path); let local_var_uri_str = format!("{}/worlds", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
local_var_req_builder = local_var_req_builder.json(&inline_object6); local_var_req_builder = local_var_req_builder.json(&inline_object6);
@ -156,13 +157,14 @@ pub fn create_world(configuration: &configuration::Configuration, inline_object6
/// Delete a world. Notice a world is never fully \"deleted\", only its ReleaseStatus is set to \"hidden\" and the linked Files are deleted. The WorldID is permanently reserved. /// Delete a world. Notice a world is never fully \"deleted\", only its ReleaseStatus is set to \"hidden\" and the linked Files are deleted. The WorldID is permanently reserved.
pub fn delete_world(configuration: &configuration::Configuration, world_id: &str) -> Result<(), Error<DeleteWorldError>> { pub fn delete_world(configuration: &configuration::Configuration, world_id: &str) -> Result<(), Error<DeleteWorldError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/worlds/{worldId}", configuration.base_path, worldId=crate::apis::urlencode(world_id)); let local_var_uri_str = format!("{}/worlds/{worldId}", local_var_configuration.base_path, worldId=crate::apis::urlencode(world_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -183,10 +185,11 @@ pub fn delete_world(configuration: &configuration::Configuration, world_id: &str
/// Search and list currently Active worlds by query filters. /// Search and list currently Active worlds by query filters.
pub fn get_active_worlds(configuration: &configuration::Configuration, featured: Option<&str>, sort: Option<&str>, n: Option<i32>, order: Option<&str>, offset: Option<i32>, search: Option<&str>, tag: Option<&str>, notag: Option<&str>, release_status: Option<&str>, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>) -> Result<Vec<crate::models::LimitedWorld>, Error<GetActiveWorldsError>> { pub fn get_active_worlds(configuration: &configuration::Configuration, featured: Option<&str>, sort: Option<&str>, n: Option<i32>, order: Option<&str>, offset: Option<i32>, search: Option<&str>, tag: Option<&str>, notag: Option<&str>, release_status: Option<&str>, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>) -> Result<Vec<crate::models::LimitedWorld>, Error<GetActiveWorldsError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/worlds/active", configuration.base_path); let local_var_uri_str = format!("{}/worlds/active", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_str) = featured { if let Some(ref local_var_str) = featured {
@ -225,7 +228,7 @@ pub fn get_active_worlds(configuration: &configuration::Configuration, featured:
if let Some(ref local_var_str) = platform { if let Some(ref local_var_str) = platform {
local_var_req_builder = local_var_req_builder.query(&[("platform", &local_var_str.to_string())]); local_var_req_builder = local_var_req_builder.query(&[("platform", &local_var_str.to_string())]);
} }
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -246,10 +249,11 @@ pub fn get_active_worlds(configuration: &configuration::Configuration, featured:
/// Search and list favorited worlds by query filters. /// Search and list favorited worlds by query filters.
pub fn get_favorited_worlds(configuration: &configuration::Configuration, featured: Option<&str>, sort: Option<&str>, n: Option<i32>, order: Option<&str>, offset: Option<i32>, search: Option<&str>, tag: Option<&str>, notag: Option<&str>, release_status: Option<&str>, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>, user_id: Option<&str>) -> Result<Vec<crate::models::LimitedWorld>, Error<GetFavoritedWorldsError>> { pub fn get_favorited_worlds(configuration: &configuration::Configuration, featured: Option<&str>, sort: Option<&str>, n: Option<i32>, order: Option<&str>, offset: Option<i32>, search: Option<&str>, tag: Option<&str>, notag: Option<&str>, release_status: Option<&str>, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>, user_id: Option<&str>) -> Result<Vec<crate::models::LimitedWorld>, Error<GetFavoritedWorldsError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/worlds/favorites", configuration.base_path); let local_var_uri_str = format!("{}/worlds/favorites", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_str) = featured { if let Some(ref local_var_str) = featured {
@ -291,7 +295,7 @@ pub fn get_favorited_worlds(configuration: &configuration::Configuration, featur
if let Some(ref local_var_str) = user_id { if let Some(ref local_var_str) = user_id {
local_var_req_builder = local_var_req_builder.query(&[("userId", &local_var_str.to_string())]); local_var_req_builder = local_var_req_builder.query(&[("userId", &local_var_str.to_string())]);
} }
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -312,10 +316,11 @@ pub fn get_favorited_worlds(configuration: &configuration::Configuration, featur
/// Search and list recently visited worlds by query filters. /// Search and list recently visited worlds by query filters.
pub fn get_recent_worlds(configuration: &configuration::Configuration, featured: Option<&str>, sort: Option<&str>, n: Option<i32>, order: Option<&str>, offset: Option<i32>, search: Option<&str>, tag: Option<&str>, notag: Option<&str>, release_status: Option<&str>, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>, user_id: Option<&str>) -> Result<Vec<crate::models::LimitedWorld>, Error<GetRecentWorldsError>> { pub fn get_recent_worlds(configuration: &configuration::Configuration, featured: Option<&str>, sort: Option<&str>, n: Option<i32>, order: Option<&str>, offset: Option<i32>, search: Option<&str>, tag: Option<&str>, notag: Option<&str>, release_status: Option<&str>, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>, user_id: Option<&str>) -> Result<Vec<crate::models::LimitedWorld>, Error<GetRecentWorldsError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/worlds/recent", configuration.base_path); let local_var_uri_str = format!("{}/worlds/recent", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_str) = featured { if let Some(ref local_var_str) = featured {
@ -357,7 +362,7 @@ pub fn get_recent_worlds(configuration: &configuration::Configuration, featured:
if let Some(ref local_var_str) = user_id { if let Some(ref local_var_str) = user_id {
local_var_req_builder = local_var_req_builder.query(&[("userId", &local_var_str.to_string())]); local_var_req_builder = local_var_req_builder.query(&[("userId", &local_var_str.to_string())]);
} }
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -378,13 +383,14 @@ pub fn get_recent_worlds(configuration: &configuration::Configuration, featured:
/// Get information about a specific World. /// Get information about a specific World.
pub fn get_world(configuration: &configuration::Configuration, world_id: &str) -> Result<crate::models::World, Error<GetWorldError>> { pub fn get_world(configuration: &configuration::Configuration, world_id: &str) -> Result<crate::models::World, Error<GetWorldError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/worlds/{worldId}", configuration.base_path, worldId=crate::apis::urlencode(world_id)); let local_var_uri_str = format!("{}/worlds/{worldId}", local_var_configuration.base_path, worldId=crate::apis::urlencode(world_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -405,13 +411,14 @@ pub fn get_world(configuration: &configuration::Configuration, world_id: &str) -
/// Returns a worlds instance. /// Returns a worlds instance.
pub fn get_world_instance(configuration: &configuration::Configuration, world_id: &str, instance_id: &str) -> Result<crate::models::Instance, Error<GetWorldInstanceError>> { pub fn get_world_instance(configuration: &configuration::Configuration, world_id: &str, instance_id: &str) -> Result<crate::models::Instance, Error<GetWorldInstanceError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/worlds/{worldId}/{instanceId}", configuration.base_path, worldId=crate::apis::urlencode(world_id), instanceId=crate::apis::urlencode(instance_id)); let local_var_uri_str = format!("{}/worlds/{worldId}/{instanceId}", local_var_configuration.base_path, worldId=crate::apis::urlencode(world_id), instanceId=crate::apis::urlencode(instance_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -432,13 +439,14 @@ pub fn get_world_instance(configuration: &configuration::Configuration, world_id
/// Return a worlds custom metadata. This is currently believed to be unused. Metadata can be set with `updateWorld` and can be any arbitrary object. /// Return a worlds custom metadata. This is currently believed to be unused. Metadata can be set with `updateWorld` and can be any arbitrary object.
pub fn get_world_metadata(configuration: &configuration::Configuration, world_id: &str) -> Result<crate::models::InlineResponse2005, Error<GetWorldMetadataError>> { pub fn get_world_metadata(configuration: &configuration::Configuration, world_id: &str) -> Result<crate::models::InlineResponse2005, Error<GetWorldMetadataError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/worlds/{worldId}/metadata", configuration.base_path, worldId=crate::apis::urlencode(world_id)); let local_var_uri_str = format!("{}/worlds/{worldId}/metadata", local_var_configuration.base_path, worldId=crate::apis::urlencode(world_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -459,13 +467,14 @@ pub fn get_world_metadata(configuration: &configuration::Configuration, world_id
/// Returns a worlds publish status. /// Returns a worlds publish status.
pub fn get_world_publish_status(configuration: &configuration::Configuration, world_id: &str) -> Result<crate::models::InlineResponse2006, Error<GetWorldPublishStatusError>> { pub fn get_world_publish_status(configuration: &configuration::Configuration, world_id: &str) -> Result<crate::models::InlineResponse2006, Error<GetWorldPublishStatusError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/worlds/{worldId}/publish", configuration.base_path, worldId=crate::apis::urlencode(world_id)); let local_var_uri_str = format!("{}/worlds/{worldId}/publish", local_var_configuration.base_path, worldId=crate::apis::urlencode(world_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -486,13 +495,14 @@ pub fn get_world_publish_status(configuration: &configuration::Configuration, wo
/// Publish a world. You can only publish one world per week. /// Publish a world. You can only publish one world per week.
pub fn publish_world(configuration: &configuration::Configuration, world_id: &str) -> Result<(), Error<PublishWorldError>> { pub fn publish_world(configuration: &configuration::Configuration, world_id: &str) -> Result<(), Error<PublishWorldError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/worlds/{worldId}/publish", configuration.base_path, worldId=crate::apis::urlencode(world_id)); let local_var_uri_str = format!("{}/worlds/{worldId}/publish", local_var_configuration.base_path, worldId=crate::apis::urlencode(world_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -513,10 +523,11 @@ pub fn publish_world(configuration: &configuration::Configuration, world_id: &st
/// Search and list any worlds by query filters. /// Search and list any worlds by query filters.
pub fn search_worlds(configuration: &configuration::Configuration, featured: Option<&str>, sort: Option<&str>, user: Option<&str>, user_id: Option<&str>, n: Option<i32>, order: Option<&str>, offset: Option<i32>, search: Option<&str>, tag: Option<&str>, notag: Option<&str>, release_status: Option<&str>, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>) -> Result<Vec<crate::models::LimitedWorld>, Error<SearchWorldsError>> { pub fn search_worlds(configuration: &configuration::Configuration, featured: Option<&str>, sort: Option<&str>, user: Option<&str>, user_id: Option<&str>, n: Option<i32>, order: Option<&str>, offset: Option<i32>, search: Option<&str>, tag: Option<&str>, notag: Option<&str>, release_status: Option<&str>, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>) -> Result<Vec<crate::models::LimitedWorld>, Error<SearchWorldsError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/worlds", configuration.base_path); let local_var_uri_str = format!("{}/worlds", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_str) = featured { if let Some(ref local_var_str) = featured {
@ -561,7 +572,7 @@ pub fn search_worlds(configuration: &configuration::Configuration, featured: Opt
if let Some(ref local_var_str) = platform { if let Some(ref local_var_str) = platform {
local_var_req_builder = local_var_req_builder.query(&[("platform", &local_var_str.to_string())]); local_var_req_builder = local_var_req_builder.query(&[("platform", &local_var_str.to_string())]);
} }
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -582,13 +593,14 @@ pub fn search_worlds(configuration: &configuration::Configuration, featured: Opt
/// Unpublish a world. /// Unpublish a world.
pub fn unpublish_world(configuration: &configuration::Configuration, world_id: &str) -> Result<(), Error<UnpublishWorldError>> { pub fn unpublish_world(configuration: &configuration::Configuration, world_id: &str) -> Result<(), Error<UnpublishWorldError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/worlds/{worldId}/publish", configuration.base_path, worldId=crate::apis::urlencode(world_id)); let local_var_uri_str = format!("{}/worlds/{worldId}/publish", local_var_configuration.base_path, worldId=crate::apis::urlencode(world_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
@ -609,13 +621,14 @@ pub fn unpublish_world(configuration: &configuration::Configuration, world_id: &
/// Update information about a specific World. /// Update information about a specific World.
pub fn update_world(configuration: &configuration::Configuration, world_id: &str, inline_object7: Option<crate::models::InlineObject7>) -> Result<crate::models::World, Error<UpdateWorldError>> { pub fn update_world(configuration: &configuration::Configuration, world_id: &str, inline_object7: Option<crate::models::InlineObject7>) -> Result<crate::models::World, Error<UpdateWorldError>> {
let local_var_configuration = configuration;
let local_var_client = &configuration.client; let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/worlds/{worldId}", configuration.base_path, worldId=crate::apis::urlencode(world_id)); let local_var_uri_str = format!("{}/worlds/{worldId}", local_var_configuration.base_path, worldId=crate::apis::urlencode(world_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = configuration.user_agent { if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
} }
local_var_req_builder = local_var_req_builder.json(&inline_object7); local_var_req_builder = local_var_req_builder.json(&inline_object7);

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct ApiConfig { pub struct ApiConfig {
/// Unknown, probably voice optimization testing /// Unknown, probably voice optimization testing
#[serde(rename = "VoiceEnableDegradation")] #[serde(rename = "VoiceEnableDegradation")]

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct ApiEventConfig { pub struct ApiEventConfig {
/// Unknown /// Unknown
#[serde(rename = "distanceClose")] #[serde(rename = "distanceClose")]

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Avatar { pub struct Avatar {
/// Not present from general serach `/avatars`, only on specific requests `/avatars/{avatarId}`. /// Not present from general serach `/avatars`, only on specific requests `/avatars/{avatarId}`.
#[serde(rename = "assetUrl", skip_serializing_if = "Option::is_none")] #[serde(rename = "assetUrl", skip_serializing_if = "Option::is_none")]

View File

@ -10,7 +10,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct AvatarUnityPackageUrlObject { pub struct AvatarUnityPackageUrlObject {
#[serde(rename = "unityPackageUrl", skip_serializing_if = "Option::is_none")] #[serde(rename = "unityPackageUrl", skip_serializing_if = "Option::is_none")]
pub unity_package_url: Option<String>, pub unity_package_url: Option<String>,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CurrentUser { pub struct CurrentUser {
#[serde(rename = "acceptedTOSVersion")] #[serde(rename = "acceptedTOSVersion")]
pub accepted_tos_version: i32, pub accepted_tos_version: i32,

View File

@ -10,7 +10,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct DownloadUrlList { pub struct DownloadUrlList {
/// Download link for legacy SDK2 /// Download link for legacy SDK2
#[serde(rename = "sdk2")] #[serde(rename = "sdk2")]

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct DynamicWorldRow { pub struct DynamicWorldRow {
#[serde(rename = "index")] #[serde(rename = "index")]
pub index: i32, pub index: i32,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Error { pub struct Error {
#[serde(rename = "error", skip_serializing_if = "Option::is_none")] #[serde(rename = "error", skip_serializing_if = "Option::is_none")]
pub error: Option<Box<crate::models::Response>>, pub error: Option<Box<crate::models::Response>>,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Favorite { pub struct Favorite {
/// MUST be either AvatarID, UserID or WorldID. /// MUST be either AvatarID, UserID or WorldID.
#[serde(rename = "favoriteId")] #[serde(rename = "favoriteId")]

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct FavoriteGroup { pub struct FavoriteGroup {
#[serde(rename = "displayName")] #[serde(rename = "displayName")]
pub display_name: String, pub display_name: String,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct File { pub struct File {
#[serde(rename = "extension")] #[serde(rename = "extension")]
pub extension: String, pub extension: String,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct FileData { pub struct FileData {
#[serde(rename = "category")] #[serde(rename = "category")]
pub category: Category, pub category: Category,
@ -52,3 +52,9 @@ pub enum Category {
Simple, Simple,
} }
impl Default for Category {
fn default() -> Category {
Self::Multipart
}
}

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct FileVersion { pub struct FileVersion {
#[serde(rename = "created_at")] #[serde(rename = "created_at")]
pub created_at: String, pub created_at: String,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct FriendStatus { pub struct FriendStatus {
#[serde(rename = "incomingRequest")] #[serde(rename = "incomingRequest")]
pub incoming_request: bool, pub incoming_request: bool,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InlineObject { pub struct InlineObject {
#[serde(rename = "code")] #[serde(rename = "code")]
pub code: String, pub code: String,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InlineObject1 { pub struct InlineObject1 {
#[serde(rename = "code")] #[serde(rename = "code")]
pub code: String, pub code: String,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InlineObject10 { pub struct InlineObject10 {
#[serde(rename = "assetUrl", skip_serializing_if = "Option::is_none")] #[serde(rename = "assetUrl", skip_serializing_if = "Option::is_none")]
pub asset_url: Option<String>, pub asset_url: Option<String>,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InlineObject11 { pub struct InlineObject11 {
#[serde(rename = "assetUrl", skip_serializing_if = "Option::is_none")] #[serde(rename = "assetUrl", skip_serializing_if = "Option::is_none")]
pub asset_url: Option<String>, pub asset_url: Option<String>,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InlineObject12 { pub struct InlineObject12 {
#[serde(rename = "moderated")] #[serde(rename = "moderated")]
pub moderated: String, pub moderated: String,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InlineObject13 { pub struct InlineObject13 {
#[serde(rename = "moderated", skip_serializing_if = "Option::is_none")] #[serde(rename = "moderated", skip_serializing_if = "Option::is_none")]
pub moderated: Option<String>, pub moderated: Option<String>,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InlineObject2 { pub struct InlineObject2 {
#[serde(rename = "email", skip_serializing_if = "Option::is_none")] #[serde(rename = "email", skip_serializing_if = "Option::is_none")]
pub email: Option<String>, pub email: Option<String>,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InlineObject3 { pub struct InlineObject3 {
#[serde(rename = "name")] #[serde(rename = "name")]
pub name: String, pub name: String,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InlineObject4 { pub struct InlineObject4 {
#[serde(rename = "signatureMd5")] #[serde(rename = "signatureMd5")]
pub signature_md5: String, pub signature_md5: String,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InlineObject5 { pub struct InlineObject5 {
/// Array of ETags uploaded. /// Array of ETags uploaded.
#[serde(rename = "etags", skip_serializing_if = "Option::is_none")] #[serde(rename = "etags", skip_serializing_if = "Option::is_none")]

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InlineObject6 { pub struct InlineObject6 {
#[serde(rename = "assetUrl")] #[serde(rename = "assetUrl")]
pub asset_url: String, pub asset_url: String,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InlineObject7 { pub struct InlineObject7 {
#[serde(rename = "assetUrl", skip_serializing_if = "Option::is_none")] #[serde(rename = "assetUrl", skip_serializing_if = "Option::is_none")]
pub asset_url: Option<String>, pub asset_url: Option<String>,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InlineObject8 { pub struct InlineObject8 {
#[serde(rename = "type")] #[serde(rename = "type")]
pub _type: crate::models::FavoriteType, pub _type: crate::models::FavoriteType,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InlineObject9 { pub struct InlineObject9 {
#[serde(rename = "displayName", skip_serializing_if = "Option::is_none")] #[serde(rename = "displayName", skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>, pub display_name: Option<String>,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InlineResponse200 { pub struct InlineResponse200 {
#[serde(rename = "ok")] #[serde(rename = "ok")]
pub ok: bool, pub ok: bool,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InlineResponse2001 { pub struct InlineResponse2001 {
#[serde(rename = "verified")] #[serde(rename = "verified")]
pub verified: bool, pub verified: bool,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InlineResponse2002 { pub struct InlineResponse2002 {
#[serde(rename = "ok")] #[serde(rename = "ok")]
pub ok: bool, pub ok: bool,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InlineResponse2003 { pub struct InlineResponse2003 {
#[serde(rename = "uploadId")] #[serde(rename = "uploadId")]
pub upload_id: String, pub upload_id: String,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InlineResponse2004 { pub struct InlineResponse2004 {
#[serde(rename = "url")] #[serde(rename = "url")]
pub url: String, pub url: String,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InlineResponse2005 { pub struct InlineResponse2005 {
#[serde(rename = "id")] #[serde(rename = "id")]
pub id: String, pub id: String,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InlineResponse2006 { pub struct InlineResponse2006 {
#[serde(rename = "canPubilsh")] #[serde(rename = "canPubilsh")]
pub can_pubilsh: bool, pub can_pubilsh: bool,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InlineResponse400 { pub struct InlineResponse400 {
#[serde(rename = "error")] #[serde(rename = "error")]
pub error: Box<crate::models::Error>, pub error: Box<crate::models::Error>,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Instance { pub struct Instance {
#[serde(rename = "active")] #[serde(rename = "active")]
pub active: bool, pub active: bool,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InstancePlatforms { pub struct InstancePlatforms {
#[serde(rename = "android")] #[serde(rename = "android")]
pub android: i32, pub android: i32,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InviteMessage { pub struct InviteMessage {
#[serde(rename = "canBeUpdated")] #[serde(rename = "canBeUpdated")]
pub can_be_updated: bool, pub can_be_updated: bool,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InviteRequest { pub struct InviteRequest {
#[serde(rename = "instanceId")] #[serde(rename = "instanceId")]
pub instance_id: String, pub instance_id: String,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InviteResponse { pub struct InviteResponse {
#[serde(rename = "responseSlot")] #[serde(rename = "responseSlot")]
pub response_slot: i32, pub response_slot: i32,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct LimitedUnityPackage { pub struct LimitedUnityPackage {
/// This can be `standalonewindows` or `android`, but can also pretty much be any random Unity verison such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. /// This can be `standalonewindows` or `android`, but can also pretty much be any random Unity verison such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`.
#[serde(rename = "platform")] #[serde(rename = "platform")]

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct LimitedUser { pub struct LimitedUser {
#[serde(rename = "bio", skip_serializing_if = "Option::is_none")] #[serde(rename = "bio", skip_serializing_if = "Option::is_none")]
pub bio: Option<String>, pub bio: Option<String>,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct LimitedWorld { pub struct LimitedWorld {
#[serde(rename = "authorId")] #[serde(rename = "authorId")]
pub author_id: String, pub author_id: String,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Notification { pub struct Notification {
#[serde(rename = "created_at")] #[serde(rename = "created_at")]
pub created_at: String, pub created_at: String,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct PastDisplayName { pub struct PastDisplayName {
#[serde(rename = "displayName")] #[serde(rename = "displayName")]
pub display_name: String, pub display_name: String,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Permission { pub struct Permission {
#[serde(rename = "data", skip_serializing_if = "Option::is_none")] #[serde(rename = "data", skip_serializing_if = "Option::is_none")]
pub data: Option<serde_json::Value>, pub data: Option<serde_json::Value>,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct PlayerModeration { pub struct PlayerModeration {
#[serde(rename = "created")] #[serde(rename = "created")]
pub created: String, pub created: String,

View File

@ -10,7 +10,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct PublicAnnouncement { pub struct PublicAnnouncement {
/// Announcement name /// Announcement name
#[serde(rename = "name")] #[serde(rename = "name")]

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Response { pub struct Response {
#[serde(rename = "message", skip_serializing_if = "Option::is_none")] #[serde(rename = "message", skip_serializing_if = "Option::is_none")]
pub message: Option<String>, pub message: Option<String>,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Success { pub struct Success {
#[serde(rename = "success", skip_serializing_if = "Option::is_none")] #[serde(rename = "success", skip_serializing_if = "Option::is_none")]
pub success: Option<Box<crate::models::Response>>, pub success: Option<Box<crate::models::Response>>,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct UnityPackage { pub struct UnityPackage {
#[serde(rename = "assetUrl", skip_serializing_if = "Option::is_none")] #[serde(rename = "assetUrl", skip_serializing_if = "Option::is_none")]
pub asset_url: Option<String>, pub asset_url: Option<String>,

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct User { pub struct User {
#[serde(rename = "allowAvatarCopying")] #[serde(rename = "allowAvatarCopying")]
pub allow_avatar_copying: bool, pub allow_avatar_copying: bool,

View File

@ -10,7 +10,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct UserExists { pub struct UserExists {
/// Status if a user exist with that username or userId. /// Status if a user exist with that username or userId.
#[serde(rename = "userExists")] #[serde(rename = "userExists")]

View File

@ -9,7 +9,7 @@
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct World { pub struct World {
#[serde(rename = "assetUrl")] #[serde(rename = "assetUrl")]
pub asset_url: String, pub asset_url: String,