diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index f20d27a..cb94530 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -16,7 +16,7 @@ docs/CurrentUser.md docs/DeploymentGroup.md docs/DeveloperType.md docs/DownloadUrlList.md -docs/DynamicWorldRow.md +docs/DynamicContentRow.md docs/EconomyApi.md docs/Error.md docs/Favorite.md @@ -34,6 +34,11 @@ docs/FilesApi.md docs/FinishFileDataUploadRequest.md docs/FriendStatus.md docs/FriendsApi.md +docs/InfoPush.md +docs/InfoPushData.md +docs/InfoPushDataArticle.md +docs/InfoPushDataArticleContent.md +docs/InfoPushDataClickable.md docs/Instance.md docs/InstancePlatforms.md docs/InstancesApi.md @@ -123,7 +128,7 @@ src/models/current_user.rs src/models/deployment_group.rs src/models/developer_type.rs src/models/download_url_list.rs -src/models/dynamic_world_row.rs +src/models/dynamic_content_row.rs src/models/error.rs src/models/favorite.rs src/models/favorite_group.rs @@ -137,6 +142,11 @@ src/models/file_version.rs src/models/file_version_upload_status.rs src/models/finish_file_data_upload_request.rs src/models/friend_status.rs +src/models/info_push.rs +src/models/info_push_data.rs +src/models/info_push_data_article.rs +src/models/info_push_data_article_content.rs +src/models/info_push_data_clickable.rs src/models/instance.rs src/models/instance_platforms.rs src/models/invite_message.rs diff --git a/Cargo.toml b/Cargo.toml index c796133..87d2302 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vrchatapi" -version = "1.5.2" +version = "1.5.3" authors = ["OpenAPI Generator team and contributors"] license = "MIT" edition = "2018" diff --git a/docs/ApiConfig.md b/docs/ApiConfig.md index c688649..331758e 100644 --- a/docs/ApiConfig.md +++ b/docs/ApiConfig.md @@ -44,7 +44,7 @@ Name | Type | Description | Notes **disable_upgrade_account** | **bool** | Toggles if account upgrading \"linking with Steam/Oculus\" should be disabled. | [default to false] **download_link_windows** | **String** | Download link for game on the Oculus Rift website. | **download_urls** | [**crate::models::DownloadUrlList**](DownloadURLList.md) | | -**dynamic_world_rows** | [**Vec**](DynamicWorldRow.md) | Array of DynamicWorldRow objects, used by the game to display the list of world rows | +**dynamic_world_rows** | [**Vec**](DynamicContentRow.md) | Array of DynamicWorldRow objects, used by the game to display the list of world rows | **events** | [**crate::models::ApiEventConfig**](APIEventConfig.md) | | **gear_demo_room_id** | **String** | Unknown | **home_world_id** | **String** | | diff --git a/docs/AvatarsApi.md b/docs/AvatarsApi.md index 226e9a4..4af39ef 100644 --- a/docs/AvatarsApi.md +++ b/docs/AvatarsApi.md @@ -123,7 +123,7 @@ Name | Type | Description | Required | Notes **order** | Option<**String**> | | |[default to descending] **offset** | Option<**i32**> | A zero-based offset from the default object sorting from where search results start. | | **search** | Option<**String**> | Filters by world name. | | -**tag** | Option<**String**> | Tags to include (comma-separated). | | +**tag** | Option<**String**> | Tags to include (comma-separated). Any of the tags needs to be present. | | **notag** | Option<**String**> | Tags to exclude (comma-separated). | | **release_status** | Option<**String**> | Filter by ReleaseStatus. | |[default to public] **max_unity_version** | Option<**String**> | The maximum Unity version supported by the asset. | | @@ -166,7 +166,7 @@ Name | Type | Description | Required | Notes **n** | Option<**i32**> | The number of objects to return. | |[default to 60] **order** | Option<**String**> | | |[default to descending] **offset** | Option<**i32**> | A zero-based offset from the default object sorting from where search results start. | | -**tag** | Option<**String**> | Tags to include (comma-separated). | | +**tag** | Option<**String**> | Tags to include (comma-separated). Any of the tags needs to be present. | | **notag** | Option<**String**> | Tags to exclude (comma-separated). | | **release_status** | Option<**String**> | Filter by ReleaseStatus. | |[default to public] **max_unity_version** | Option<**String**> | The maximum Unity version supported by the asset. | | diff --git a/docs/CurrentUser.md b/docs/CurrentUser.md index 88e5c6c..3a70106 100644 --- a/docs/CurrentUser.md +++ b/docs/CurrentUser.md @@ -12,8 +12,8 @@ Name | Type | Description | Notes **bio_links** | **Vec** | | **current_avatar** | **String** | | **current_avatar_asset_url** | **String** | | -**current_avatar_image_url** | **String** | | -**current_avatar_thumbnail_image_url** | **String** | | +**current_avatar_image_url** | **String** | When profilePicOverride is not empty, use it instead. | +**current_avatar_thumbnail_image_url** | **String** | When profilePicOverride is not empty, use it instead. | **date_joined** | [**String**](string.md) | | **developer_type** | [**crate::models::DeveloperType**](DeveloperType.md) | | **display_name** | **String** | | diff --git a/docs/DynamicWorldRow.md b/docs/DynamicContentRow.md similarity index 52% rename from docs/DynamicWorldRow.md rename to docs/DynamicContentRow.md index 1414b2b..bede496 100644 --- a/docs/DynamicWorldRow.md +++ b/docs/DynamicContentRow.md @@ -1,16 +1,17 @@ -# DynamicWorldRow +# DynamicContentRow ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**index** | **i32** | | +**index** | Option<**i32**> | | [optional] **name** | **String** | | -**platform** | **String** | | +**platform** | **String** | Usually \"ThisPlatformSupported\", but can also be other values such as \"all\" or platform specific identifiers. | **sort_heading** | **String** | | **sort_order** | **String** | | **sort_ownership** | **String** | | -**tag** | Option<**String**> | Tag to filter worlds for this row. Not always present. | [optional] +**tag** | Option<**String**> | Tag to filter content for this row. | [optional] +**_type** | Option<**String**> | Type is not present if it is a world. | [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/FavoritesApi.md b/docs/FavoritesApi.md index 2e6a1f4..e227d4e 100644 --- a/docs/FavoritesApi.md +++ b/docs/FavoritesApi.md @@ -186,7 +186,7 @@ Name | Type | Description | Required | Notes **n** | Option<**i32**> | The number of objects to return. | |[default to 60] **offset** | Option<**i32**> | A zero-based offset from the default object sorting from where search results start. | | **_type** | Option<**String**> | The type of favorites to return, FavoriteType. | | -**tag** | Option<**String**> | Tags to include (comma-separated). | | +**tag** | Option<**String**> | Tags to include (comma-separated). Any of the tags needs to be present. | | ### Return type diff --git a/docs/InfoPush.md b/docs/InfoPush.md new file mode 100644 index 0000000..accaefc --- /dev/null +++ b/docs/InfoPush.md @@ -0,0 +1,21 @@ +# InfoPush + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**is_enabled** | **bool** | | [default to true] +**release_status** | [**crate::models::ReleaseStatus**](ReleaseStatus.md) | | +**priority** | **i32** | | +**tags** | **Vec** | | +**data** | [**crate::models::InfoPushData**](InfoPushData.md) | | +**hash** | **String** | Unknown usage, MD5 | +**created_at** | **String** | | +**updated_at** | **String** | | +**start_date** | Option<**String**> | | [optional] +**end_date** | Option<**String**> | | [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/InfoPushData.md b/docs/InfoPushData.md new file mode 100644 index 0000000..2dbe7ff --- /dev/null +++ b/docs/InfoPushData.md @@ -0,0 +1,18 @@ +# InfoPushData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content_list** | Option<[**crate::models::DynamicContentRow**](DynamicContentRow.md)> | | [optional] +**description** | Option<**String**> | | [optional] +**image_url** | Option<**String**> | | [optional] +**name** | Option<**String**> | | [optional] +**on_pressed** | Option<[**crate::models::InfoPushDataClickable**](InfoPushDataClickable.md)> | | [optional] +**template** | Option<**String**> | | [optional] +**version** | Option<**String**> | | [optional] +**article** | Option<[**crate::models::InfoPushDataArticle**](InfoPushDataArticle.md)> | | [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/InfoPushDataArticle.md b/docs/InfoPushDataArticle.md new file mode 100644 index 0000000..956b900 --- /dev/null +++ b/docs/InfoPushDataArticle.md @@ -0,0 +1,11 @@ +# InfoPushDataArticle + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | Option<[**crate::models::InfoPushDataArticleContent**](InfoPushDataArticleContent.md)> | | [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/InfoPushDataArticleContent.md b/docs/InfoPushDataArticleContent.md new file mode 100644 index 0000000..c6c5f08 --- /dev/null +++ b/docs/InfoPushDataArticleContent.md @@ -0,0 +1,13 @@ +# InfoPushDataArticleContent + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**text** | Option<**String**> | | [optional] +**image_url** | Option<**String**> | | [optional] +**on_pressed** | Option<[**crate::models::InfoPushDataClickable**](InfoPushDataClickable.md)> | | [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/InfoPushDataClickable.md b/docs/InfoPushDataClickable.md new file mode 100644 index 0000000..f6a7989 --- /dev/null +++ b/docs/InfoPushDataClickable.md @@ -0,0 +1,12 @@ +# InfoPushDataClickable + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**command** | **String** | | +**parameters** | Option<**Vec**> | In case of OpenURL, this would contain the link. | [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 6ecc785..82a00cd 100644 --- a/docs/LimitedUser.md +++ b/docs/LimitedUser.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **bio** | Option<**String**> | | [optional] -**current_avatar_image_url** | **String** | | -**current_avatar_thumbnail_image_url** | **String** | | +**current_avatar_image_url** | **String** | When profilePicOverride is not empty, use it instead. | +**current_avatar_thumbnail_image_url** | **String** | When profilePicOverride is not empty, use it instead. | **developer_type** | [**crate::models::DeveloperType**](DeveloperType.md) | | **display_name** | **String** | | **fallback_avatar** | **String** | | diff --git a/docs/SystemApi.md b/docs/SystemApi.md index 642a4bc..3a25824 100644 --- a/docs/SystemApi.md +++ b/docs/SystemApi.md @@ -8,6 +8,7 @@ Method | HTTP request | Description [**get_css**](SystemApi.md#get_css) | **GET** /css/app.css | Download CSS [**get_current_online_users**](SystemApi.md#get_current_online_users) | **GET** /visits | Current Online Users [**get_health**](SystemApi.md#get_health) | **GET** /health | Check API Health +[**get_info_push**](SystemApi.md#get_info_push) | **GET** /infoPush | Show Information Notices [**get_java_script**](SystemApi.md#get_java_script) | **GET** /js/app.js | Download JavaScript [**get_system_time**](SystemApi.md#get_system_time) | **GET** /time | Current System Time @@ -125,6 +126,37 @@ No authorization required [[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_info_push + +> Vec get_info_push(require, include) +Show Information Notices + +IPS (Info Push System) is a system for VRChat to push out dynamic information to the client. This is primarily used by the Quick-Menu info banners, but can also be used to e.g. alert you to update your game to the latest version. `include` is used to query what Information Pushes should be included in the response. If include is missing or empty, then no notices will normally be returned. This is an \"any of\" search. `require` is used to limit what Information Pushes should be included in the response. This is usually used in combination with `include`, and is an \"all of\" search. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**require** | Option<**String**> | Tags to include (comma-separated). All of the tags needs to be present. | | +**include** | Option<**String**> | Tags to include (comma-separated). Any of the tags needs to be present. | | + +### Return type + +[**Vec**](InfoPush.md) + +### Authorization + +No authorization required + +### 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_java_script > String get_java_script(variant, branch) diff --git a/docs/User.md b/docs/User.md index c488416..7611379 100644 --- a/docs/User.md +++ b/docs/User.md @@ -7,8 +7,8 @@ Name | Type | Description | Notes **allow_avatar_copying** | **bool** | | **bio** | **String** | | **bio_links** | **Vec** | | -**current_avatar_image_url** | **String** | | -**current_avatar_thumbnail_image_url** | **String** | | +**current_avatar_image_url** | **String** | When profilePicOverride is not empty, use it instead. | +**current_avatar_thumbnail_image_url** | **String** | When profilePicOverride is not empty, use it instead. | **date_joined** | [**String**](string.md) | | [readonly] **developer_type** | [**crate::models::DeveloperType**](DeveloperType.md) | | **display_name** | **String** | | diff --git a/docs/WorldsApi.md b/docs/WorldsApi.md index a7765f9..3d3fa53 100644 --- a/docs/WorldsApi.md +++ b/docs/WorldsApi.md @@ -98,7 +98,7 @@ Name | Type | Description | Required | Notes **order** | Option<**String**> | | |[default to descending] **offset** | Option<**i32**> | A zero-based offset from the default object sorting from where search results start. | | **search** | Option<**String**> | Filters by world name. | | -**tag** | Option<**String**> | Tags to include (comma-separated). | | +**tag** | Option<**String**> | Tags to include (comma-separated). Any of the tags needs to be present. | | **notag** | Option<**String**> | Tags to exclude (comma-separated). | | **release_status** | Option<**String**> | Filter by ReleaseStatus. | |[default to public] **max_unity_version** | Option<**String**> | The maximum Unity version supported by the asset. | | @@ -139,7 +139,7 @@ Name | Type | Description | Required | Notes **order** | Option<**String**> | | |[default to descending] **offset** | Option<**i32**> | A zero-based offset from the default object sorting from where search results start. | | **search** | Option<**String**> | Filters by world name. | | -**tag** | Option<**String**> | Tags to include (comma-separated). | | +**tag** | Option<**String**> | Tags to include (comma-separated). Any of the tags needs to be present. | | **notag** | Option<**String**> | Tags to exclude (comma-separated). | | **release_status** | Option<**String**> | Filter by ReleaseStatus. | |[default to public] **max_unity_version** | Option<**String**> | The maximum Unity version supported by the asset. | | @@ -181,7 +181,7 @@ Name | Type | Description | Required | Notes **order** | Option<**String**> | | |[default to descending] **offset** | Option<**i32**> | A zero-based offset from the default object sorting from where search results start. | | **search** | Option<**String**> | Filters by world name. | | -**tag** | Option<**String**> | Tags to include (comma-separated). | | +**tag** | Option<**String**> | Tags to include (comma-separated). Any of the tags needs to be present. | | **notag** | Option<**String**> | Tags to exclude (comma-separated). | | **release_status** | Option<**String**> | Filter by ReleaseStatus. | |[default to public] **max_unity_version** | Option<**String**> | The maximum Unity version supported by the asset. | | @@ -376,7 +376,7 @@ Name | Type | Description | Required | Notes **order** | Option<**String**> | | |[default to descending] **offset** | Option<**i32**> | A zero-based offset from the default object sorting from where search results start. | | **search** | Option<**String**> | Filters by world name. | | -**tag** | Option<**String**> | Tags to include (comma-separated). | | +**tag** | Option<**String**> | Tags to include (comma-separated). Any of the tags needs to be present. | | **notag** | Option<**String**> | Tags to exclude (comma-separated). | | **release_status** | Option<**String**> | Filter by ReleaseStatus. | |[default to public] **max_unity_version** | Option<**String**> | The maximum Unity version supported by the asset. | | diff --git a/src/apis/system_api.rs b/src/apis/system_api.rs index 75b6e98..a89bb69 100644 --- a/src/apis/system_api.rs +++ b/src/apis/system_api.rs @@ -42,6 +42,13 @@ pub enum GetHealthError { UnknownValue(serde_json::Value), } +/// struct for typed errors of method [`get_info_push`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetInfoPushError { + UnknownValue(serde_json::Value), +} + /// struct for typed errors of method [`get_java_script`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -176,6 +183,40 @@ pub fn get_health(configuration: &configuration::Configuration, ) -> Result, include: Option<&str>) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/infoPush", local_var_configuration.base_path); + 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_str) = require { + local_var_req_builder = local_var_req_builder.query(&[("require", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = include { + local_var_req_builder = local_var_req_builder.query(&[("include", &local_var_str.to_string())]); + } + 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)) + } +} + /// Fetches the JavaScript code to the frontend React website. pub fn get_java_script(configuration: &configuration::Configuration, variant: Option<&str>, branch: Option<&str>) -> Result> { let local_var_configuration = configuration; diff --git a/src/models/api_config.rs b/src/models/api_config.rs index f4ddd61..9b0e931 100644 --- a/src/models/api_config.rs +++ b/src/models/api_config.rs @@ -130,7 +130,7 @@ pub struct ApiConfig { pub download_urls: Box, /// Array of DynamicWorldRow objects, used by the game to display the list of world rows #[serde(rename = "dynamicWorldRows")] - pub dynamic_world_rows: Vec, + pub dynamic_world_rows: Vec, #[serde(rename = "events")] pub events: Box, /// Unknown @@ -246,7 +246,7 @@ pub struct ApiConfig { } 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, youtubedl_hash: String, youtubedl_version: String) -> ApiConfig { ApiConfig { voice_enable_degradation, voice_enable_receiver_limiting, diff --git a/src/models/current_user.rs b/src/models/current_user.rs index 3d55e49..af62020 100644 --- a/src/models/current_user.rs +++ b/src/models/current_user.rs @@ -27,8 +27,10 @@ pub struct CurrentUser { pub current_avatar: String, #[serde(rename = "currentAvatarAssetUrl")] pub current_avatar_asset_url: String, + /// When profilePicOverride is not empty, use it instead. #[serde(rename = "currentAvatarImageUrl")] pub current_avatar_image_url: String, + /// When profilePicOverride is not empty, use it instead. #[serde(rename = "currentAvatarThumbnailImageUrl")] pub current_avatar_thumbnail_image_url: String, #[serde(rename = "date_joined")] diff --git a/src/models/dynamic_world_row.rs b/src/models/dynamic_content_row.rs similarity index 52% rename from src/models/dynamic_world_row.rs rename to src/models/dynamic_content_row.rs index 138de7f..0118ccc 100644 --- a/src/models/dynamic_world_row.rs +++ b/src/models/dynamic_content_row.rs @@ -10,11 +10,12 @@ #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct DynamicWorldRow { - #[serde(rename = "index")] - pub index: i32, +pub struct DynamicContentRow { + #[serde(rename = "index", skip_serializing_if = "Option::is_none")] + pub index: Option, #[serde(rename = "name")] pub name: String, + /// Usually \"ThisPlatformSupported\", but can also be other values such as \"all\" or platform specific identifiers. #[serde(rename = "platform")] pub platform: String, #[serde(rename = "sortHeading")] @@ -23,21 +24,25 @@ pub struct DynamicWorldRow { pub sort_order: String, #[serde(rename = "sortOwnership")] pub sort_ownership: String, - /// Tag to filter worlds for this row. Not always present. + /// Tag to filter content for this row. #[serde(rename = "tag", skip_serializing_if = "Option::is_none")] pub tag: Option, + /// Type is not present if it is a world. + #[serde(rename = "type", skip_serializing_if = "Option::is_none")] + pub _type: Option, } -impl DynamicWorldRow { - pub fn new(index: i32, name: String, platform: String, sort_heading: String, sort_order: String, sort_ownership: String) -> DynamicWorldRow { - DynamicWorldRow { - index, +impl DynamicContentRow { + pub fn new(name: String, platform: String, sort_heading: String, sort_order: String, sort_ownership: String) -> DynamicContentRow { + DynamicContentRow { + index: None, name, platform, sort_heading, sort_order, sort_ownership, tag: None, + _type: None, } } } diff --git a/src/models/info_push.rs b/src/models/info_push.rs new file mode 100644 index 0000000..ff4e0aa --- /dev/null +++ b/src/models/info_push.rs @@ -0,0 +1,57 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ruby.js.org + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct InfoPush { + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "isEnabled")] + pub is_enabled: bool, + #[serde(rename = "releaseStatus")] + pub release_status: crate::models::ReleaseStatus, + #[serde(rename = "priority")] + pub priority: i32, + #[serde(rename = "tags")] + pub tags: Vec, + #[serde(rename = "data")] + pub data: Box, + /// Unknown usage, MD5 + #[serde(rename = "hash")] + pub hash: String, + #[serde(rename = "createdAt")] + pub created_at: String, + #[serde(rename = "updatedAt")] + pub updated_at: String, + #[serde(rename = "startDate", skip_serializing_if = "Option::is_none")] + pub start_date: Option, + #[serde(rename = "endDate", skip_serializing_if = "Option::is_none")] + pub end_date: Option, +} + +impl InfoPush { + pub fn new(id: String, is_enabled: bool, release_status: crate::models::ReleaseStatus, priority: i32, tags: Vec, data: crate::models::InfoPushData, hash: String, created_at: String, updated_at: String) -> InfoPush { + InfoPush { + id, + is_enabled, + release_status, + priority, + tags, + data: Box::new(data), + hash, + created_at, + updated_at, + start_date: None, + end_date: None, + } + } +} + + diff --git a/src/models/info_push_data.rs b/src/models/info_push_data.rs new file mode 100644 index 0000000..ac19a42 --- /dev/null +++ b/src/models/info_push_data.rs @@ -0,0 +1,47 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ruby.js.org + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct InfoPushData { + #[serde(rename = "contentList", skip_serializing_if = "Option::is_none")] + pub content_list: Option>, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "imageUrl", skip_serializing_if = "Option::is_none")] + pub image_url: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "onPressed", skip_serializing_if = "Option::is_none")] + pub on_pressed: Option>, + #[serde(rename = "template", skip_serializing_if = "Option::is_none")] + pub template: Option, + #[serde(rename = "version", skip_serializing_if = "Option::is_none")] + pub version: Option, + #[serde(rename = "article", skip_serializing_if = "Option::is_none")] + pub article: Option>, +} + +impl InfoPushData { + pub fn new() -> InfoPushData { + InfoPushData { + content_list: None, + description: None, + image_url: None, + name: None, + on_pressed: None, + template: None, + version: None, + article: None, + } + } +} + + diff --git a/src/models/info_push_data_article.rs b/src/models/info_push_data_article.rs new file mode 100644 index 0000000..e3ad7df --- /dev/null +++ b/src/models/info_push_data_article.rs @@ -0,0 +1,26 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ruby.js.org + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct InfoPushDataArticle { + #[serde(rename = "content", skip_serializing_if = "Option::is_none")] + pub content: Option>, +} + +impl InfoPushDataArticle { + pub fn new() -> InfoPushDataArticle { + InfoPushDataArticle { + content: None, + } + } +} + + diff --git a/src/models/info_push_data_article_content.rs b/src/models/info_push_data_article_content.rs new file mode 100644 index 0000000..12a2510 --- /dev/null +++ b/src/models/info_push_data_article_content.rs @@ -0,0 +1,32 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ruby.js.org + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct InfoPushDataArticleContent { + #[serde(rename = "text", skip_serializing_if = "Option::is_none")] + pub text: Option, + #[serde(rename = "imageUrl", skip_serializing_if = "Option::is_none")] + pub image_url: Option, + #[serde(rename = "onPressed", skip_serializing_if = "Option::is_none")] + pub on_pressed: Option>, +} + +impl InfoPushDataArticleContent { + pub fn new() -> InfoPushDataArticleContent { + InfoPushDataArticleContent { + text: None, + image_url: None, + on_pressed: None, + } + } +} + + diff --git a/src/models/info_push_data_clickable.rs b/src/models/info_push_data_clickable.rs new file mode 100644 index 0000000..50217b2 --- /dev/null +++ b/src/models/info_push_data_clickable.rs @@ -0,0 +1,48 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ruby.js.org + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct InfoPushDataClickable { + #[serde(rename = "command")] + pub command: Command, + /// In case of OpenURL, this would contain the link. + #[serde(rename = "parameters", skip_serializing_if = "Option::is_none")] + pub parameters: Option>, +} + +impl InfoPushDataClickable { + pub fn new(command: Command) -> InfoPushDataClickable { + InfoPushDataClickable { + command, + parameters: None, + } + } +} + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Command { + #[serde(rename = "OpenURL")] + OpenURL, + #[serde(rename = "OpenVRCPlusMenu")] + OpenVRCPlusMenu, + #[serde(rename = "OpenSafetyMenu")] + OpenSafetyMenu, + #[serde(rename = "CannedWorldSearch")] + CannedWorldSearch, +} + +impl Default for Command { + fn default() -> Command { + Self::OpenURL + } +} + diff --git a/src/models/limited_user.rs b/src/models/limited_user.rs index 2786130..509e2e9 100644 --- a/src/models/limited_user.rs +++ b/src/models/limited_user.rs @@ -13,8 +13,10 @@ pub struct LimitedUser { #[serde(rename = "bio", skip_serializing_if = "Option::is_none")] pub bio: Option, + /// When profilePicOverride is not empty, use it instead. #[serde(rename = "currentAvatarImageUrl")] pub current_avatar_image_url: String, + /// When profilePicOverride is not empty, use it instead. #[serde(rename = "currentAvatarThumbnailImageUrl")] pub current_avatar_thumbnail_image_url: String, #[serde(rename = "developerType")] diff --git a/src/models/mod.rs b/src/models/mod.rs index 1e4d5df..8704ae1 100644 --- a/src/models/mod.rs +++ b/src/models/mod.rs @@ -26,8 +26,8 @@ pub mod developer_type; pub use self::developer_type::DeveloperType; pub mod download_url_list; pub use self::download_url_list::DownloadUrlList; -pub mod dynamic_world_row; -pub use self::dynamic_world_row::DynamicWorldRow; +pub mod dynamic_content_row; +pub use self::dynamic_content_row::DynamicContentRow; pub mod error; pub use self::error::Error; pub mod favorite; @@ -54,6 +54,16 @@ pub mod finish_file_data_upload_request; pub use self::finish_file_data_upload_request::FinishFileDataUploadRequest; pub mod friend_status; pub use self::friend_status::FriendStatus; +pub mod info_push; +pub use self::info_push::InfoPush; +pub mod info_push_data; +pub use self::info_push_data::InfoPushData; +pub mod info_push_data_article; +pub use self::info_push_data_article::InfoPushDataArticle; +pub mod info_push_data_article_content; +pub use self::info_push_data_article_content::InfoPushDataArticleContent; +pub mod info_push_data_clickable; +pub use self::info_push_data_clickable::InfoPushDataClickable; pub mod instance; pub use self::instance::Instance; pub mod instance_platforms; diff --git a/src/models/user.rs b/src/models/user.rs index 4bb0090..2a79607 100644 --- a/src/models/user.rs +++ b/src/models/user.rs @@ -17,8 +17,10 @@ pub struct User { pub bio: String, #[serde(rename = "bioLinks")] pub bio_links: Vec, + /// When profilePicOverride is not empty, use it instead. #[serde(rename = "currentAvatarImageUrl")] pub current_avatar_image_url: String, + /// When profilePicOverride is not empty, use it instead. #[serde(rename = "currentAvatarThumbnailImageUrl")] pub current_avatar_thumbnail_image_url: String, #[serde(rename = "date_joined")]