From 2f9ff05bfe70bdbabffa5073989c2114b0cb2ea2 Mon Sep 17 00:00:00 2001 From: VRCCat Date: Sat, 3 Sep 2022 10:14:53 +0000 Subject: [PATCH] Upgrade Rust SDK to spec 1.7.3 --- .openapi-generator/FILES | 4 +++ Cargo.toml | 2 +- docs/ApiConfig.md | 4 +-- docs/InstancesApi.md | 31 ++++++++++++++++ docs/InviteApi.md | 37 +++++++++++++++++-- docs/InviteMyselfToRequest.md | 11 ++++++ docs/SentNotification.md | 18 ++++++++++ docs/User.md | 6 ++++ docs/World.md | 3 -- src/apis/instances_api.rs | 37 +++++++++++++++++++ src/apis/invite_api.rs | 40 ++++++++++++++++++++- src/models/api_config.rs | 14 ++++---- src/models/invite_myself_to_request.rs | 27 ++++++++++++++ src/models/mod.rs | 4 +++ src/models/sent_notification.rs | 50 ++++++++++++++++++++++++++ src/models/user.rs | 21 ++++++++++- src/models/world.rs | 11 +----- 17 files changed, 293 insertions(+), 27 deletions(-) create mode 100644 docs/InviteMyselfToRequest.md create mode 100644 docs/SentNotification.md create mode 100644 src/models/invite_myself_to_request.rs create mode 100644 src/models/sent_notification.rs diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index dfefeb9..2631ec4 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -46,6 +46,7 @@ docs/InstancesApi.md docs/InviteApi.md docs/InviteMessage.md docs/InviteMessageType.md +docs/InviteMyselfToRequest.md docs/InviteRequest.md docs/InviteResponse.md docs/License.md @@ -71,6 +72,7 @@ docs/Region.md docs/ReleaseStatus.md docs/RequestInviteRequest.md docs/Response.md +docs/SentNotification.md docs/Subscription.md docs/SubscriptionPeriod.md docs/Success.md @@ -155,6 +157,7 @@ src/models/instance_platforms.rs src/models/instance_type.rs src/models/invite_message.rs src/models/invite_message_type.rs +src/models/invite_myself_to_request.rs src/models/invite_request.rs src/models/invite_response.rs src/models/license.rs @@ -178,6 +181,7 @@ src/models/region.rs src/models/release_status.rs src/models/request_invite_request.rs src/models/response.rs +src/models/sent_notification.rs src/models/subscription.rs src/models/subscription_period.rs src/models/success.rs diff --git a/Cargo.toml b/Cargo.toml index 0d5345c..20cd6d7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vrchatapi" -version = "1.7.2" +version = "1.7.3" authors = ["OpenAPI Generator team and contributors"] license = "MIT" edition = "2018" diff --git a/docs/ApiConfig.md b/docs/ApiConfig.md index 09ff17c..0197c85 100644 --- a/docs/ApiConfig.md +++ b/docs/ApiConfig.md @@ -82,8 +82,8 @@ Name | Type | Description | Notes **vive_windows_url** | **String** | Download link for game on the Steam website. | **white_listed_asset_urls** | **Vec** | List of allowed URLs that are allowed to host avatar assets | **world_update_period** | **i32** | Unknown | -**youtubedl_hash** | **String** | Currently used youtube-dl.exe hash in SHA-256-delimited format | -**youtubedl_version** | **String** | Currently used youtube-dl.exe version | +**player_url_resolver_hash** | **String** | Currently used youtube-dl.exe hash in SHA-256-delimited format | +**player_url_resolver_version** | **String** | Currently used youtube-dl.exe version | [[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/InstancesApi.md b/docs/InstancesApi.md index 4fb821b..fc48491 100644 --- a/docs/InstancesApi.md +++ b/docs/InstancesApi.md @@ -5,6 +5,7 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* Method | HTTP request | Description ------------- | ------------- | ------------- [**get_instance**](InstancesApi.md#get_instance) | **GET** /instances/{worldId}:{instanceId} | Get Instance +[**get_instance_by_short_name**](InstancesApi.md#get_instance_by_short_name) | **GET** /instances/s/{shortName} | Get Instance By Short Name [**get_short_name**](InstancesApi.md#get_short_name) | **GET** /instances/{worldId}:{instanceId}/shortName | Get Instance Short Name [**send_self_invite**](InstancesApi.md#send_self_invite) | **POST** /instances/{worldId}:{instanceId}/invite | Send Self Invite @@ -41,6 +42,36 @@ Name | Type | Description | Required | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +## get_instance_by_short_name + +> crate::models::Instance get_instance_by_short_name(short_name) +Get Instance By Short Name + +Returns an instance. Please read [Instances Tutorial](https://vrchatapi.github.io/tutorials/instances/) for more information on Instances. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**short_name** | **String** | | [required] | + +### Return type + +[**crate::models::Instance**](Instance.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + ## get_short_name > String get_short_name(world_id, instance_id) diff --git a/docs/InviteApi.md b/docs/InviteApi.md index e4e51aa..4bd2c64 100644 --- a/docs/InviteApi.md +++ b/docs/InviteApi.md @@ -6,6 +6,7 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**get_invite_message**](InviteApi.md#get_invite_message) | **GET** /message/{userId}/{messageType}/{slot} | Get Invite Message [**get_invite_messages**](InviteApi.md#get_invite_messages) | **GET** /message/{userId}/{messageType} | List Invite Messages +[**invite_myself_to**](InviteApi.md#invite_myself_to) | **POST** /invite/myself/to/{worldId}:{instanceId} | Invite Myself To Instance [**invite_user**](InviteApi.md#invite_user) | **POST** /invite/{userId} | Invite User [**request_invite**](InviteApi.md#request_invite) | **POST** /requestInvite/{userId} | Request Invite [**reset_invite_message**](InviteApi.md#reset_invite_message) | **DELETE** /message/{userId}/{messageType}/{slot} | Reset Invite Message @@ -77,9 +78,41 @@ Name | Type | Description | Required | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +## invite_myself_to + +> crate::models::SentNotification invite_myself_to(world_id, instance_id, invite_myself_to_request) +Invite Myself To Instance + +Sends self an invite to an instance + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**world_id** | **String** | | [required] | +**instance_id** | **String** | | [required] | +**invite_myself_to_request** | Option<[**InviteMyselfToRequest**](InviteMyselfToRequest.md)> | | | + +### Return type + +[**crate::models::SentNotification**](SentNotification.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + ## invite_user -> crate::models::Notification invite_user(user_id, invite_request) +> crate::models::SentNotification invite_user(user_id, invite_request) Invite User Sends an invite to a user. Returns the Notification of type `invite` that was sent. @@ -94,7 +127,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::Notification**](Notification.md) +[**crate::models::SentNotification**](SentNotification.md) ### Authorization diff --git a/docs/InviteMyselfToRequest.md b/docs/InviteMyselfToRequest.md new file mode 100644 index 0000000..f88b609 --- /dev/null +++ b/docs/InviteMyselfToRequest.md @@ -0,0 +1,11 @@ +# InviteMyselfToRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**short_name** | **String** | Short Name of the Instance; can be retrieved from the Get Instance Short Name endpoint. | + +[[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 new file mode 100644 index 0000000..f7848d4 --- /dev/null +++ b/docs/SentNotification.md @@ -0,0 +1,18 @@ +# SentNotification + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **String** | | +**details** | **String** | **NOTICE:** This is not a JSON object, this is a json **encoded** object, meaning you have to json-de-encode to get the NotificationDetail object depending on the NotificationType. | [default to {}] +**id** | **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. | +**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** | | +**_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 a55088d..417b746 100644 --- a/docs/User.md +++ b/docs/User.md @@ -13,17 +13,23 @@ 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** | | **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. | +**last_activity** | **String** | Either a date-time or empty string. | **last_login** | **String** | Either a date-time or empty string. | **last_platform** | **String** | 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`. | **location** | Option<**String**> | WorldID be \"offline\" on User profiles if you are not friends with that user. | [optional] +**note** | Option<**String**> | | [optional] **profile_pic_override** | **String** | | **state** | [**crate::models::UserState**](UserState.md) | | **status** | [**crate::models::UserStatus**](UserStatus.md) | | **status_description** | **String** | | **tags** | **Vec** | | +**traveling_to_instance** | Option<**String**> | | [optional] +**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. | **world_id** | Option<**String**> | WorldID be \"offline\" on User profiles if you are not friends with that user. | [optional] diff --git a/docs/World.md b/docs/World.md index 8990d83..c6339c9 100644 --- a/docs/World.md +++ b/docs/World.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **asset_url** | **String** | Empty if unauthenticated. | -**asset_url_object** | [**serde_json::Value**](.md) | | **author_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. | **author_name** | **String** | | **capacity** | **i32** | | @@ -22,7 +21,6 @@ Name | Type | Description | Notes **namespace** | **String** | | **occupants** | Option<**i32**> | | [optional][default to 0] **organization** | **String** | | [default to vrchat] -**plugin_url_object** | [**serde_json::Value**](.md) | | **popularity** | **i32** | | [default to 0] **preview_youtube_id** | Option<**String**> | | [optional] **private_occupants** | Option<**i32**> | | [optional][default to 0] @@ -31,7 +29,6 @@ Name | Type | Description | Notes **release_status** | [**crate::models::ReleaseStatus**](ReleaseStatus.md) | | **tags** | **Vec** | | **thumbnail_image_url** | **String** | | -**unity_package_url_object** | [**serde_json::Value**](.md) | | **unity_packages** | [**Vec**](UnityPackage.md) | Empty if unauthenticated. | **updated_at** | **String** | | **version** | **i32** | | [default to 0] diff --git a/src/apis/instances_api.rs b/src/apis/instances_api.rs index e51bbe2..7248ab1 100644 --- a/src/apis/instances_api.rs +++ b/src/apis/instances_api.rs @@ -21,6 +21,15 @@ pub enum GetInstanceError { UnknownValue(serde_json::Value), } +/// struct for typed errors of method [`get_instance_by_short_name`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetInstanceByShortNameError { + Status401(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + /// struct for typed errors of method [`get_short_name`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -66,6 +75,34 @@ pub fn get_instance(configuration: &configuration::Configuration, world_id: &str } } +/// Returns an instance. Please read [Instances Tutorial](https://vrchatapi.github.io/tutorials/instances/) for more information on Instances. +pub fn get_instance_by_short_name(configuration: &configuration::Configuration, short_name: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/instances/s/{shortName}", local_var_configuration.base_path, shortName=crate::apis::urlencode(short_name)); + 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) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let mut local_var_resp = local_var_client.execute(local_var_req)?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text()?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + /// Returns an instance short name. pub fn get_short_name(configuration: &configuration::Configuration, world_id: &str, instance_id: &str) -> Result> { let local_var_configuration = configuration; diff --git a/src/apis/invite_api.rs b/src/apis/invite_api.rs index 681702c..3ae65e6 100644 --- a/src/apis/invite_api.rs +++ b/src/apis/invite_api.rs @@ -32,6 +32,15 @@ pub enum GetInviteMessagesError { UnknownValue(serde_json::Value), } +/// struct for typed errors of method [`invite_myself_to`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum InviteMyselfToError { + Status401(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + /// struct for typed errors of method [`invite_user`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -134,8 +143,37 @@ pub fn get_invite_messages(configuration: &configuration::Configuration, user_id } } +/// Sends self an invite to an instance +pub fn invite_myself_to(configuration: &configuration::Configuration, world_id: &str, instance_id: &str, invite_myself_to_request: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/invite/myself/to/{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::POST, local_var_uri_str.as_str()); + + 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_myself_to_request); + + let local_var_req = local_var_req_builder.build()?; + let mut local_var_resp = local_var_client.execute(local_var_req)?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text()?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + /// 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) -> Result> { +pub fn invite_user(configuration: &configuration::Configuration, user_id: &str, invite_request: Option) -> Result> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; diff --git a/src/models/api_config.rs b/src/models/api_config.rs index 4a51946..2dc518c 100644 --- a/src/models/api_config.rs +++ b/src/models/api_config.rs @@ -242,15 +242,15 @@ pub struct ApiConfig { #[serde(rename = "worldUpdatePeriod")] pub world_update_period: i32, /// Currently used youtube-dl.exe hash in SHA-256-delimited format - #[serde(rename = "youtubedl-hash")] - pub youtubedl_hash: String, + #[serde(rename = "player-url-resolver-hash")] + pub player_url_resolver_hash: String, /// Currently used youtube-dl.exe version - #[serde(rename = "youtubedl-version")] - pub youtubedl_version: String, + #[serde(rename = "player-url-resolver-version")] + pub player_url_resolver_version: String, } impl ApiConfig { - pub fn new(voice_enable_degradation: bool, voice_enable_receiver_limiting: bool, address: String, announcements: Vec, api_key: String, app_name: String, build_version_tag: String, client_api_key: String, client_bps_ceiling: i32, client_disconnect_timeout: i32, client_reserved_player_bps: i32, client_sent_count_allowance: i32, contact_email: String, copyright_email: String, current_tos_version: i32, default_avatar: String, deployment_group: crate::models::DeploymentGroup, dev_app_version_standalone: String, dev_download_link_windows: String, dev_sdk_url: String, dev_sdk_version: String, dev_server_version_standalone: String, dis_countdown: String, disable_avatar_copying: bool, disable_avatar_gating: bool, disable_community_labs: bool, disable_community_labs_promotion: bool, disable_email: bool, disable_event_stream: bool, disable_feedback_gating: bool, disable_frontend_builds: bool, disable_hello: bool, disable_oculus_subs: bool, disable_registration: bool, disable_steam_networking: bool, disable_two_factor_auth: bool, disable_udon: bool, disable_upgrade_account: bool, download_link_windows: String, download_urls: crate::models::DownloadUrlList, dynamic_world_rows: Vec, events: crate::models::ApiEventConfig, gear_demo_room_id: String, home_world_id: String, homepage_redirect_target: String, hub_world_id: String, jobs_email: String, message_of_the_day: String, moderation_email: String, moderation_query_period: i32, not_allowed_to_select_avatar_in_private_world_message: String, plugin: String, release_app_version_standalone: String, release_sdk_url: String, release_sdk_version: String, release_server_version_standalone: String, sdk_developer_faq_url: String, sdk_discord_url: String, sdk_not_allowed_to_publish_message: String, sdk_unity_version: String, server_name: String, support_email: String, time_out_world_id: String, tutorial_world_id: String, update_rate_ms_maximum: i32, update_rate_ms_minimum: i32, update_rate_ms_normal: i32, update_rate_ms_udon_manual: i32, upload_analysis_percent: i32, url_list: Vec, use_reliable_udp_for_voice: bool, user_update_period: i32, user_verification_delay: i32, user_verification_retry: i32, user_verification_timeout: i32, vive_windows_url: String, white_listed_asset_urls: Vec, world_update_period: i32, youtubedl_hash: String, youtubedl_version: String) -> ApiConfig { + pub fn new(voice_enable_degradation: bool, voice_enable_receiver_limiting: bool, address: String, announcements: Vec, api_key: String, app_name: String, build_version_tag: String, client_api_key: String, client_bps_ceiling: i32, client_disconnect_timeout: i32, client_reserved_player_bps: i32, client_sent_count_allowance: i32, contact_email: String, copyright_email: String, current_tos_version: i32, default_avatar: String, deployment_group: crate::models::DeploymentGroup, dev_app_version_standalone: String, dev_download_link_windows: String, dev_sdk_url: String, dev_sdk_version: String, dev_server_version_standalone: String, dis_countdown: String, disable_avatar_copying: bool, disable_avatar_gating: bool, disable_community_labs: bool, disable_community_labs_promotion: bool, disable_email: bool, disable_event_stream: bool, disable_feedback_gating: bool, disable_frontend_builds: bool, disable_hello: bool, disable_oculus_subs: bool, disable_registration: bool, disable_steam_networking: bool, disable_two_factor_auth: bool, disable_udon: bool, disable_upgrade_account: bool, download_link_windows: String, download_urls: crate::models::DownloadUrlList, dynamic_world_rows: Vec, events: crate::models::ApiEventConfig, gear_demo_room_id: String, home_world_id: String, homepage_redirect_target: String, hub_world_id: String, jobs_email: String, message_of_the_day: String, moderation_email: String, moderation_query_period: i32, not_allowed_to_select_avatar_in_private_world_message: String, plugin: String, release_app_version_standalone: String, release_sdk_url: String, release_sdk_version: String, release_server_version_standalone: String, sdk_developer_faq_url: String, sdk_discord_url: String, sdk_not_allowed_to_publish_message: String, sdk_unity_version: String, server_name: String, support_email: String, time_out_world_id: String, tutorial_world_id: String, update_rate_ms_maximum: i32, update_rate_ms_minimum: i32, update_rate_ms_normal: i32, update_rate_ms_udon_manual: i32, upload_analysis_percent: i32, url_list: Vec, use_reliable_udp_for_voice: bool, user_update_period: i32, user_verification_delay: i32, user_verification_retry: i32, user_verification_timeout: i32, vive_windows_url: String, white_listed_asset_urls: Vec, world_update_period: i32, player_url_resolver_hash: String, player_url_resolver_version: String) -> ApiConfig { ApiConfig { voice_enable_degradation, voice_enable_receiver_limiting, @@ -330,8 +330,8 @@ impl ApiConfig { vive_windows_url, white_listed_asset_urls, world_update_period, - youtubedl_hash, - youtubedl_version, + player_url_resolver_hash, + player_url_resolver_version, } } } diff --git a/src/models/invite_myself_to_request.rs b/src/models/invite_myself_to_request.rs new file mode 100644 index 0000000..0a361f6 --- /dev/null +++ b/src/models/invite_myself_to_request.rs @@ -0,0 +1,27 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct InviteMyselfToRequest { + /// Short Name of the Instance; can be retrieved from the Get Instance Short Name endpoint. + #[serde(rename = "shortName")] + pub short_name: String, +} + +impl InviteMyselfToRequest { + pub fn new(short_name: String) -> InviteMyselfToRequest { + InviteMyselfToRequest { + short_name, + } + } +} + + diff --git a/src/models/mod.rs b/src/models/mod.rs index c1d7424..c41ee1e 100644 --- a/src/models/mod.rs +++ b/src/models/mod.rs @@ -74,6 +74,8 @@ pub mod invite_message; pub use self::invite_message::InviteMessage; pub mod invite_message_type; pub use self::invite_message_type::InviteMessageType; +pub mod invite_myself_to_request; +pub use self::invite_myself_to_request::InviteMyselfToRequest; pub mod invite_request; pub use self::invite_request::InviteRequest; pub mod invite_response; @@ -118,6 +120,8 @@ pub mod request_invite_request; pub use self::request_invite_request::RequestInviteRequest; pub mod response; pub use self::response::Response; +pub mod sent_notification; +pub use self::sent_notification::SentNotification; pub mod subscription; pub use self::subscription::Subscription; pub mod subscription_period; diff --git a/src/models/sent_notification.rs b/src/models/sent_notification.rs new file mode 100644 index 0000000..8326950 --- /dev/null +++ b/src/models/sent_notification.rs @@ -0,0 +1,50 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct SentNotification { + #[serde(rename = "created_at")] + pub created_at: String, + /// **NOTICE:** This is not a JSON object, this is a json **encoded** object, meaning you have to json-de-encode to get the NotificationDetail object depending on the NotificationType. + #[serde(rename = "details")] + pub details: String, + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "message")] + pub message: 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. + #[serde(rename = "recieverUserId")] + pub 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. + #[serde(rename = "senderUserId")] + pub sender_user_id: String, + #[serde(rename = "senderUsername")] + pub sender_username: String, + #[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 { + SentNotification { + created_at, + details, + id, + message, + reciever_user_id, + sender_user_id, + sender_username, + _type, + } + } +} + + diff --git a/src/models/user.rs b/src/models/user.rs index e475af0..f5dc8a4 100644 --- a/src/models/user.rs +++ b/src/models/user.rs @@ -32,6 +32,8 @@ pub struct User { pub display_name: String, #[serde(rename = "friendKey")] pub friend_key: String, + #[serde(rename = "friendRequestStatus")] + pub friend_request_status: 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. #[serde(rename = "id")] pub id: String, @@ -42,6 +44,9 @@ pub struct User { #[serde(rename = "isFriend")] pub is_friend: bool, /// Either a date-time or empty string. + #[serde(rename = "last_activity")] + pub last_activity: String, + /// Either a date-time or empty string. #[serde(rename = "last_login")] pub last_login: String, /// 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`. @@ -50,6 +55,8 @@ pub struct User { /// WorldID be \"offline\" on User profiles if you are not friends with that user. #[serde(rename = "location", skip_serializing_if = "Option::is_none")] pub location: Option, + #[serde(rename = "note", skip_serializing_if = "Option::is_none")] + pub note: Option, #[serde(rename = "profilePicOverride")] pub profile_pic_override: String, #[serde(rename = "state")] @@ -60,6 +67,12 @@ pub struct User { pub status_description: String, #[serde(rename = "tags")] pub tags: Vec, + #[serde(rename = "travelingToInstance", skip_serializing_if = "Option::is_none")] + pub traveling_to_instance: Option, + #[serde(rename = "travelingToLocation", skip_serializing_if = "Option::is_none")] + pub traveling_to_location: Option, + #[serde(rename = "travelingToWorld", skip_serializing_if = "Option::is_none")] + 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. @@ -71,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, id: String, is_friend: bool, 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, username: String) -> User { User { allow_avatar_copying, bio, @@ -82,17 +95,23 @@ impl User { developer_type, display_name, friend_key, + friend_request_status, id, instance_id: None, is_friend, + last_activity, last_login, last_platform, location: None, + note: None, profile_pic_override, state, status, status_description, tags, + traveling_to_instance: None, + traveling_to_location: None, + traveling_to_world: None, user_icon, username, world_id: None, diff --git a/src/models/world.rs b/src/models/world.rs index a6e8d8b..b3d2e28 100644 --- a/src/models/world.rs +++ b/src/models/world.rs @@ -14,8 +14,6 @@ pub struct World { /// Empty if unauthenticated. #[serde(rename = "assetUrl")] pub asset_url: String, - #[serde(rename = "assetUrlObject")] - pub asset_url_object: serde_json::Value, /// 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 = "authorId")] pub author_id: String, @@ -50,8 +48,6 @@ pub struct World { pub occupants: Option, #[serde(rename = "organization")] pub organization: String, - #[serde(rename = "pluginUrlObject")] - pub plugin_url_object: serde_json::Value, #[serde(rename = "popularity")] pub popularity: i32, #[serde(rename = "previewYoutubeId", skip_serializing_if = "Option::is_none")] @@ -68,8 +64,6 @@ pub struct World { pub tags: Vec, #[serde(rename = "thumbnailImageUrl")] pub thumbnail_image_url: String, - #[serde(rename = "unityPackageUrlObject")] - pub unity_package_url_object: serde_json::Value, /// Empty if unauthenticated. #[serde(rename = "unityPackages")] pub unity_packages: Vec, @@ -82,10 +76,9 @@ pub struct World { } impl World { - pub fn new(asset_url: String, asset_url_object: serde_json::Value, author_id: String, author_name: String, capacity: i32, created_at: String, description: String, featured: bool, heat: i32, id: String, image_url: String, labs_publication_date: String, name: String, namespace: String, organization: String, plugin_url_object: serde_json::Value, popularity: i32, publication_date: String, release_status: crate::models::ReleaseStatus, tags: Vec, thumbnail_image_url: String, unity_package_url_object: serde_json::Value, unity_packages: Vec, updated_at: String, version: i32, visits: i32) -> World { + pub fn new(asset_url: String, author_id: String, author_name: String, capacity: i32, created_at: String, description: String, featured: bool, heat: i32, id: String, image_url: String, labs_publication_date: String, name: String, namespace: String, organization: String, popularity: i32, publication_date: String, release_status: crate::models::ReleaseStatus, tags: Vec, thumbnail_image_url: String, unity_packages: Vec, updated_at: String, version: i32, visits: i32) -> World { World { asset_url, - asset_url_object, author_id, author_name, capacity, @@ -102,7 +95,6 @@ impl World { namespace, occupants: None, organization, - plugin_url_object, popularity, preview_youtube_id: None, private_occupants: None, @@ -111,7 +103,6 @@ impl World { release_status, tags, thumbnail_image_url, - unity_package_url_object, unity_packages, updated_at, version,