Upgrade Rust SDK to spec 1.8.0

This commit is contained in:
VRCCat
2022-11-04 02:06:55 +00:00
parent 5257704d26
commit c4efedb997
13 changed files with 33 additions and 29 deletions

View File

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

View File

@ -50,7 +50,7 @@ Name | Type | Description | Notes
**two_factor_auth_enabled_date** | Option<**String**> | | [optional] **two_factor_auth_enabled_date** | Option<**String**> | | [optional]
**unsubscribe** | **bool** | | **unsubscribe** | **bool** | |
**user_icon** | **String** | | **user_icon** | **String** | |
**username** | **String** | | **username** | Option<**String**> | -| **DEPRECATED:** VRChat API no longer return usernames of other users. [See issue by Tupper for more information](https://github.com/pypy-vrc/VRCX/issues/429). | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -18,7 +18,7 @@ Name | Type | Description | Notes
**status_description** | **String** | | **status_description** | **String** | |
**tags** | **Vec<String>** | <- Always empty. | **tags** | **Vec<String>** | <- Always empty. |
**user_icon** | **String** | | **user_icon** | **String** | |
**username** | **String** | | **username** | Option<**String**> | -| **DEPRECATED:** VRChat API no longer return usernames of other users. [See issue by Tupper for more information](https://github.com/pypy-vrc/VRCX/issues/429). | [optional]
**location** | Option<**String**> | | [optional] **location** | Option<**String**> | | [optional]
**friend_key** | Option<**String**> | | [optional] **friend_key** | Option<**String**> | | [optional]

View File

@ -10,7 +10,7 @@ Name | Type | Description | Notes
**message** | **String** | | **message** | **String** | |
**seen** | **bool** | | [default to false] **seen** | **bool** | | [default to false]
**sender_user_id** | **String** | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. | **sender_user_id** | **String** | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. |
**sender_username** | **String** | | **sender_username** | Option<**String**> | -| **DEPRECATED:** VRChat API no longer return usernames of other users. [See issue by Tupper for more information](https://github.com/pypy-vrc/VRCX/issues/429). | [optional]
**_type** | [**crate::models::NotificationType**](NotificationType.md) | | **_type** | [**crate::models::NotificationType**](NotificationType.md) | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -10,7 +10,7 @@ Name | Type | Description | Notes
**message** | **String** | | **message** | **String** | |
**reciever_user_id** | **String** | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. | **reciever_user_id** | **String** | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. |
**sender_user_id** | **String** | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. | **sender_user_id** | **String** | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. |
**sender_username** | **String** | | **sender_username** | Option<**String**> | -| **DEPRECATED:** VRChat API no longer return usernames of other users. [See issue by Tupper for more information](https://github.com/pypy-vrc/VRCX/issues/429). | [optional]
**_type** | [**crate::models::NotificationType**](NotificationType.md) | | **_type** | [**crate::models::NotificationType**](NotificationType.md) | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -31,7 +31,7 @@ Name | Type | Description | Notes
**traveling_to_location** | Option<**String**> | | [optional] **traveling_to_location** | Option<**String**> | | [optional]
**traveling_to_world** | Option<**String**> | | [optional] **traveling_to_world** | Option<**String**> | | [optional]
**user_icon** | **String** | | **user_icon** | **String** | |
**username** | **String** | A users unique name, used during login. This is different from `displayName` which is what shows up in-game. A users `username` can never be changed. | **username** | Option<**String**> | -| A users unique name, used during login. This is different from `displayName` which is what shows up in-game. A users `username` can never be changed.' **DEPRECATED:** VRChat API no longer return usernames of other users. [See issue by Tupper for more information](https://github.com/pypy-vrc/VRCX/issues/429). | [optional]
**world_id** | Option<**String**> | WorldID be \"offline\" on User profiles if you are not friends with that user. | [optional] **world_id** | Option<**String**> | WorldID be \"offline\" on User profiles if you are not friends with that user. | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -46,7 +46,7 @@ Name | Type | Description | Required | Notes
> crate::models::User get_user_by_name(username) > crate::models::User get_user_by_name(username)
Get User by Username Get User by Username
Get public user information about a specific user using their name. ~~Get public user information about a specific user using their name.~~ **DEPRECATED:** VRChat API no longer return usernames of other users. [See issue by Tupper for more information](https://github.com/pypy-vrc/VRCX/issues/429). This endpoint now require Admin Credentials.
### Parameters ### Parameters

View File

@ -74,7 +74,7 @@ pub fn get_user(configuration: &configuration::Configuration, user_id: &str) ->
} }
} }
/// Get public user information about a specific user using their name. /// ~~Get public user information about a specific user using their name.~~ **DEPRECATED:** VRChat API no longer return usernames of other users. [See issue by Tupper for more information](https://github.com/pypy-vrc/VRCX/issues/429). This endpoint now require Admin Credentials.
pub fn get_user_by_name(configuration: &configuration::Configuration, username: &str) -> Result<crate::models::User, Error<GetUserByNameError>> { pub fn get_user_by_name(configuration: &configuration::Configuration, username: &str) -> Result<crate::models::User, Error<GetUserByNameError>> {
let local_var_configuration = configuration; let local_var_configuration = configuration;

View File

@ -109,12 +109,13 @@ pub struct CurrentUser {
pub unsubscribe: bool, pub unsubscribe: bool,
#[serde(rename = "userIcon")] #[serde(rename = "userIcon")]
pub user_icon: String, pub user_icon: String,
#[serde(rename = "username")] /// -| **DEPRECATED:** VRChat API no longer return usernames of other users. [See issue by Tupper for more information](https://github.com/pypy-vrc/VRCX/issues/429).
pub username: String, #[serde(rename = "username", skip_serializing_if = "Option::is_none")]
pub username: Option<String>,
} }
impl CurrentUser { impl CurrentUser {
pub fn new(accepted_tos_version: i32, allow_avatar_copying: bool, bio: String, bio_links: Vec<String>, current_avatar: String, current_avatar_asset_url: String, current_avatar_image_url: String, current_avatar_thumbnail_image_url: String, date_joined: String, developer_type: crate::models::DeveloperType, display_name: String, email_verified: bool, friend_group_names: Vec<String>, friend_key: String, friends: Vec<String>, has_birthday: bool, has_email: bool, has_logged_in_from_client: bool, has_pending_email: bool, home_location: String, id: String, is_friend: bool, last_login: String, last_platform: String, obfuscated_email: String, obfuscated_pending_email: String, oculus_id: String, past_display_names: Vec<crate::models::PastDisplayName>, profile_pic_override: String, state: crate::models::UserState, status: crate::models::UserStatus, status_description: String, status_first_time: bool, status_history: Vec<String>, steam_details: serde_json::Value, steam_id: String, tags: Vec<String>, two_factor_auth_enabled: bool, unsubscribe: bool, user_icon: String, username: String) -> CurrentUser { pub fn new(accepted_tos_version: i32, allow_avatar_copying: bool, bio: String, bio_links: Vec<String>, current_avatar: String, current_avatar_asset_url: String, current_avatar_image_url: String, current_avatar_thumbnail_image_url: String, date_joined: String, developer_type: crate::models::DeveloperType, display_name: String, email_verified: bool, friend_group_names: Vec<String>, friend_key: String, friends: Vec<String>, has_birthday: bool, has_email: bool, has_logged_in_from_client: bool, has_pending_email: bool, home_location: String, id: String, is_friend: bool, last_login: String, last_platform: String, obfuscated_email: String, obfuscated_pending_email: String, oculus_id: String, past_display_names: Vec<crate::models::PastDisplayName>, profile_pic_override: String, state: crate::models::UserState, status: crate::models::UserStatus, status_description: String, status_first_time: bool, status_history: Vec<String>, steam_details: serde_json::Value, steam_id: String, tags: Vec<String>, two_factor_auth_enabled: bool, unsubscribe: bool, user_icon: String) -> CurrentUser {
CurrentUser { CurrentUser {
accepted_tos_version, accepted_tos_version,
account_deletion_date: None, account_deletion_date: None,
@ -162,7 +163,7 @@ impl CurrentUser {
two_factor_auth_enabled_date: None, two_factor_auth_enabled_date: None,
unsubscribe, unsubscribe,
user_icon, user_icon,
username, username: None,
} }
} }
} }

View File

@ -44,8 +44,9 @@ pub struct LimitedUser {
pub tags: Vec<String>, pub tags: Vec<String>,
#[serde(rename = "userIcon")] #[serde(rename = "userIcon")]
pub user_icon: String, pub user_icon: String,
#[serde(rename = "username")] /// -| **DEPRECATED:** VRChat API no longer return usernames of other users. [See issue by Tupper for more information](https://github.com/pypy-vrc/VRCX/issues/429).
pub username: String, #[serde(rename = "username", skip_serializing_if = "Option::is_none")]
pub username: Option<String>,
#[serde(rename = "location", skip_serializing_if = "Option::is_none")] #[serde(rename = "location", skip_serializing_if = "Option::is_none")]
pub location: Option<String>, pub location: Option<String>,
#[serde(rename = "friendKey", skip_serializing_if = "Option::is_none")] #[serde(rename = "friendKey", skip_serializing_if = "Option::is_none")]
@ -53,7 +54,7 @@ pub struct LimitedUser {
} }
impl LimitedUser { impl LimitedUser {
pub fn new(current_avatar_image_url: String, current_avatar_thumbnail_image_url: String, developer_type: crate::models::DeveloperType, display_name: String, fallback_avatar: String, id: String, is_friend: bool, last_platform: String, profile_pic_override: String, status: crate::models::UserStatus, status_description: String, tags: Vec<String>, user_icon: String, username: String) -> LimitedUser { pub fn new(current_avatar_image_url: String, current_avatar_thumbnail_image_url: String, developer_type: crate::models::DeveloperType, display_name: String, fallback_avatar: String, id: String, is_friend: bool, last_platform: String, profile_pic_override: String, status: crate::models::UserStatus, status_description: String, tags: Vec<String>, user_icon: String) -> LimitedUser {
LimitedUser { LimitedUser {
bio: None, bio: None,
current_avatar_image_url, current_avatar_image_url,
@ -69,7 +70,7 @@ impl LimitedUser {
status_description, status_description,
tags, tags,
user_icon, user_icon,
username, username: None,
location: None, location: None,
friend_key: None, friend_key: None,
} }

View File

@ -25,14 +25,15 @@ pub struct Notification {
/// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. /// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.
#[serde(rename = "senderUserId")] #[serde(rename = "senderUserId")]
pub sender_user_id: String, pub sender_user_id: String,
#[serde(rename = "senderUsername")] /// -| **DEPRECATED:** VRChat API no longer return usernames of other users. [See issue by Tupper for more information](https://github.com/pypy-vrc/VRCX/issues/429).
pub sender_username: String, #[serde(rename = "senderUsername", skip_serializing_if = "Option::is_none")]
pub sender_username: Option<String>,
#[serde(rename = "type")] #[serde(rename = "type")]
pub _type: crate::models::NotificationType, pub _type: crate::models::NotificationType,
} }
impl Notification { impl Notification {
pub fn new(created_at: String, details: String, id: String, message: String, seen: bool, sender_user_id: String, sender_username: String, _type: crate::models::NotificationType) -> Notification { pub fn new(created_at: String, details: String, id: String, message: String, seen: bool, sender_user_id: String, _type: crate::models::NotificationType) -> Notification {
Notification { Notification {
created_at, created_at,
details, details,
@ -40,7 +41,7 @@ impl Notification {
message, message,
seen, seen,
sender_user_id, sender_user_id,
sender_username, sender_username: None,
_type, _type,
} }
} }

View File

@ -26,14 +26,15 @@ pub struct SentNotification {
/// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. /// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.
#[serde(rename = "senderUserId")] #[serde(rename = "senderUserId")]
pub sender_user_id: String, pub sender_user_id: String,
#[serde(rename = "senderUsername")] /// -| **DEPRECATED:** VRChat API no longer return usernames of other users. [See issue by Tupper for more information](https://github.com/pypy-vrc/VRCX/issues/429).
pub sender_username: String, #[serde(rename = "senderUsername", skip_serializing_if = "Option::is_none")]
pub sender_username: Option<String>,
#[serde(rename = "type")] #[serde(rename = "type")]
pub _type: crate::models::NotificationType, pub _type: crate::models::NotificationType,
} }
impl SentNotification { impl SentNotification {
pub fn new(created_at: String, details: String, id: String, message: String, reciever_user_id: String, sender_user_id: String, sender_username: String, _type: crate::models::NotificationType) -> SentNotification { pub fn new(created_at: String, details: String, id: String, message: String, reciever_user_id: String, sender_user_id: String, _type: crate::models::NotificationType) -> SentNotification {
SentNotification { SentNotification {
created_at, created_at,
details, details,
@ -41,7 +42,7 @@ impl SentNotification {
message, message,
reciever_user_id, reciever_user_id,
sender_user_id, sender_user_id,
sender_username, sender_username: None,
_type, _type,
} }
} }

View File

@ -75,16 +75,16 @@ pub struct User {
pub traveling_to_world: Option<String>, pub traveling_to_world: Option<String>,
#[serde(rename = "userIcon")] #[serde(rename = "userIcon")]
pub user_icon: String, pub user_icon: String,
/// A users unique name, used during login. This is different from `displayName` which is what shows up in-game. A users `username` can never be changed. /// -| A users unique name, used during login. This is different from `displayName` which is what shows up in-game. A users `username` can never be changed.' **DEPRECATED:** VRChat API no longer return usernames of other users. [See issue by Tupper for more information](https://github.com/pypy-vrc/VRCX/issues/429).
#[serde(rename = "username")] #[serde(rename = "username", skip_serializing_if = "Option::is_none")]
pub username: String, pub username: Option<String>,
/// WorldID be \"offline\" on User profiles if you are not friends with that user. /// WorldID be \"offline\" on User profiles if you are not friends with that user.
#[serde(rename = "worldId", skip_serializing_if = "Option::is_none")] #[serde(rename = "worldId", skip_serializing_if = "Option::is_none")]
pub world_id: Option<String>, pub world_id: Option<String>,
} }
impl User { impl User {
pub fn new(allow_avatar_copying: bool, bio: String, bio_links: Vec<String>, current_avatar_image_url: String, current_avatar_thumbnail_image_url: String, date_joined: String, developer_type: crate::models::DeveloperType, display_name: String, friend_key: String, friend_request_status: String, id: String, is_friend: bool, last_activity: String, last_login: String, last_platform: String, profile_pic_override: String, state: crate::models::UserState, status: crate::models::UserStatus, status_description: String, tags: Vec<String>, user_icon: String, username: String) -> User { pub fn new(allow_avatar_copying: bool, bio: String, bio_links: Vec<String>, current_avatar_image_url: String, current_avatar_thumbnail_image_url: String, date_joined: String, developer_type: crate::models::DeveloperType, display_name: String, friend_key: String, friend_request_status: String, id: String, is_friend: bool, last_activity: String, last_login: String, last_platform: String, profile_pic_override: String, state: crate::models::UserState, status: crate::models::UserStatus, status_description: String, tags: Vec<String>, user_icon: String) -> User {
User { User {
allow_avatar_copying, allow_avatar_copying,
bio, bio,
@ -113,7 +113,7 @@ impl User {
traveling_to_location: None, traveling_to_location: None,
traveling_to_world: None, traveling_to_world: None,
user_icon, user_icon,
username, username: None,
world_id: None, world_id: None,
} }
} }