Upgrade Rust SDK to spec 1.6.0

This commit is contained in:
VRCCat
2021-11-25 21:33:35 +00:00
parent a5cd440e05
commit adf2aa961e
46 changed files with 225 additions and 69 deletions

View File

@ -41,6 +41,7 @@ docs/InfoPushDataArticleContent.md
docs/InfoPushDataClickable.md
docs/Instance.md
docs/InstancePlatforms.md
docs/InstanceType.md
docs/InstancesApi.md
docs/InviteApi.md
docs/InviteMessage.md
@ -66,6 +67,7 @@ docs/PlayerModeration.md
docs/PlayerModerationType.md
docs/PlayermoderationApi.md
docs/PublicAnnouncement.md
docs/Region.md
docs/ReleaseStatus.md
docs/Response.md
docs/Subscription.md
@ -149,6 +151,7 @@ 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/instance_type.rs
src/models/invite_message.rs
src/models/invite_message_type.rs
src/models/invite_request.rs
@ -170,6 +173,7 @@ src/models/permission.rs
src/models/player_moderation.rs
src/models/player_moderation_type.rs
src/models/public_announcement.rs
src/models/region.rs
src/models/release_status.rs
src/models/response.rs
src/models/subscription.rs

View File

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

View File

@ -47,9 +47,9 @@ Name | Type | Description | Notes
**dynamic_world_rows** | [**Vec<crate::models::DynamicContentRow>**](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** | |
**home_world_id** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. |
**homepage_redirect_target** | **String** | Redirect target if you try to open the base API domain in your browser | [default to https://hello.vrchat.com]
**hub_world_id** | **String** | |
**hub_world_id** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. |
**jobs_email** | **String** | VRChat's job application email |
**message_of_the_day** | **String** | MOTD |
**moderation_email** | **String** | VRChat's moderation related email |
@ -66,8 +66,8 @@ Name | Type | Description | Notes
**sdk_unity_version** | **String** | Unity version supported by the SDK |
**server_name** | **String** | Server name of the API server currently responding |
**support_email** | **String** | VRChat's support email |
**time_out_world_id** | **String** | |
**tutorial_world_id** | **String** | |
**time_out_world_id** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. |
**tutorial_world_id** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. |
**update_rate_ms_maximum** | **i32** | Unknown |
**update_rate_ms_minimum** | **i32** | Unknown |
**update_rate_ms_normal** | **i32** | Unknown |

View File

@ -6,9 +6,9 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**asset_url** | Option<**String**> | Not present from general serach `/avatars`, only on specific requests `/avatars/{avatarId}`. | [optional]
**asset_url_object** | Option<[**serde_json::Value**](.md)> | Not present from general serach `/avatars`, only on specific requests `/avatars/{avatarId}`. **Deprecation:** `Object` has unknown usage/fields, and is always empty. Use normal `Url` field instead. | [optional]
**author_id** | **String** | |
**author_name** | **String** | | [readonly]
**created_at** | **String** | | [readonly]
**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** | |
**created_at** | **String** | |
**description** | **String** | |
**featured** | **bool** | | [default to false]
**id** | **String** | |
@ -21,7 +21,7 @@ Name | Type | Description | Notes
**unity_package_url_object** | [**crate::models::AvatarUnityPackageUrlObject**](Avatar_unityPackageUrlObject.md) | |
**unity_packages** | [**Vec<crate::models::UnityPackage>**](UnityPackage.md) | |
**updated_at** | **String** | |
**version** | **i32** | | [readonly][default to 0]
**version** | **i32** | | [default to 0]
[[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

@ -6,11 +6,11 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**asset_url** | **String** | |
**asset_version** | Option<**i32**> | | [optional]
**author_id** | Option<**String**> | | [optional]
**author_id** | Option<**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. | [optional]
**author_name** | Option<**String**> | | [optional]
**capacity** | Option<**i32**> | | [optional]
**description** | Option<**String**> | | [optional]
**id** | Option<**String**> | | [optional]
**id** | Option<**String**> | WorldID be \"offline\" on User profiles if you are not friends with that user. | [optional]
**image_url** | **String** | |
**name** | **String** | |
**platform** | Option<**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`. | [optional]

View File

@ -26,8 +26,8 @@ Name | Type | Description | Notes
**has_email** | **bool** | |
**has_logged_in_from_client** | **bool** | |
**has_pending_email** | **bool** | |
**home_location** | **String** | |
**id** | **String** | |
**home_location** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that 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. |
**is_friend** | **bool** | | [default to false]
**last_login** | **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`. |

View File

@ -8,7 +8,7 @@ Name | Type | Description | Notes
**id** | **String** | |
**name** | **String** | |
**owner_display_name** | **String** | |
**owner_id** | **String** | |
**owner_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. |
**tags** | **Vec<String>** | |
**_type** | [**crate::models::FavoriteType**](FavoriteType.md) | |
**visibility** | [**crate::models::FavoriteGroupVisibility**](FavoriteGroupVisibility.md) | |

View File

@ -8,7 +8,7 @@ Name | Type | Description | Notes
**id** | **String** | |
**mime_type** | [**crate::models::MimeType**](MIMEType.md) | |
**name** | **String** | |
**owner_id** | **String** | |
**owner_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. |
**tags** | **Vec<String>** | |
**versions** | [**Vec<crate::models::FileVersion>**](FileVersion.md) | |

View File

@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**category** | **String** | | [readonly][default to Category_Queued]
**category** | **String** | | [default to Category_Queued]
**file_name** | **String** | |
**md5** | **String** | |
**size_in_bytes** | **i32** | |

View File

@ -7,25 +7,25 @@ Name | Type | Description | Notes
**active** | **bool** | | [default to true]
**can_request_invite** | **bool** | | [default to true]
**capacity** | **i32** | |
**client_number** | **String** | |
**client_number** | **String** | Always returns \"unknown\". |
**full** | **bool** | | [default to false]
**id** | **String** | |
**id** | **String** | InstanceID be \"offline\" on User profiles if you are not friends with that user. |
**instance_id** | **String** | |
**location** | **String** | |
**location** | **String** | InstanceID be \"offline\" on User profiles if you are not friends with that user. |
**n_users** | **i32** | |
**name** | **String** | |
**nonce** | Option<**String**> | | [optional]
**owner_id** | Option<**String**> | | [optional]
**owner_id** | Option<**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. | [optional]
**permanent** | **bool** | | [default to false]
**photon_region** | **String** | |
**platforms** | [**crate::models::InstancePlatforms**](Instance_platforms.md) | |
**region** | **String** | |
**photon_region** | [**crate::models::Region**](Region.md) | |
**platforms** | [**crate::models::InstancePlatforms**](InstancePlatforms.md) | |
**region** | [**crate::models::Region**](Region.md) | |
**short_name** | **String** | |
**tags** | **Vec<String>** | |
**_type** | **String** | |
**users** | Option<[**Vec<serde_json::Value>**](serde_json::Value.md)> | Always empty on non-existing instances, and non-present on existing instances. | [optional]
**world** | Option<[**serde_json::Value**](.md)> | Only present on non-existing instances, and only contains a very small subject of World object. Use World API instead. | [optional]
**world_id** | **String** | |
**tags** | **Vec<String>** | The tags array on Instances usually contain the language tags of the people in the instance. |
**_type** | [**crate::models::InstanceType**](InstanceType.md) | |
**world_id** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. |
**hidden** | Option<**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. | [optional]
**friends** | Option<**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. | [optional]
**private** | Option<**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. | [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)

10
docs/InstanceType.md Normal file
View File

@ -0,0 +1,10 @@
# InstanceType
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[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

@ -15,7 +15,7 @@ Method | HTTP request | Description
> crate::models::Instance get_instance(world_id, instance_id)
Get Instance
Returns an instance.
Returns an instance. Please read [Instances Tutorial](https://vrchatapi.github.io/tutorials/instances/) for more information on Instances. If an invalid instanceId is provided, this endpoint will simply return \"null\"!
### Parameters

View File

@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**instance_id** | **String** | |
**instance_id** | **String** | InstanceID be \"offline\" on User profiles if you are not friends with that user. |
[[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
**developer_type** | [**crate::models::DeveloperType**](DeveloperType.md) | |
**display_name** | **String** | |
**fallback_avatar** | **String** | |
**id** | **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. |
**is_friend** | **bool** | |
**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`. |
**profile_pic_override** | **String** | |

View File

@ -4,13 +4,13 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**author_id** | **String** | |
**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** | |
**created_at** | **String** | |
**favorites** | **i32** | | [default to 0]
**heat** | **i32** | | [default to 0]
**id** | **String** | |
**id** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. |
**image_url** | **String** | |
**labs_publication_date** | **String** | |
**name** | **String** | |

View File

@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**moderated** | **String** | |
**moderated** | **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. |
**_type** | [**crate::models::PlayerModerationType**](PlayerModerationType.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

@ -9,7 +9,7 @@ Name | Type | Description | Notes
**id** | **String** | |
**message** | **String** | |
**seen** | **bool** | | [default to false]
**sender_user_id** | **String** | |
**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) | |

View File

@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | |
**name** | **String** | |
**owner_id** | **String** | |
**owner_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. |
**data** | Option<[**serde_json::Value**](.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)

View File

@ -7,9 +7,9 @@ Name | Type | Description | Notes
**created** | **String** | |
**id** | **String** | |
**source_display_name** | **String** | |
**source_user_id** | **String** | |
**source_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. |
**target_display_name** | **String** | |
**target_user_id** | **String** | |
**target_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. |
**_type** | [**crate::models::PlayerModerationType**](PlayerModerationType.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)

10
docs/Region.md Normal file
View File

@ -0,0 +1,10 @@
# Region
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[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

@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**asset_url** | Option<**String**> | | [optional]
**asset_version** | Option<**String**> | | [optional]
**author_id** | Option<**String**> | | [optional]
**author_id** | Option<**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. | [optional]
**author_name** | Option<**String**> | | [optional]
**capacity** | Option<**i32**> | | [optional]
**description** | Option<**String**> | | [optional]

View File

@ -4,29 +4,29 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**allow_avatar_copying** | **bool** | |
**allow_avatar_copying** | **bool** | | [default to true]
**bio** | **String** | |
**bio_links** | **Vec<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]
**date_joined** | [**String**](string.md) | |
**developer_type** | [**crate::models::DeveloperType**](DeveloperType.md) | |
**display_name** | **String** | |
**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** | |
**id** | **String** | |
**instance_id** | Option<**String**> | | [optional]
**is_friend** | **bool** | |
**last_login** | **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 be \"offline\" on User profiles if you are not friends with that user. | [optional]
**is_friend** | **bool** | Either their `friendKey`, or empty string if you are not friends. Unknown usage. |
**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**> | | [optional]
**location** | Option<**String**> | WorldID be \"offline\" on User profiles if you are not friends with that user. | [optional]
**profile_pic_override** | **String** | |
**state** | [**crate::models::UserState**](UserState.md) | |
**status** | [**crate::models::UserStatus**](UserStatus.md) | |
**status_description** | **String** | |
**tags** | **Vec<String>** | |
**user_icon** | **String** | |
**username** | **String** | |
**world_id** | Option<**String**> | | [optional]
**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]
[[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

@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**asset_url** | **String** | |
**asset_url_object** | [**serde_json::Value**](.md) | |
**author_id** | **String** | |
**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** | |
**created_at** | **String** | |
@ -14,7 +14,7 @@ Name | Type | Description | Notes
**favorites** | Option<**i32**> | | [optional][default to 0]
**featured** | **bool** | | [default to false]
**heat** | **i32** | | [default to 0]
**id** | **String** | |
**id** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. |
**image_url** | **String** | |
**instances** | Option<[**Vec<Vec<serde_json::Value>>**](array.md)> | | [optional]
**labs_publication_date** | **String** | |

View File

@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | |
**id** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. |
**metadata** | [**serde_json::Value**](.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

@ -38,7 +38,7 @@ pub enum SendSelfInviteError {
}
/// Returns an instance.
/// Returns an instance. Please read [Instances Tutorial](https://vrchatapi.github.io/tutorials/instances/) for more information on Instances. If an invalid instanceId is provided, this endpoint will simply return \"null\"!
pub fn get_instance(configuration: &configuration::Configuration, world_id: &str, instance_id: &str) -> Result<crate::models::Instance, Error<GetInstanceError>> {
let local_var_configuration = configuration;

View File

@ -136,11 +136,13 @@ pub struct ApiConfig {
/// Unknown
#[serde(rename = "gearDemoRoomId")]
pub gear_demo_room_id: String,
/// WorldID be \"offline\" on User profiles if you are not friends with that user.
#[serde(rename = "homeWorldId")]
pub home_world_id: String,
/// Redirect target if you try to open the base API domain in your browser
#[serde(rename = "homepageRedirectTarget")]
pub homepage_redirect_target: String,
/// WorldID be \"offline\" on User profiles if you are not friends with that user.
#[serde(rename = "hubWorldId")]
pub hub_world_id: String,
/// VRChat's job application email
@ -191,8 +193,10 @@ pub struct ApiConfig {
/// VRChat's support email
#[serde(rename = "supportEmail")]
pub support_email: String,
/// WorldID be \"offline\" on User profiles if you are not friends with that user.
#[serde(rename = "timeOutWorldId")]
pub time_out_world_id: String,
/// WorldID be \"offline\" on User profiles if you are not friends with that user.
#[serde(rename = "tutorialWorldId")]
pub tutorial_world_id: String,
/// Unknown

View File

@ -17,6 +17,7 @@ pub struct Avatar {
/// Not present from general serach `/avatars`, only on specific requests `/avatars/{avatarId}`. **Deprecation:** `Object` has unknown usage/fields, and is always empty. Use normal `Url` field instead.
#[serde(rename = "assetUrlObject", skip_serializing_if = "Option::is_none")]
pub asset_url_object: Option<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,
#[serde(rename = "authorName")]

View File

@ -15,6 +15,7 @@ pub struct CreateWorldRequest {
pub asset_url: String,
#[serde(rename = "assetVersion", skip_serializing_if = "Option::is_none")]
pub asset_version: Option<i32>,
/// 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", skip_serializing_if = "Option::is_none")]
pub author_id: Option<String>,
#[serde(rename = "authorName", skip_serializing_if = "Option::is_none")]
@ -23,6 +24,7 @@ pub struct CreateWorldRequest {
pub capacity: Option<i32>,
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
/// WorldID be \"offline\" on User profiles if you are not friends with that user.
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "imageUrl")]

View File

@ -58,8 +58,10 @@ pub struct CurrentUser {
pub has_logged_in_from_client: bool,
#[serde(rename = "hasPendingEmail")]
pub has_pending_email: bool,
/// WorldID be \"offline\" on User profiles if you are not friends with that user.
#[serde(rename = "homeLocation")]
pub home_location: 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,
#[serde(rename = "isFriend")]

View File

@ -19,6 +19,7 @@ pub struct FavoriteGroup {
pub name: String,
#[serde(rename = "ownerDisplayName")]
pub owner_display_name: 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 = "ownerId")]
pub owner_id: String,
#[serde(rename = "tags")]

View File

@ -19,6 +19,7 @@ pub struct File {
pub mime_type: crate::models::MimeType,
#[serde(rename = "name")]
pub name: 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 = "ownerId")]
pub owner_id: String,
#[serde(rename = "tags")]

View File

@ -6,6 +6,7 @@
* Generated by: https://openapi-generator.tech
*/
/// Instance : * `hidden` field is only present if InstanceType is `hidden` aka \"Friends+\", and is instance creator. * `friends` field is only present if InstanceType is `friends` aka \"Friends\", and is instance creator. * `private` field is only present if InstanceType is `private` aka \"Invite\" or \"Invite+\", and is instance creator.
@ -17,50 +18,58 @@ pub struct Instance {
pub can_request_invite: bool,
#[serde(rename = "capacity")]
pub capacity: i32,
/// Always returns \"unknown\".
#[serde(rename = "clientNumber")]
pub client_number: String,
#[serde(rename = "full")]
pub full: bool,
/// InstanceID be \"offline\" on User profiles if you are not friends with that user.
#[serde(rename = "id")]
pub id: String,
#[serde(rename = "instanceId")]
pub instance_id: String,
/// InstanceID be \"offline\" on User profiles if you are not friends with that user.
#[serde(rename = "location")]
pub location: String,
#[serde(rename = "n_users")]
pub n_users: i32,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "nonce", skip_serializing_if = "Option::is_none")]
pub nonce: Option<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 = "ownerId", skip_serializing_if = "Option::is_none")]
pub owner_id: Option<String>,
#[serde(rename = "permanent")]
pub permanent: bool,
#[serde(rename = "photonRegion")]
pub photon_region: String,
pub photon_region: crate::models::Region,
#[serde(rename = "platforms")]
pub platforms: Box<crate::models::InstancePlatforms>,
#[serde(rename = "region")]
pub region: String,
pub region: crate::models::Region,
#[serde(rename = "shortName")]
pub short_name: String,
/// The tags array on Instances usually contain the language tags of the people in the instance.
#[serde(rename = "tags")]
pub tags: Vec<String>,
#[serde(rename = "type")]
pub _type: String,
/// Always empty on non-existing instances, and non-present on existing instances.
#[serde(rename = "users", skip_serializing_if = "Option::is_none")]
pub users: Option<Vec<serde_json::Value>>,
/// Only present on non-existing instances, and only contains a very small subject of World object. Use World API instead.
#[serde(rename = "world", skip_serializing_if = "Option::is_none")]
pub world: Option<serde_json::Value>,
pub _type: crate::models::InstanceType,
/// WorldID be \"offline\" on User profiles if you are not friends with that user.
#[serde(rename = "worldId")]
pub world_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 = "hidden", skip_serializing_if = "Option::is_none")]
pub hidden: Option<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 = "friends", skip_serializing_if = "Option::is_none")]
pub friends: Option<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 = "private", skip_serializing_if = "Option::is_none")]
pub private: Option<String>,
}
impl Instance {
pub fn new(active: bool, can_request_invite: bool, capacity: i32, client_number: String, full: bool, id: String, instance_id: String, location: String, n_users: i32, name: String, permanent: bool, photon_region: String, platforms: crate::models::InstancePlatforms, region: String, short_name: String, tags: Vec<String>, _type: String, world_id: String) -> Instance {
/// * `hidden` field is only present if InstanceType is `hidden` aka \"Friends+\", and is instance creator. * `friends` field is only present if InstanceType is `friends` aka \"Friends\", and is instance creator. * `private` field is only present if InstanceType is `private` aka \"Invite\" or \"Invite+\", and is instance creator.
pub fn new(active: bool, can_request_invite: bool, capacity: i32, client_number: String, full: bool, id: String, instance_id: String, location: String, n_users: i32, name: String, permanent: bool, photon_region: crate::models::Region, platforms: crate::models::InstancePlatforms, region: crate::models::Region, short_name: String, tags: Vec<String>, _type: crate::models::InstanceType, world_id: String) -> Instance {
Instance {
active,
can_request_invite,
@ -72,7 +81,6 @@ impl Instance {
location,
n_users,
name,
nonce: None,
owner_id: None,
permanent,
photon_region,
@ -81,9 +89,10 @@ impl Instance {
short_name,
tags,
_type,
users: None,
world: None,
world_id,
hidden: None,
friends: None,
private: None,
}
}
}

View File

@ -0,0 +1,43 @@
/*
* VRChat API Documentation
*
*
* Contact: me@ruby.js.org
* Generated by: https://openapi-generator.tech
*/
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum InstanceType {
#[serde(rename = "public")]
Public,
#[serde(rename = "hidden")]
Hidden,
#[serde(rename = "friends")]
Friends,
#[serde(rename = "private")]
Private,
}
impl ToString for InstanceType {
fn to_string(&self) -> String {
match self {
Self::Public => String::from("public"),
Self::Hidden => String::from("hidden"),
Self::Friends => String::from("friends"),
Self::Private => String::from("private"),
}
}
}
impl Default for InstanceType {
fn default() -> InstanceType {
Self::Public
}
}

View File

@ -11,6 +11,7 @@
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InviteRequest {
/// InstanceID be \"offline\" on User profiles if you are not friends with that user.
#[serde(rename = "instanceId")]
pub instance_id: String,
}

View File

@ -25,6 +25,7 @@ pub struct LimitedUser {
pub display_name: String,
#[serde(rename = "fallbackAvatar")]
pub fallback_avatar: 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,
#[serde(rename = "isFriend")]

View File

@ -11,6 +11,7 @@
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct LimitedWorld {
/// 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,
#[serde(rename = "authorName")]
@ -23,6 +24,7 @@ pub struct LimitedWorld {
pub favorites: i32,
#[serde(rename = "heat")]
pub heat: i32,
/// WorldID be \"offline\" on User profiles if you are not friends with that user.
#[serde(rename = "id")]
pub id: String,
#[serde(rename = "imageUrl")]

View File

@ -68,6 +68,8 @@ pub mod instance;
pub use self::instance::Instance;
pub mod instance_platforms;
pub use self::instance_platforms::InstancePlatforms;
pub mod instance_type;
pub use self::instance_type::InstanceType;
pub mod invite_message;
pub use self::invite_message::InviteMessage;
pub mod invite_message_type;
@ -108,6 +110,8 @@ pub mod player_moderation_type;
pub use self::player_moderation_type::PlayerModerationType;
pub mod public_announcement;
pub use self::public_announcement::PublicAnnouncement;
pub mod region;
pub use self::region::Region;
pub mod release_status;
pub use self::release_status::ReleaseStatus;
pub mod response;

View File

@ -11,6 +11,7 @@
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct ModerateUserRequest {
/// 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 = "moderated")]
pub moderated: String,
#[serde(rename = "type")]

View File

@ -22,6 +22,7 @@ pub struct Notification {
pub message: String,
#[serde(rename = "seen")]
pub seen: bool,
/// 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")]

View File

@ -15,6 +15,7 @@ pub struct Permission {
pub id: String,
#[serde(rename = "name")]
pub name: 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 = "ownerId")]
pub owner_id: String,
#[serde(rename = "data", skip_serializing_if = "Option::is_none")]

View File

@ -17,10 +17,12 @@ pub struct PlayerModeration {
pub id: String,
#[serde(rename = "sourceDisplayName")]
pub source_display_name: 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 = "sourceUserId")]
pub source_user_id: String,
#[serde(rename = "targetDisplayName")]
pub target_display_name: 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 = "targetUserId")]
pub target_user_id: String,
#[serde(rename = "type")]

44
src/models/region.rs Normal file
View File

@ -0,0 +1,44 @@
/*
* VRChat API Documentation
*
*
* Contact: me@ruby.js.org
* Generated by: https://openapi-generator.tech
*/
/// Region : API/Photon region.
/// API/Photon region.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Region {
#[serde(rename = "us")]
Us,
#[serde(rename = "use")]
_Use,
#[serde(rename = "eu")]
Eu,
#[serde(rename = "jp")]
Jp,
}
impl ToString for Region {
fn to_string(&self) -> String {
match self {
Self::Us => String::from("us"),
Self::_Use => String::from("use"),
Self::Eu => String::from("eu"),
Self::Jp => String::from("jp"),
}
}
}
impl Default for Region {
fn default() -> Region {
Self::Us
}
}

View File

@ -15,6 +15,7 @@ pub struct UpdateWorldRequest {
pub asset_url: Option<String>,
#[serde(rename = "assetVersion", skip_serializing_if = "Option::is_none")]
pub asset_version: Option<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 = "authorId", skip_serializing_if = "Option::is_none")]
pub author_id: Option<String>,
#[serde(rename = "authorName", skip_serializing_if = "Option::is_none")]

View File

@ -27,21 +27,27 @@ pub struct User {
pub date_joined: String,
#[serde(rename = "developerType")]
pub developer_type: crate::models::DeveloperType,
/// 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.
#[serde(rename = "displayName")]
pub display_name: String,
#[serde(rename = "friendKey")]
pub friend_key: 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,
/// InstanceID be \"offline\" on User profiles if you are not friends with that user.
#[serde(rename = "instanceId", skip_serializing_if = "Option::is_none")]
pub instance_id: Option<String>,
/// Either their `friendKey`, or empty string if you are not friends. Unknown usage.
#[serde(rename = "isFriend")]
pub is_friend: bool,
/// 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`.
#[serde(rename = "last_platform")]
pub last_platform: String,
/// 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<String>,
#[serde(rename = "profilePicOverride")]
@ -56,8 +62,10 @@ pub struct User {
pub tags: Vec<String>,
#[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,
/// 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<String>,
}

View File

@ -15,6 +15,7 @@ pub struct World {
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,
#[serde(rename = "authorName")]
@ -31,6 +32,7 @@ pub struct World {
pub featured: bool,
#[serde(rename = "heat")]
pub heat: i32,
/// WorldID be \"offline\" on User profiles if you are not friends with that user.
#[serde(rename = "id")]
pub id: String,
#[serde(rename = "imageUrl")]

View File

@ -11,6 +11,7 @@
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct WorldMetadata {
/// WorldID be \"offline\" on User profiles if you are not friends with that user.
#[serde(rename = "id")]
pub id: String,
#[serde(rename = "metadata")]