diff --git a/Cargo.toml b/Cargo.toml index 4a20654..2ef8ec8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vrchatapi" -version = "1.7.7" +version = "1.8.0" authors = ["OpenAPI Generator team and contributors"] license = "MIT" edition = "2018" diff --git a/docs/CurrentUser.md b/docs/CurrentUser.md index 69b9162..fe3cf7a 100644 --- a/docs/CurrentUser.md +++ b/docs/CurrentUser.md @@ -50,7 +50,7 @@ Name | Type | Description | Notes **two_factor_auth_enabled_date** | Option<**String**> | | [optional] **unsubscribe** | **bool** | | **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) diff --git a/docs/LimitedUser.md b/docs/LimitedUser.md index b492983..5caac3e 100644 --- a/docs/LimitedUser.md +++ b/docs/LimitedUser.md @@ -18,7 +18,7 @@ Name | Type | Description | Notes **status_description** | **String** | | **tags** | **Vec** | <- Always empty. | **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] **friend_key** | Option<**String**> | | [optional] diff --git a/docs/Notification.md b/docs/Notification.md index 3fda828..6c7c5ea 100644 --- a/docs/Notification.md +++ b/docs/Notification.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **message** | **String** | | **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_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) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SentNotification.md b/docs/SentNotification.md index f7848d4..5aa8640 100644 --- a/docs/SentNotification.md +++ b/docs/SentNotification.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **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. | **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) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/User.md b/docs/User.md index 417b746..6280c56 100644 --- a/docs/User.md +++ b/docs/User.md @@ -31,7 +31,7 @@ Name | Type | Description | Notes **traveling_to_location** | Option<**String**> | | [optional] **traveling_to_world** | Option<**String**> | | [optional] **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] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UsersApi.md b/docs/UsersApi.md index ee64fc0..237a5bf 100644 --- a/docs/UsersApi.md +++ b/docs/UsersApi.md @@ -46,7 +46,7 @@ Name | Type | Description | Required | Notes > crate::models::User get_user_by_name(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 diff --git a/src/apis/users_api.rs b/src/apis/users_api.rs index 3acad2a..e84a5da 100644 --- a/src/apis/users_api.rs +++ b/src/apis/users_api.rs @@ -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> { let local_var_configuration = configuration; diff --git a/src/models/current_user.rs b/src/models/current_user.rs index 5bdbf8a..ff1f012 100644 --- a/src/models/current_user.rs +++ b/src/models/current_user.rs @@ -109,12 +109,13 @@ pub struct CurrentUser { pub unsubscribe: bool, #[serde(rename = "userIcon")] pub user_icon: String, - #[serde(rename = "username")] - pub username: 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). + #[serde(rename = "username", skip_serializing_if = "Option::is_none")] + pub username: Option, } impl CurrentUser { - pub fn new(accepted_tos_version: i32, allow_avatar_copying: bool, bio: String, bio_links: Vec, 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, friend_key: String, friends: Vec, 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, profile_pic_override: String, state: crate::models::UserState, status: crate::models::UserStatus, status_description: String, status_first_time: bool, status_history: Vec, steam_details: serde_json::Value, steam_id: String, tags: Vec, 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, 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, friend_key: String, friends: Vec, 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, profile_pic_override: String, state: crate::models::UserState, status: crate::models::UserStatus, status_description: String, status_first_time: bool, status_history: Vec, steam_details: serde_json::Value, steam_id: String, tags: Vec, two_factor_auth_enabled: bool, unsubscribe: bool, user_icon: String) -> CurrentUser { CurrentUser { accepted_tos_version, account_deletion_date: None, @@ -162,7 +163,7 @@ impl CurrentUser { two_factor_auth_enabled_date: None, unsubscribe, user_icon, - username, + username: None, } } } diff --git a/src/models/limited_user.rs b/src/models/limited_user.rs index 25ff529..a49cdb6 100644 --- a/src/models/limited_user.rs +++ b/src/models/limited_user.rs @@ -44,8 +44,9 @@ pub struct LimitedUser { pub tags: Vec, #[serde(rename = "userIcon")] pub user_icon: String, - #[serde(rename = "username")] - pub username: 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). + #[serde(rename = "username", skip_serializing_if = "Option::is_none")] + pub username: Option, #[serde(rename = "location", skip_serializing_if = "Option::is_none")] pub location: Option, #[serde(rename = "friendKey", skip_serializing_if = "Option::is_none")] @@ -53,7 +54,7 @@ pub struct 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, 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, user_icon: String) -> LimitedUser { LimitedUser { bio: None, current_avatar_image_url, @@ -69,7 +70,7 @@ impl LimitedUser { status_description, tags, user_icon, - username, + username: None, location: None, friend_key: None, } diff --git a/src/models/notification.rs b/src/models/notification.rs index 4034a09..5e5deaa 100644 --- a/src/models/notification.rs +++ b/src/models/notification.rs @@ -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. #[serde(rename = "senderUserId")] pub sender_user_id: String, - #[serde(rename = "senderUsername")] - pub sender_username: 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). + #[serde(rename = "senderUsername", skip_serializing_if = "Option::is_none")] + pub sender_username: Option, #[serde(rename = "type")] pub _type: crate::models::NotificationType, } 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 { created_at, details, @@ -40,7 +41,7 @@ impl Notification { message, seen, sender_user_id, - sender_username, + sender_username: None, _type, } } diff --git a/src/models/sent_notification.rs b/src/models/sent_notification.rs index 8326950..7a7502e 100644 --- a/src/models/sent_notification.rs +++ b/src/models/sent_notification.rs @@ -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. #[serde(rename = "senderUserId")] pub sender_user_id: String, - #[serde(rename = "senderUsername")] - pub sender_username: 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). + #[serde(rename = "senderUsername", skip_serializing_if = "Option::is_none")] + pub sender_username: Option, #[serde(rename = "type")] pub _type: crate::models::NotificationType, } 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 { created_at, details, @@ -41,7 +42,7 @@ impl SentNotification { message, reciever_user_id, sender_user_id, - sender_username, + sender_username: None, _type, } } diff --git a/src/models/user.rs b/src/models/user.rs index f5dc8a4..1ffeb89 100644 --- a/src/models/user.rs +++ b/src/models/user.rs @@ -75,16 +75,16 @@ pub struct User { pub traveling_to_world: Option, #[serde(rename = "userIcon")] 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. - #[serde(rename = "username")] - pub 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.' **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", skip_serializing_if = "Option::is_none")] + pub username: Option, /// WorldID be \"offline\" on User profiles if you are not friends with that user. #[serde(rename = "worldId", skip_serializing_if = "Option::is_none")] pub world_id: Option, } impl User { - pub fn new(allow_avatar_copying: bool, bio: String, bio_links: Vec, 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, user_icon: String, username: String) -> User { + pub fn new(allow_avatar_copying: bool, bio: String, bio_links: Vec, 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, user_icon: String) -> User { User { allow_avatar_copying, bio, @@ -113,7 +113,7 @@ impl User { traveling_to_location: None, traveling_to_world: None, user_icon, - username, + username: None, world_id: None, } }