mirror of
https://github.com/mii443/vrchatapi-rust.git
synced 2025-08-22 07:35:35 +00:00
Upgrade Rust SDK to spec 1.4.2
This commit is contained in:
@ -1 +1 @@
|
||||
5.3.0-SNAPSHOT
|
||||
5.3.0
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "vrchatapi"
|
||||
version = "1.0.0"
|
||||
version = "1.4.2"
|
||||
authors = ["OpenAPI Generator team and contributors"]
|
||||
license = "MIT"
|
||||
edition = "2018"
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# 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_repo_id=$2
|
||||
@ -38,14 +38,14 @@ git add .
|
||||
git commit -m "$release_note"
|
||||
|
||||
# Sets the new remote
|
||||
git_remote=`git remote`
|
||||
git_remote=$(git remote)
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
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
|
||||
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
|
||||
@ -55,4 +55,3 @@ git pull origin master
|
||||
# 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"
|
||||
git push origin master 2>&1 | grep -v 'To https'
|
||||
|
||||
|
@ -13,7 +13,7 @@ use crate::apis::ResponseContent;
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum CheckUserExistsError {
|
||||
@ -21,7 +21,7 @@ pub enum CheckUserExistsError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum DeleteUserError {
|
||||
@ -29,7 +29,7 @@ pub enum DeleteUserError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetCurrentUserError {
|
||||
@ -37,7 +37,7 @@ pub enum GetCurrentUserError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `logout`
|
||||
/// struct for typed errors of method [`logout`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum LogoutError {
|
||||
@ -45,7 +45,7 @@ pub enum LogoutError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum Verify2FaError {
|
||||
@ -53,7 +53,7 @@ pub enum Verify2FaError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum VerifyAuthTokenError {
|
||||
@ -61,7 +61,7 @@ pub enum VerifyAuthTokenError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
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.
|
||||
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());
|
||||
|
||||
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 {
|
||||
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());
|
||||
}
|
||||
|
||||
@ -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.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -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.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
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());
|
||||
};
|
||||
|
||||
@ -168,13 +171,14 @@ pub fn get_current_user(configuration: &configuration::Configuration, ) -> Resul
|
||||
|
||||
/// Invalidates the login session.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -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.
|
||||
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());
|
||||
|
||||
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.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.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -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.
|
||||
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());
|
||||
|
||||
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.json(&inline_object1);
|
||||
|
@ -13,7 +13,7 @@ use crate::apis::ResponseContent;
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum CreateAvatarError {
|
||||
@ -21,7 +21,7 @@ pub enum CreateAvatarError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum DeleteAvatarError {
|
||||
@ -30,7 +30,7 @@ pub enum DeleteAvatarError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetAvatarError {
|
||||
@ -39,7 +39,7 @@ pub enum GetAvatarError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetFavoritedAvatarsError {
|
||||
@ -48,7 +48,7 @@ pub enum GetFavoritedAvatarsError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum SearchAvatarsError {
|
||||
@ -56,7 +56,7 @@ pub enum SearchAvatarsError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum SelectAvatarError {
|
||||
@ -65,7 +65,7 @@ pub enum SelectAvatarError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
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.
|
||||
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());
|
||||
|
||||
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.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.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -132,13 +134,14 @@ pub fn delete_avatar(configuration: &configuration::Configuration, avatar_id: &s
|
||||
|
||||
/// Get information about a specific Avatar.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -159,10 +162,11 @@ pub fn get_avatar(configuration: &configuration::Configuration, avatar_id: &str)
|
||||
|
||||
/// 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>> {
|
||||
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());
|
||||
|
||||
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 {
|
||||
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());
|
||||
}
|
||||
|
||||
@ -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.
|
||||
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());
|
||||
|
||||
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 {
|
||||
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());
|
||||
}
|
||||
|
||||
@ -291,13 +296,14 @@ pub fn search_avatars(configuration: &configuration::Configuration, featured: Op
|
||||
|
||||
/// Switches into that avatar.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -318,13 +324,14 @@ pub fn select_avatar(configuration: &configuration::Configuration, avatar_id: &s
|
||||
|
||||
/// 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>> {
|
||||
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());
|
||||
|
||||
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.json(&inline_object11);
|
||||
|
@ -13,7 +13,7 @@ use crate::apis::ResponseContent;
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum AddFavoriteError {
|
||||
@ -22,14 +22,14 @@ pub enum AddFavoriteError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum ClearFavoriteGroupError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetFavoriteError {
|
||||
@ -38,14 +38,14 @@ pub enum GetFavoriteError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetFavoriteGroupError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetFavoriteGroupsError {
|
||||
@ -53,7 +53,7 @@ pub enum GetFavoriteGroupsError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetFavoritesError {
|
||||
@ -61,7 +61,7 @@ pub enum GetFavoritesError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum RemoveFavoriteError {
|
||||
@ -70,7 +70,7 @@ pub enum RemoveFavoriteError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
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.
|
||||
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());
|
||||
|
||||
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.json(&inline_object8);
|
||||
@ -108,13 +109,14 @@ pub fn add_favorite(configuration: &configuration::Configuration, inline_object8
|
||||
|
||||
/// 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>> {
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -135,13 +137,14 @@ pub fn clear_favorite_group(configuration: &configuration::Configuration, favori
|
||||
|
||||
/// Return information about a specific Favorite.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -162,13 +165,14 @@ pub fn get_favorite(configuration: &configuration::Configuration, favorite_id: &
|
||||
|
||||
/// 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>> {
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -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`.
|
||||
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());
|
||||
|
||||
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 {
|
||||
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());
|
||||
}
|
||||
|
||||
@ -225,10 +230,11 @@ pub fn get_favorite_groups(configuration: &configuration::Configuration, n: Opti
|
||||
|
||||
/// 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>> {
|
||||
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());
|
||||
|
||||
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 {
|
||||
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());
|
||||
}
|
||||
|
||||
@ -264,13 +270,14 @@ pub fn get_favorites(configuration: &configuration::Configuration, n: Option<i32
|
||||
|
||||
/// Remove a favorite from your favorites list.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -291,13 +298,14 @@ pub fn remove_favorite(configuration: &configuration::Configuration, favorite_id
|
||||
|
||||
/// 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>> {
|
||||
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());
|
||||
|
||||
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.json(&inline_object9);
|
||||
|
@ -13,21 +13,21 @@ use crate::apis::ResponseContent;
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum CreateFileError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum CreateFileVersionError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum DeleteFileError {
|
||||
@ -35,7 +35,7 @@ pub enum DeleteFileError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum DeleteFileVersionError {
|
||||
@ -44,21 +44,21 @@ pub enum DeleteFileVersionError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum DownloadFileVersionError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum FinishFileDataUploadError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetFileError {
|
||||
@ -66,21 +66,21 @@ pub enum GetFileError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetFileDataUploadStatusError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetFilesError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum StartFileDataUploadError {
|
||||
@ -91,13 +91,14 @@ pub enum StartFileDataUploadError {
|
||||
|
||||
/// Creates a new File object
|
||||
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());
|
||||
|
||||
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.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.
|
||||
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());
|
||||
|
||||
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.json(&inline_object4);
|
||||
@ -147,13 +149,14 @@ pub fn create_file_version(configuration: &configuration::Configuration, file_id
|
||||
|
||||
/// Deletes a File object.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -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.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -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.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -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.
|
||||
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());
|
||||
|
||||
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.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.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -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.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -310,10 +318,11 @@ pub fn get_file_data_upload_status(configuration: &configuration::Configuration,
|
||||
|
||||
/// 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>> {
|
||||
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());
|
||||
|
||||
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 {
|
||||
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());
|
||||
}
|
||||
|
||||
@ -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.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ use crate::apis::ResponseContent;
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum DeleteFriendRequestError {
|
||||
@ -22,7 +22,7 @@ pub enum DeleteFriendRequestError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `friend`
|
||||
/// struct for typed errors of method [`friend`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum FriendError {
|
||||
@ -31,7 +31,7 @@ pub enum FriendError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetFriendStatusError {
|
||||
@ -39,7 +39,7 @@ pub enum GetFriendStatusError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetFriendsError {
|
||||
@ -47,7 +47,7 @@ pub enum GetFriendsError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `unfriend`
|
||||
/// struct for typed errors of method [`unfriend`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
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.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -86,13 +87,14 @@ pub fn delete_friend_request(configuration: &configuration::Configuration, user_
|
||||
|
||||
/// Send a friend request to another user.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -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.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -140,10 +143,11 @@ pub fn get_friend_status(configuration: &configuration::Configuration, user_id:
|
||||
|
||||
/// 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>> {
|
||||
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());
|
||||
|
||||
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 {
|
||||
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());
|
||||
}
|
||||
|
||||
@ -176,13 +180,14 @@ pub fn get_friends(configuration: &configuration::Configuration, offset: Option<
|
||||
|
||||
/// Unfriend a user by ID.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ use crate::apis::ResponseContent;
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetInviteMessageError {
|
||||
@ -22,7 +22,7 @@ pub enum GetInviteMessageError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetInviteMessagesError {
|
||||
@ -31,7 +31,7 @@ pub enum GetInviteMessagesError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum InviteUserError {
|
||||
@ -39,7 +39,7 @@ pub enum InviteUserError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum RequestInviteError {
|
||||
@ -47,7 +47,7 @@ pub enum RequestInviteError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum ResetInviteMessageError {
|
||||
@ -57,7 +57,7 @@ pub enum ResetInviteMessageError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum RespondInviteError {
|
||||
@ -65,7 +65,7 @@ pub enum RespondInviteError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
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
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -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
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -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.
|
||||
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());
|
||||
|
||||
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.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.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -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
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -214,13 +219,14 @@ pub fn reset_invite_message(configuration: &configuration::Configuration, user_i
|
||||
|
||||
/// 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>> {
|
||||
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());
|
||||
|
||||
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.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
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ use crate::apis::ResponseContent;
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum AcceptFriendRequestError {
|
||||
@ -22,7 +22,7 @@ pub enum AcceptFriendRequestError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum ClearNotificationsError {
|
||||
@ -30,7 +30,7 @@ pub enum ClearNotificationsError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum DeleteNotificationError {
|
||||
@ -38,7 +38,7 @@ pub enum DeleteNotificationError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetNotificationsError {
|
||||
@ -46,7 +46,7 @@ pub enum GetNotificationsError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
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`.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -84,13 +85,14 @@ pub fn accept_friend_request(configuration: &configuration::Configuration, notif
|
||||
|
||||
/// Clear **all** notifications.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -111,13 +113,14 @@ pub fn clear_notifications(configuration: &configuration::Configuration, ) -> Re
|
||||
|
||||
/// Delete a notification.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -138,10 +141,11 @@ pub fn delete_notification(configuration: &configuration::Configuration, notific
|
||||
|
||||
/// 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>> {
|
||||
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());
|
||||
|
||||
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 {
|
||||
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());
|
||||
}
|
||||
|
||||
@ -183,13 +187,14 @@ pub fn get_notifications(configuration: &configuration::Configuration, _type: Op
|
||||
|
||||
/// Mark a notification as seen.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ use crate::apis::ResponseContent;
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetAssignedPermissionsError {
|
||||
@ -21,7 +21,7 @@ pub enum GetAssignedPermissionsError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
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+.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -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`.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ use crate::apis::ResponseContent;
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum ClearAllPlayerModerationsError {
|
||||
@ -21,7 +21,7 @@ pub enum ClearAllPlayerModerationsError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum DeletePlayerModerationError {
|
||||
@ -30,7 +30,7 @@ pub enum DeletePlayerModerationError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetPlayerModerationError {
|
||||
@ -39,7 +39,7 @@ pub enum GetPlayerModerationError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetPlayerModerationsError {
|
||||
@ -47,7 +47,7 @@ pub enum GetPlayerModerationsError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum ModerateUserError {
|
||||
@ -55,7 +55,7 @@ pub enum ModerateUserError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum UnmoderateUserError {
|
||||
@ -66,13 +66,14 @@ pub enum UnmoderateUserError {
|
||||
|
||||
/// ⚠️ **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>> {
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -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.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -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`.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -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.
|
||||
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());
|
||||
|
||||
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 {
|
||||
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());
|
||||
}
|
||||
|
||||
@ -180,13 +184,14 @@ pub fn get_player_moderations(configuration: &configuration::Configuration, _typ
|
||||
|
||||
/// 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>> {
|
||||
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());
|
||||
|
||||
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.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.
|
||||
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());
|
||||
|
||||
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.json(&inline_object13);
|
||||
|
@ -13,14 +13,14 @@ use crate::apis::ResponseContent;
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetConfigError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetCssError {
|
||||
@ -28,21 +28,21 @@ pub enum GetCssError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetCurrentOnlineUsersError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetHealthError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetJavaScriptError {
|
||||
@ -50,7 +50,7 @@ pub enum GetJavaScriptError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
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.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -87,10 +88,11 @@ pub fn get_config(configuration: &configuration::Configuration, ) -> Result<crat
|
||||
|
||||
/// 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>> {
|
||||
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());
|
||||
|
||||
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 {
|
||||
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());
|
||||
}
|
||||
|
||||
@ -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.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -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.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -174,10 +178,11 @@ pub fn get_health(configuration: &configuration::Configuration, ) -> Result<crat
|
||||
|
||||
/// 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>> {
|
||||
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());
|
||||
|
||||
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 {
|
||||
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());
|
||||
}
|
||||
|
||||
@ -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.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ use crate::apis::ResponseContent;
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetUserError {
|
||||
@ -21,7 +21,7 @@ pub enum GetUserError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetUserByNameError {
|
||||
@ -29,7 +29,7 @@ pub enum GetUserByNameError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum SearchUsersError {
|
||||
@ -38,7 +38,7 @@ pub enum SearchUsersError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum UpdateUserError {
|
||||
@ -48,13 +48,14 @@ pub enum UpdateUserError {
|
||||
|
||||
/// 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>> {
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -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.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -102,10 +104,11 @@ pub fn get_user_by_name(configuration: &configuration::Configuration, username:
|
||||
|
||||
/// 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>> {
|
||||
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());
|
||||
|
||||
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 {
|
||||
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());
|
||||
}
|
||||
|
||||
@ -141,13 +144,14 @@ pub fn search_users(configuration: &configuration::Configuration, search: Option
|
||||
|
||||
/// 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>> {
|
||||
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());
|
||||
|
||||
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.json(&inline_object2);
|
||||
|
@ -13,7 +13,7 @@ use crate::apis::ResponseContent;
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum CreateWorldError {
|
||||
@ -22,7 +22,7 @@ pub enum CreateWorldError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum DeleteWorldError {
|
||||
@ -31,7 +31,7 @@ pub enum DeleteWorldError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetActiveWorldsError {
|
||||
@ -39,7 +39,7 @@ pub enum GetActiveWorldsError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetFavoritedWorldsError {
|
||||
@ -48,7 +48,7 @@ pub enum GetFavoritedWorldsError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetRecentWorldsError {
|
||||
@ -57,7 +57,7 @@ pub enum GetRecentWorldsError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetWorldError {
|
||||
@ -65,7 +65,7 @@ pub enum GetWorldError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetWorldInstanceError {
|
||||
@ -73,7 +73,7 @@ pub enum GetWorldInstanceError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetWorldMetadataError {
|
||||
@ -81,7 +81,7 @@ pub enum GetWorldMetadataError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetWorldPublishStatusError {
|
||||
@ -90,7 +90,7 @@ pub enum GetWorldPublishStatusError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum PublishWorldError {
|
||||
@ -99,7 +99,7 @@ pub enum PublishWorldError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum SearchWorldsError {
|
||||
@ -107,7 +107,7 @@ pub enum SearchWorldsError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
pub enum UnpublishWorldError {
|
||||
@ -116,7 +116,7 @@ pub enum UnpublishWorldError {
|
||||
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)]
|
||||
#[serde(untagged)]
|
||||
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.
|
||||
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());
|
||||
|
||||
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.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.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -183,10 +185,11 @@ pub fn delete_world(configuration: &configuration::Configuration, world_id: &str
|
||||
|
||||
/// 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>> {
|
||||
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());
|
||||
|
||||
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 {
|
||||
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());
|
||||
}
|
||||
|
||||
@ -246,10 +249,11 @@ pub fn get_active_worlds(configuration: &configuration::Configuration, featured:
|
||||
|
||||
/// 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>> {
|
||||
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());
|
||||
|
||||
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 {
|
||||
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());
|
||||
}
|
||||
|
||||
@ -312,10 +316,11 @@ pub fn get_favorited_worlds(configuration: &configuration::Configuration, featur
|
||||
|
||||
/// 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>> {
|
||||
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());
|
||||
|
||||
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 {
|
||||
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());
|
||||
}
|
||||
|
||||
@ -378,13 +383,14 @@ pub fn get_recent_worlds(configuration: &configuration::Configuration, featured:
|
||||
|
||||
/// Get information about a specific World.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -405,13 +411,14 @@ pub fn get_world(configuration: &configuration::Configuration, world_id: &str) -
|
||||
|
||||
/// Returns a worlds instance.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -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.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -459,13 +467,14 @@ pub fn get_world_metadata(configuration: &configuration::Configuration, world_id
|
||||
|
||||
/// Returns a worlds publish status.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -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.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -513,10 +523,11 @@ pub fn publish_world(configuration: &configuration::Configuration, world_id: &st
|
||||
|
||||
/// 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>> {
|
||||
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());
|
||||
|
||||
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 {
|
||||
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());
|
||||
}
|
||||
|
||||
@ -582,13 +593,14 @@ pub fn search_worlds(configuration: &configuration::Configuration, featured: Opt
|
||||
|
||||
/// Unpublish a world.
|
||||
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());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@ -609,13 +621,14 @@ pub fn unpublish_world(configuration: &configuration::Configuration, world_id: &
|
||||
|
||||
/// 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>> {
|
||||
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());
|
||||
|
||||
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.json(&inline_object7);
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct ApiConfig {
|
||||
/// Unknown, probably voice optimization testing
|
||||
#[serde(rename = "VoiceEnableDegradation")]
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct ApiEventConfig {
|
||||
/// Unknown
|
||||
#[serde(rename = "distanceClose")]
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct Avatar {
|
||||
/// Not present from general serach `/avatars`, only on specific requests `/avatars/{avatarId}`.
|
||||
#[serde(rename = "assetUrl", skip_serializing_if = "Option::is_none")]
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct AvatarUnityPackageUrlObject {
|
||||
#[serde(rename = "unityPackageUrl", skip_serializing_if = "Option::is_none")]
|
||||
pub unity_package_url: Option<String>,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct CurrentUser {
|
||||
#[serde(rename = "acceptedTOSVersion")]
|
||||
pub accepted_tos_version: i32,
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct DownloadUrlList {
|
||||
/// Download link for legacy SDK2
|
||||
#[serde(rename = "sdk2")]
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct DynamicWorldRow {
|
||||
#[serde(rename = "index")]
|
||||
pub index: i32,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct Error {
|
||||
#[serde(rename = "error", skip_serializing_if = "Option::is_none")]
|
||||
pub error: Option<Box<crate::models::Response>>,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct Favorite {
|
||||
/// MUST be either AvatarID, UserID or WorldID.
|
||||
#[serde(rename = "favoriteId")]
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct FavoriteGroup {
|
||||
#[serde(rename = "displayName")]
|
||||
pub display_name: String,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct File {
|
||||
#[serde(rename = "extension")]
|
||||
pub extension: String,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct FileData {
|
||||
#[serde(rename = "category")]
|
||||
pub category: Category,
|
||||
@ -52,3 +52,9 @@ pub enum Category {
|
||||
Simple,
|
||||
}
|
||||
|
||||
impl Default for Category {
|
||||
fn default() -> Category {
|
||||
Self::Multipart
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct FileVersion {
|
||||
#[serde(rename = "created_at")]
|
||||
pub created_at: String,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct FriendStatus {
|
||||
#[serde(rename = "incomingRequest")]
|
||||
pub incoming_request: bool,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct InlineObject {
|
||||
#[serde(rename = "code")]
|
||||
pub code: String,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct InlineObject1 {
|
||||
#[serde(rename = "code")]
|
||||
pub code: String,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct InlineObject10 {
|
||||
#[serde(rename = "assetUrl", skip_serializing_if = "Option::is_none")]
|
||||
pub asset_url: Option<String>,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct InlineObject11 {
|
||||
#[serde(rename = "assetUrl", skip_serializing_if = "Option::is_none")]
|
||||
pub asset_url: Option<String>,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct InlineObject12 {
|
||||
#[serde(rename = "moderated")]
|
||||
pub moderated: String,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct InlineObject13 {
|
||||
#[serde(rename = "moderated", skip_serializing_if = "Option::is_none")]
|
||||
pub moderated: Option<String>,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct InlineObject2 {
|
||||
#[serde(rename = "email", skip_serializing_if = "Option::is_none")]
|
||||
pub email: Option<String>,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct InlineObject3 {
|
||||
#[serde(rename = "name")]
|
||||
pub name: String,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct InlineObject4 {
|
||||
#[serde(rename = "signatureMd5")]
|
||||
pub signature_md5: String,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct InlineObject5 {
|
||||
/// Array of ETags uploaded.
|
||||
#[serde(rename = "etags", skip_serializing_if = "Option::is_none")]
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct InlineObject6 {
|
||||
#[serde(rename = "assetUrl")]
|
||||
pub asset_url: String,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct InlineObject7 {
|
||||
#[serde(rename = "assetUrl", skip_serializing_if = "Option::is_none")]
|
||||
pub asset_url: Option<String>,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct InlineObject8 {
|
||||
#[serde(rename = "type")]
|
||||
pub _type: crate::models::FavoriteType,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct InlineObject9 {
|
||||
#[serde(rename = "displayName", skip_serializing_if = "Option::is_none")]
|
||||
pub display_name: Option<String>,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct InlineResponse200 {
|
||||
#[serde(rename = "ok")]
|
||||
pub ok: bool,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct InlineResponse2001 {
|
||||
#[serde(rename = "verified")]
|
||||
pub verified: bool,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct InlineResponse2002 {
|
||||
#[serde(rename = "ok")]
|
||||
pub ok: bool,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct InlineResponse2003 {
|
||||
#[serde(rename = "uploadId")]
|
||||
pub upload_id: String,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct InlineResponse2004 {
|
||||
#[serde(rename = "url")]
|
||||
pub url: String,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct InlineResponse2005 {
|
||||
#[serde(rename = "id")]
|
||||
pub id: String,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct InlineResponse2006 {
|
||||
#[serde(rename = "canPubilsh")]
|
||||
pub can_pubilsh: bool,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct InlineResponse400 {
|
||||
#[serde(rename = "error")]
|
||||
pub error: Box<crate::models::Error>,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct Instance {
|
||||
#[serde(rename = "active")]
|
||||
pub active: bool,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct InstancePlatforms {
|
||||
#[serde(rename = "android")]
|
||||
pub android: i32,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct InviteMessage {
|
||||
#[serde(rename = "canBeUpdated")]
|
||||
pub can_be_updated: bool,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct InviteRequest {
|
||||
#[serde(rename = "instanceId")]
|
||||
pub instance_id: String,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct InviteResponse {
|
||||
#[serde(rename = "responseSlot")]
|
||||
pub response_slot: i32,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
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`.
|
||||
#[serde(rename = "platform")]
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct LimitedUser {
|
||||
#[serde(rename = "bio", skip_serializing_if = "Option::is_none")]
|
||||
pub bio: Option<String>,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct LimitedWorld {
|
||||
#[serde(rename = "authorId")]
|
||||
pub author_id: String,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct Notification {
|
||||
#[serde(rename = "created_at")]
|
||||
pub created_at: String,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct PastDisplayName {
|
||||
#[serde(rename = "displayName")]
|
||||
pub display_name: String,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct Permission {
|
||||
#[serde(rename = "data", skip_serializing_if = "Option::is_none")]
|
||||
pub data: Option<serde_json::Value>,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct PlayerModeration {
|
||||
#[serde(rename = "created")]
|
||||
pub created: String,
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct PublicAnnouncement {
|
||||
/// Announcement name
|
||||
#[serde(rename = "name")]
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct Response {
|
||||
#[serde(rename = "message", skip_serializing_if = "Option::is_none")]
|
||||
pub message: Option<String>,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct Success {
|
||||
#[serde(rename = "success", skip_serializing_if = "Option::is_none")]
|
||||
pub success: Option<Box<crate::models::Response>>,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct UnityPackage {
|
||||
#[serde(rename = "assetUrl", skip_serializing_if = "Option::is_none")]
|
||||
pub asset_url: Option<String>,
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct User {
|
||||
#[serde(rename = "allowAvatarCopying")]
|
||||
pub allow_avatar_copying: bool,
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct UserExists {
|
||||
/// Status if a user exist with that username or userId.
|
||||
#[serde(rename = "userExists")]
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct World {
|
||||
#[serde(rename = "assetUrl")]
|
||||
pub asset_url: String,
|
||||
|
Reference in New Issue
Block a user