From f48b155b08707214c00f214cac7da36592959016 Mon Sep 17 00:00:00 2001 From: VRCCat Date: Thu, 17 Nov 2022 23:03:02 +0000 Subject: [PATCH] Upgrade Rust SDK to spec 1.9.1 --- Cargo.toml | 2 +- docs/User.md | 2 +- src/models/user.rs | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f780c74..34c10e2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vrchatapi" -version = "1.9.0" +version = "1.9.1" authors = ["OpenAPI Generator team and contributors"] license = "MIT" edition = "2018" diff --git a/docs/User.md b/docs/User.md index 6280c56..115ec1f 100644 --- a/docs/User.md +++ b/docs/User.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **developer_type** | [**crate::models::DeveloperType**](DeveloperType.md) | | **display_name** | **String** | A users visual display name. This is what shows up in-game, and can different from their `username`. Changing display name is restricted to a cooldown period. | **friend_key** | **String** | | -**friend_request_status** | **String** | | +**friend_request_status** | Option<**String**> | | [optional] **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. | **instance_id** | Option<**String**> | InstanceID can be \"offline\" on User profiles if you are not friends with that user and \"private\" if you are friends and user is in private instance. | [optional] **is_friend** | **bool** | Either their `friendKey`, or empty string if you are not friends. Unknown usage. | diff --git a/src/models/user.rs b/src/models/user.rs index 1ffeb89..83c168a 100644 --- a/src/models/user.rs +++ b/src/models/user.rs @@ -32,8 +32,8 @@ pub struct User { pub display_name: String, #[serde(rename = "friendKey")] pub friend_key: String, - #[serde(rename = "friendRequestStatus")] - pub friend_request_status: String, + #[serde(rename = "friendRequestStatus", skip_serializing_if = "Option::is_none")] + pub friend_request_status: Option, /// 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 = "id")] pub id: String, @@ -84,7 +84,7 @@ pub struct User { } 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) -> 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, 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, @@ -95,7 +95,7 @@ impl User { developer_type, display_name, friend_key, - friend_request_status, + friend_request_status: None, id, instance_id: None, is_friend,