Initial commit

This commit is contained in:
Foorack / Max Faxälv
2021-07-28 11:44:53 +02:00
commit 4aca4ff25d
100 changed files with 5878 additions and 0 deletions

97
src/models/user.rs Normal file
View File

@ -0,0 +1,97 @@
/*
* VRChat API Documentation
*
* ![VRChat API Banner](https://raw.githubusercontent.com/vrchatapi/vrchatapi.github.io/master/assets/apibanner.png) # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
*
* The version of the OpenAPI document: 1.0.0
* Contact: me@ruby.js.org
* Generated by: https://openapi-generator.tech
*/
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct User {
#[serde(rename = "id")]
pub id: String,
#[serde(rename = "username")]
pub username: String,
#[serde(rename = "displayName")]
pub display_name: String,
#[serde(rename = "userIcon")]
pub user_icon: String,
#[serde(rename = "bio")]
pub bio: String,
#[serde(rename = "bioLinks")]
pub bio_links: Vec<String>,
#[serde(rename = "profilePicOverride")]
pub profile_pic_override: String,
#[serde(rename = "statusDescription")]
pub status_description: String,
#[serde(rename = "currentAvatarImageUrl")]
pub current_avatar_image_url: String,
#[serde(rename = "currentAvatarThumbnailImageUrl")]
pub current_avatar_thumbnail_image_url: String,
#[serde(rename = "fallbackAvatar")]
pub fallback_avatar: String,
#[serde(rename = "state")]
pub state: crate::models::UserState,
#[serde(rename = "tags")]
pub tags: Vec<String>,
#[serde(rename = "developerType")]
pub developer_type: crate::models::DeveloperType,
#[serde(rename = "last_login")]
pub last_login: String,
#[serde(rename = "last_platform")]
pub last_platform: String,
#[serde(rename = "allowAvatarCopying")]
pub allow_avatar_copying: bool,
#[serde(rename = "status")]
pub status: crate::models::UserStatus,
#[serde(rename = "date_joined")]
pub date_joined: String,
#[serde(rename = "isFriend")]
pub is_friend: bool,
#[serde(rename = "friendKey")]
pub friend_key: String,
#[serde(rename = "worldId", skip_serializing_if = "Option::is_none")]
pub world_id: Option<String>,
#[serde(rename = "instanceId", skip_serializing_if = "Option::is_none")]
pub instance_id: Option<String>,
#[serde(rename = "location", skip_serializing_if = "Option::is_none")]
pub location: Option<String>,
}
impl User {
pub fn new(id: String, username: String, display_name: String, user_icon: String, bio: String, bio_links: Vec<String>, profile_pic_override: String, status_description: String, current_avatar_image_url: String, current_avatar_thumbnail_image_url: String, fallback_avatar: String, state: crate::models::UserState, tags: Vec<String>, developer_type: crate::models::DeveloperType, last_login: String, last_platform: String, allow_avatar_copying: bool, status: crate::models::UserStatus, date_joined: String, is_friend: bool, friend_key: String) -> User {
User {
id,
username,
display_name,
user_icon,
bio,
bio_links,
profile_pic_override,
status_description,
current_avatar_image_url,
current_avatar_thumbnail_image_url,
fallback_avatar,
state,
tags,
developer_type,
last_login,
last_platform,
allow_avatar_copying,
status,
date_joined,
is_friend,
friend_key,
world_id: None,
instance_id: None,
location: None,
}
}
}