diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 9e3cf1b..15f743f 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -24,6 +24,7 @@ docs/FileData.md docs/FileStatus.md docs/FileVersion.md docs/FilesApi.md +docs/FriendStatus.md docs/FriendsApi.md docs/InlineObject.md docs/InlineObject1.md @@ -46,10 +47,12 @@ docs/InlineResponse2003.md docs/InlineResponse2004.md docs/InlineResponse2005.md docs/InlineResponse2006.md -docs/InlineResponse2007.md -docs/InlineResponse403.md +docs/InlineResponse400.md docs/Instance.md docs/InstancePlatforms.md +docs/InviteApi.md +docs/InviteMessage.md +docs/InviteMessageType.md docs/LimitedUnityPackage.md docs/LimitedUser.md docs/LimitedWorld.md @@ -60,7 +63,6 @@ docs/NotificationsApi.md docs/PastDisplayName.md docs/Permission.md docs/PermissionsApi.md -docs/Platform.md docs/PlayerModeration.md docs/PlayerModerationType.md docs/PlayermoderationApi.md @@ -82,6 +84,7 @@ src/apis/configuration.rs src/apis/favorites_api.rs src/apis/files_api.rs src/apis/friends_api.rs +src/apis/invite_api.rs src/apis/mod.rs src/apis/notifications_api.rs src/apis/permissions_api.rs @@ -109,6 +112,7 @@ src/models/file.rs src/models/file_data.rs src/models/file_status.rs src/models/file_version.rs +src/models/friend_status.rs src/models/inline_object.rs src/models/inline_object_1.rs src/models/inline_object_10.rs @@ -130,10 +134,11 @@ src/models/inline_response_200_3.rs src/models/inline_response_200_4.rs src/models/inline_response_200_5.rs src/models/inline_response_200_6.rs -src/models/inline_response_200_7.rs -src/models/inline_response_403.rs +src/models/inline_response_400.rs src/models/instance.rs src/models/instance_platforms.rs +src/models/invite_message.rs +src/models/invite_message_type.rs src/models/limited_unity_package.rs src/models/limited_user.rs src/models/limited_world.rs @@ -143,7 +148,6 @@ src/models/notification.rs src/models/notification_type.rs src/models/past_display_name.rs src/models/permission.rs -src/models/platform.rs src/models/player_moderation.rs src/models/player_moderation_type.rs src/models/release_status.rs diff --git a/Cargo.toml b/Cargo.toml index 6211cdb..521fe8e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vrchatapi" -version = "1.1.2" +version = "1.3.0" authors = ["OpenAPI Generator team and contributors"] license = "MIT" edition = "2018" diff --git a/docs/Avatar.md b/docs/Avatar.md index dd2f440..4b94a05 100644 --- a/docs/Avatar.md +++ b/docs/Avatar.md @@ -6,7 +6,7 @@ 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** | | [readonly] +**author_id** | **String** | | **author_name** | **String** | | [readonly] **created_at** | **String** | | [readonly] **description** | **String** | | diff --git a/docs/AvatarsApi.md b/docs/AvatarsApi.md index 76908fb..07c66f3 100644 --- a/docs/AvatarsApi.md +++ b/docs/AvatarsApi.md @@ -106,7 +106,7 @@ Name | Type | Description | Required | Notes ## get_favorited_avatars -> get_favorited_avatars(featured, sort, n, order, offset, search, tag, notag, release_status, max_unity_version, min_unity_version, platform, user_id) +> Vec get_favorited_avatars(featured, sort, n, order, offset, search, tag, notag, release_status, max_unity_version, min_unity_version, platform, user_id) List Favorited Avatars Search and list favorited avatars by query filters. @@ -132,7 +132,7 @@ Name | Type | Description | Required | Notes ### Return type - (empty response body) +[**Vec**](Avatar.md) ### Authorization diff --git a/docs/CurrentUser.md b/docs/CurrentUser.md index 826a8d5..fa99ea1 100644 --- a/docs/CurrentUser.md +++ b/docs/CurrentUser.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **String** | | [readonly] +**id** | **String** | | **username** | **String** | | **display_name** | **String** | | **user_icon** | **String** | | @@ -41,7 +41,7 @@ Name | Type | Description | Notes **tags** | **Vec** | | **developer_type** | [**crate::models::DeveloperType**](DeveloperType.md) | | **last_login** | **String** | | -**last_platform** | [**crate::models::Platform**](Platform.md) | | +**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`. | **allow_avatar_copying** | **bool** | | **status** | [**crate::models::UserStatus**](UserStatus.md) | | **date_joined** | [**String**](string.md) | | [readonly] diff --git a/docs/Favorite.md b/docs/Favorite.md index e560a41..8fcef8b 100644 --- a/docs/Favorite.md +++ b/docs/Favorite.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **String** | | [readonly] +**id** | **String** | | **_type** | [**crate::models::FavoriteType**](FavoriteType.md) | | **favorite_id** | **String** | MUST be either AvatarID, UserID or WorldID. | **tags** | **Vec** | | diff --git a/docs/FavoriteGroup.md b/docs/FavoriteGroup.md index 76ae416..e5dd29d 100644 --- a/docs/FavoriteGroup.md +++ b/docs/FavoriteGroup.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **String** | | [readonly] -**owner_id** | **String** | | [readonly] +**id** | **String** | | +**owner_id** | **String** | | **owner_display_name** | **String** | | **name** | **String** | | **display_name** | **String** | | diff --git a/docs/FavoritesApi.md b/docs/FavoritesApi.md index 8077bb7..e5fe9df 100644 --- a/docs/FavoritesApi.md +++ b/docs/FavoritesApi.md @@ -47,7 +47,7 @@ Name | Type | Description | Required | Notes ## clear_favorite_group -> crate::models::Error clear_favorite_group(favorite_group_type, favorite_group_name, user_id) +> crate::models::Success clear_favorite_group(favorite_group_type, favorite_group_name, user_id) Clear Favorite Group Clear ALL contents of a specific favorite group. @@ -63,7 +63,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::Error**](Error.md) +[**crate::models::Success**](Success.md) ### Authorization @@ -206,7 +206,7 @@ Name | Type | Description | Required | Notes ## remove_favorite -> crate::models::Error remove_favorite(favorite_id) +> crate::models::Success remove_favorite(favorite_id) Remove Favorite Remove a favorite from your favorites list. @@ -220,7 +220,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::Error**](Error.md) +[**crate::models::Success**](Success.md) ### Authorization diff --git a/docs/File.md b/docs/File.md index f08c5b3..2e19084 100644 --- a/docs/File.md +++ b/docs/File.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **String** | | [readonly] +**id** | **String** | | **name** | **String** | | -**owner_id** | **String** | | [readonly] +**owner_id** | **String** | | **mime_type** | [**crate::models::MimeType**](MIMEType.md) | | **extension** | **String** | | **tags** | **Vec** | | diff --git a/docs/FilesApi.md b/docs/FilesApi.md index 26e1554..4c1f6d5 100644 --- a/docs/FilesApi.md +++ b/docs/FilesApi.md @@ -235,7 +235,7 @@ Name | Type | Description | Required | Notes ## get_file_data_upload_status -> crate::models::InlineResponse2004 get_file_data_upload_status(file_id, version_id, file_type) +> crate::models::InlineResponse2003 get_file_data_upload_status(file_id, version_id, file_type) Check FileData Upload Status Retrieves the upload status for file upload. Can currently only be accessed when `status` is `waiting`. Trying to access it on a file version already uploaded currently times out. @@ -251,7 +251,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::InlineResponse2004**](inline_response_200_4.md) +[**crate::models::InlineResponse2003**](inline_response_200_3.md) ### Authorization @@ -300,7 +300,7 @@ Name | Type | Description | Required | Notes ## start_file_data_upload -> crate::models::InlineResponse2005 start_file_data_upload(file_id, version_id, file_type, part_number) +> crate::models::InlineResponse2004 start_file_data_upload(file_id, version_id, file_type, part_number) Start FileData Upload Starts an upload of a specific FilePart. This endpoint will return an AWS URL which you can PUT data to. You need to call this and receive a new AWS API URL for each `partNumber`. Please see AWS's REST documentation on \"PUT Object to S3\" on how to upload. Once all parts has been uploaded, proceed to `/finish` endpoint. **Note:** `nextPartNumber` seems like it is always ignored. Despite it returning 0, first partNumber is always 1. @@ -317,7 +317,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::InlineResponse2005**](inline_response_200_5.md) +[**crate::models::InlineResponse2004**](inline_response_200_4.md) ### Authorization diff --git a/docs/InlineResponse2007.md b/docs/FriendStatus.md similarity index 61% rename from docs/InlineResponse2007.md rename to docs/FriendStatus.md index e78973f..4b1aaea 100644 --- a/docs/InlineResponse2007.md +++ b/docs/FriendStatus.md @@ -1,10 +1,12 @@ -# InlineResponse2007 +# FriendStatus ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**can_pubilsh** | **bool** | | [readonly][default to true] +**is_friend** | **bool** | | [default to false] +**outgoing_request** | **bool** | | [default to false] +**incoming_request** | **bool** | | [default to false] [[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/FriendsApi.md b/docs/FriendsApi.md index eac759f..4744968 100644 --- a/docs/FriendsApi.md +++ b/docs/FriendsApi.md @@ -74,7 +74,7 @@ Name | Type | Description | Required | Notes ## get_friend_status -> crate::models::InlineResponse2003 get_friend_status(user_id) +> crate::models::FriendStatus get_friend_status(user_id) Check Friend Status Retrieve if the user is currently a friend with a given user, if they have an outgoing friend request, and if they have an incoming friend request. The proper way to receive and accept friend request is by checking if the user has an incoming `Notification` of type `friendRequest`, and then accepting that notification. @@ -88,7 +88,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::InlineResponse2003**](inline_response_200_3.md) +[**crate::models::FriendStatus**](FriendStatus.md) ### Authorization diff --git a/docs/InlineObject12.md b/docs/InlineObject12.md index f7ffade..b8b4377 100644 --- a/docs/InlineObject12.md +++ b/docs/InlineObject12.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**moderated** | **String** | | [readonly] +**moderated** | **String** | | **_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) diff --git a/docs/InlineObject13.md b/docs/InlineObject13.md index f783aac..2d314f9 100644 --- a/docs/InlineObject13.md +++ b/docs/InlineObject13.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**moderated** | Option<**String**> | | [optional][readonly] +**moderated** | Option<**String**> | | [optional] **_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) diff --git a/docs/InlineObject6.md b/docs/InlineObject6.md index ae73315..f32029f 100644 --- a/docs/InlineObject6.md +++ b/docs/InlineObject6.md @@ -6,14 +6,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **asset_url** | **String** | | **asset_version** | Option<**String**> | | [optional] -**author_id** | Option<**String**> | | [optional][readonly] +**author_id** | Option<**String**> | | [optional] **author_name** | Option<**String**> | | [optional] **capacity** | Option<**i32**> | | [optional][default to 16] **description** | Option<**String**> | | [optional] **id** | Option<**String**> | | [optional] **image_url** | **String** | | **name** | **String** | | -**platform** | Option<[**crate::models::Platform**](Platform.md)> | | [optional] +**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] **release_status** | Option<[**crate::models::ReleaseStatus**](ReleaseStatus.md)> | | [optional] **tags** | Option<**Vec**> | | [optional] **unity_package_url** | Option<**String**> | | [optional] diff --git a/docs/InlineObject7.md b/docs/InlineObject7.md index ebcdf2d..83fe554 100644 --- a/docs/InlineObject7.md +++ b/docs/InlineObject7.md @@ -6,14 +6,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **asset_url** | Option<**String**> | | [optional] **asset_version** | Option<**String**> | | [optional] -**author_id** | Option<**String**> | | [optional][readonly] +**author_id** | Option<**String**> | | [optional] **author_name** | Option<**String**> | | [optional] **capacity** | Option<**i32**> | | [optional][default to 16] **description** | Option<**String**> | | [optional] **id** | Option<**String**> | | [optional] **image_url** | Option<**String**> | | [optional] **name** | Option<**String**> | | [optional] -**platform** | Option<[**crate::models::Platform**](Platform.md)> | | [optional] +**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] **release_status** | Option<[**crate::models::ReleaseStatus**](ReleaseStatus.md)> | | [optional] **tags** | Option<**Vec**> | | [optional] **unity_package_url** | Option<**String**> | | [optional] diff --git a/docs/InlineResponse2003.md b/docs/InlineResponse2003.md index 4c0e4ad..fde5a35 100644 --- a/docs/InlineResponse2003.md +++ b/docs/InlineResponse2003.md @@ -4,9 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**is_friend** | **bool** | | [default to false] -**outgoing_request** | **bool** | | [default to false] -**incoming_request** | **bool** | | [default to false] +**upload_id** | **String** | | [readonly] +**file_name** | **String** | | [readonly] +**next_part_number** | **f32** | | [readonly] +**max_parts** | **f32** | | [readonly] +**parts** | [**Vec**](serde_json::Value.md) | | [readonly] +**etags** | [**Vec**](serde_json::Value.md) | Unknown | [readonly] [[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/InlineResponse2004.md b/docs/InlineResponse2004.md index 4e3171f..88caf52 100644 --- a/docs/InlineResponse2004.md +++ b/docs/InlineResponse2004.md @@ -4,12 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**upload_id** | **String** | | [readonly] -**file_name** | **String** | | [readonly] -**next_part_number** | **f32** | | [readonly] -**max_parts** | **f32** | | [readonly] -**parts** | [**Vec**](serde_json::Value.md) | | [readonly] -**etags** | [**Vec**](serde_json::Value.md) | Unknown | [readonly] +**url** | **String** | | [[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/InlineResponse2005.md b/docs/InlineResponse2005.md index bcd585a..10b922e 100644 --- a/docs/InlineResponse2005.md +++ b/docs/InlineResponse2005.md @@ -4,7 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**url** | **String** | | +**id** | **String** | | +**metadata** | [**serde_json::Value**](.md) | | [readonly] [[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/InlineResponse2006.md b/docs/InlineResponse2006.md index 9a9a592..5c3a6e7 100644 --- a/docs/InlineResponse2006.md +++ b/docs/InlineResponse2006.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **String** | | -**metadata** | [**serde_json::Value**](.md) | | [readonly] +**can_pubilsh** | **bool** | | [readonly][default to true] [[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/InlineResponse403.md b/docs/InlineResponse400.md similarity index 94% rename from docs/InlineResponse403.md rename to docs/InlineResponse400.md index 80e06d5..73506ab 100644 --- a/docs/InlineResponse403.md +++ b/docs/InlineResponse400.md @@ -1,4 +1,4 @@ -# InlineResponse403 +# InlineResponse400 ## Properties diff --git a/docs/Instance.md b/docs/Instance.md index bd8e12d..9f215e7 100644 --- a/docs/Instance.md +++ b/docs/Instance.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **n_users** | **f32** | | **name** | **String** | | **nonce** | Option<**String**> | | [optional] -**owner_id** | **String** | | [readonly] +**owner_id** | **String** | | **permanent** | **bool** | | [default to false] **photon_region** | **String** | | **platforms** | [**crate::models::InstancePlatforms**](Instance_platforms.md) | | diff --git a/docs/InviteApi.md b/docs/InviteApi.md new file mode 100644 index 0000000..18e4158 --- /dev/null +++ b/docs/InviteApi.md @@ -0,0 +1,228 @@ +# \InviteApi + +All URIs are relative to *https://api.vrchat.cloud/api/1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_invite_message**](InviteApi.md#get_invite_message) | **GET** /message/{userId}/message/{messageId} | Get Invite Messages +[**get_invite_messages**](InviteApi.md#get_invite_messages) | **GET** /message/{userId}/message | List Invite Messages +[**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}/message/{messageId} | Reset Invite Message +[**respond_invite**](InviteApi.md#respond_invite) | **POST** /invite/{notificationId}/response | Respond Invite +[**update_invite_message**](InviteApi.md#update_invite_message) | **PUT** /message/{userId}/message/{messageId} | Update Invite Message + + + +## get_invite_message + +> crate::models::InviteMessage get_invite_message(user_id, message_id) +Get Invite Messages + +Returns a single Invite Message. This returns the exact same information but less than `getInviteMessages`. Admin Credentials are required to view messages of other users! + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **String** | | [required] | +**message_id** | **i32** | | [required] | + +### Return type + +[**crate::models::InviteMessage**](InviteMessage.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_invite_messages + +> Vec get_invite_messages(user_id) +List Invite Messages + +Returns a list of all that users Invite Messages. Admin Credentials are required to view messages of other users! + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **String** | | [required] | + +### Return type + +[**Vec**](InviteMessage.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) + + +## invite_user + +> crate::models::Notification invite_user(user_id) +Invite User + +Sends an invite to a user. Returns the Notification of type `invite` that was sent. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **String** | | [required] | + +### Return type + +[**crate::models::Notification**](Notification.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) + + +## request_invite + +> crate::models::Notification request_invite(user_id) +Request Invite + +Requests an invite from a user. Returns the Notification of type `requestInvite` that was sent. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **String** | | [required] | + +### Return type + +[**crate::models::Notification**](Notification.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) + + +## reset_invite_message + +> Vec reset_invite_message(user_id, message_id) +Reset Invite Message + +Resets a single Invite Message back to it's original message, and then returns a list of all of them. Admin Credentials are required to update messages of other users! Resetting a message respects the rate-limit, but resetting it does not set the rate-limit to 60 like when editing it. It is possible to edit it right after resetting it. Trying to edit a message before the cooldown timer expires results in a 429 Too Fast Error. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **String** | | [required] | +**message_id** | **i32** | | [required] | + +### Return type + +[**Vec**](InviteMessage.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) + + +## respond_invite + +> crate::models::Notification respond_invite(notification_id) +Respond Invite + +Sends a world invite to a user. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**notification_id** | **String** | | [required] | + +### Return type + +[**crate::models::Notification**](Notification.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) + + +## update_invite_message + +> Vec update_invite_message(user_id, message_id) +Update Invite Message + +Updates a single Invite Message and then returns a list of all of them. Admin Credentials are required to update messages of other users! Updating a message automatically sets the cooldown timer to 60 minutes. Trying to edit a message before the cooldown timer expires results in a 429 Too Fast Error. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **String** | | [required] | +**message_id** | **i32** | | [required] | + +### Return type + +[**Vec**](InviteMessage.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) + diff --git a/docs/InviteMessage.md b/docs/InviteMessage.md new file mode 100644 index 0000000..8ed2525 --- /dev/null +++ b/docs/InviteMessage.md @@ -0,0 +1,17 @@ +# InviteMessage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**slot** | **i32** | | +**message** | **String** | | +**message_type** | [**crate::models::InviteMessageType**](InviteMessageType.md) | | +**updated_at** | **String** | | +**remaining_cooldown_minutes** | **i32** | Changes to 60 when updated, although probably server-side configurable. | [default to 0] +**can_be_updated** | **bool** | | [default to true] + +[[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/Platform.md b/docs/InviteMessageType.md similarity index 93% rename from docs/Platform.md rename to docs/InviteMessageType.md index 9fe07e5..d880fca 100644 --- a/docs/Platform.md +++ b/docs/InviteMessageType.md @@ -1,4 +1,4 @@ -# Platform +# InviteMessageType ## Properties diff --git a/docs/LimitedUnityPackage.md b/docs/LimitedUnityPackage.md index e524aa5..dc58b05 100644 --- a/docs/LimitedUnityPackage.md +++ b/docs/LimitedUnityPackage.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**platform** | [**crate::models::Platform**](Platform.md) | | +**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`. | **unity_version** | **String** | | [[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 f3534cb..da10401 100644 --- a/docs/LimitedUser.md +++ b/docs/LimitedUser.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **String** | | [readonly] +**id** | **String** | | **username** | **String** | | **display_name** | **String** | | **bio** | Option<**String**> | | [optional] @@ -15,10 +15,9 @@ Name | Type | Description | Notes **current_avatar_thumbnail_image_url** | **String** | | **fallback_avatar** | **String** | | **developer_type** | [**crate::models::DeveloperType**](DeveloperType.md) | | -**last_platform** | [**crate::models::Platform**](Platform.md) | | +**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`. | **status** | [**crate::models::UserStatus**](UserStatus.md) | | **is_friend** | **bool** | | -**location** | **String** | | **tags** | **Vec** | <- Always empty. | [[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/Notification.md b/docs/Notification.md index ef3f3df..a5ed04b 100644 --- a/docs/Notification.md +++ b/docs/Notification.md @@ -5,13 +5,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **String** | | -**sender_user_id** | **String** | | [readonly] +**sender_user_id** | **String** | | **sender_username** | **String** | | **_type** | [**crate::models::NotificationType**](NotificationType.md) | | **message** | **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 {}] **seen** | **bool** | | [default to false] -**created_at** | **String** | | [readonly] +**created_at** | **String** | | [[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/Permission.md b/docs/Permission.md index 2351e04..ead8c4f 100644 --- a/docs/Permission.md +++ b/docs/Permission.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **String** | | -**owner_id** | **String** | | [readonly] +**owner_id** | **String** | | **name** | **String** | | **data** | Option<[**serde_json::Value**](.md)> | | [optional] diff --git a/docs/PlayerModeration.md b/docs/PlayerModeration.md index 9984eab..dde1e5c 100644 --- a/docs/PlayerModeration.md +++ b/docs/PlayerModeration.md @@ -6,9 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **String** | | **_type** | [**crate::models::PlayerModerationType**](PlayerModerationType.md) | | -**source_user_id** | **String** | | [readonly] +**source_user_id** | **String** | | **source_display_name** | **String** | | -**target_user_id** | **String** | | [readonly] +**target_user_id** | **String** | | **target_display_name** | **String** | | **created** | **String** | | diff --git a/docs/PlayermoderationApi.md b/docs/PlayermoderationApi.md index 1eca618..cedfc21 100644 --- a/docs/PlayermoderationApi.md +++ b/docs/PlayermoderationApi.md @@ -42,7 +42,7 @@ This endpoint does not need any parameter. ## delete_player_moderation -> crate::models::Error delete_player_moderation(player_moderation_id) +> crate::models::Success delete_player_moderation(player_moderation_id) Delete Player Moderation Deletes a specific player moderation based on it's `pmod_` ID. The website uses `unmoderateUser` instead. You can delete the same player moderation multiple times successfully. @@ -56,7 +56,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::Error**](Error.md) +[**crate::models::Success**](Success.md) ### Authorization @@ -163,7 +163,7 @@ Name | Type | Description | Required | Notes ## unmoderate_user -> crate::models::Error unmoderate_user(inline_object13) +> crate::models::Success unmoderate_user(inline_object13) Unmoderate User Removes a player moderation previously added through `moderateUser`. E.g if you previuosly have shown their avatar, but now want to reset it to default. @@ -177,7 +177,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::Error**](Error.md) +[**crate::models::Success**](Success.md) ### Authorization diff --git a/docs/Response.md b/docs/Response.md index 25fb24a..df454be 100644 --- a/docs/Response.md +++ b/docs/Response.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**message** | **String** | | +**message** | Option<**String**> | | [optional] **status_code** | **f32** | | [[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/UnityPackage.md b/docs/UnityPackage.md index 8d08a62..7a83776 100644 --- a/docs/UnityPackage.md +++ b/docs/UnityPackage.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **unity_version** | **String** | | [default to 5.3.4p1] **unity_sort_number** | Option<**f32**> | | [optional] **asset_version** | **f32** | | -**platform** | [**crate::models::Platform**](Platform.md) | | +**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`. | **created_at** | 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/User.md b/docs/User.md index a31d123..9d7bf53 100644 --- a/docs/User.md +++ b/docs/User.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **String** | | [readonly] +**id** | **String** | | **username** | **String** | | **display_name** | **String** | | **user_icon** | **String** | | @@ -19,7 +19,7 @@ Name | Type | Description | Notes **tags** | **Vec** | | **developer_type** | [**crate::models::DeveloperType**](DeveloperType.md) | | **last_login** | **String** | | -**last_platform** | [**crate::models::Platform**](Platform.md) | | +**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`. | **allow_avatar_copying** | **bool** | | **status** | [**crate::models::UserStatus**](UserStatus.md) | | **date_joined** | [**String**](string.md) | | [readonly] diff --git a/docs/UsersApi.md b/docs/UsersApi.md index e1a1cfe..06b964e 100644 --- a/docs/UsersApi.md +++ b/docs/UsersApi.md @@ -6,7 +6,6 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**get_user**](UsersApi.md#get_user) | **GET** /users/{userId} | Get User by ID [**get_user_by_name**](UsersApi.md#get_user_by_name) | **GET** /users/{username}/name | Get User by Username -[**search_active_users**](UsersApi.md#search_active_users) | **GET** /users/active | Search Active Users [**search_users**](UsersApi.md#search_users) | **GET** /users | Search All Users [**update_user**](UsersApi.md#update_user) | **PUT** /users/{userId} | Update User Info @@ -72,39 +71,6 @@ 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) -## search_active_users - -> Vec search_active_users(search, developer_type, offset, n) -Search Active Users - -Search and list any Active users by text query. **Has been locked down and now always respond with \"Invalid Admin Credentials\".** - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**search** | **String** | Username to search for | [required] | -**developer_type** | Option<**String**> | Active user by developer type, none for normal users and internal for moderators | | -**offset** | Option<**i32**> | A zero-based offset from the default object sorting from where search results start. | | -**n** | Option<**i32**> | The number of objects to return. | |[default to 60] - -### Return type - -[**Vec**](LimitedUser.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) - - ## search_users > Vec search_users(search, developer_type, n, offset) diff --git a/docs/World.md b/docs/World.md index 9e9f7ca..13b1a33 100644 --- a/docs/World.md +++ b/docs/World.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **asset_url** | **String** | | **asset_url_object** | [**serde_json::Value**](.md) | | -**author_id** | **String** | | [readonly] +**author_id** | **String** | | **author_name** | **String** | | [readonly] **capacity** | **f32** | | [readonly] **created_at** | **String** | | [readonly] diff --git a/docs/WorldsApi.md b/docs/WorldsApi.md index 727ba0a..408ac85 100644 --- a/docs/WorldsApi.md +++ b/docs/WorldsApi.md @@ -268,7 +268,7 @@ Name | Type | Description | Required | Notes ## get_world_metadata -> crate::models::InlineResponse2006 get_world_metadata(world_id) +> crate::models::InlineResponse2005 get_world_metadata(world_id) Get World Metadata Return a worlds custom metadata. This is currently believed to be unused. Metadata can be set with `updateWorld` and can be any arbitrary object. @@ -282,7 +282,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::InlineResponse2006**](inline_response_200_6.md) +[**crate::models::InlineResponse2005**](inline_response_200_5.md) ### Authorization @@ -298,7 +298,7 @@ Name | Type | Description | Required | Notes ## get_world_publish_status -> crate::models::InlineResponse2007 get_world_publish_status(world_id) +> crate::models::InlineResponse2006 get_world_publish_status(world_id) Get World Publish Status Returns a worlds publish status. @@ -312,7 +312,7 @@ Name | Type | Description | Required | Notes ### Return type -[**crate::models::InlineResponse2007**](inline_response_200_7.md) +[**crate::models::InlineResponse2006**](inline_response_200_6.md) ### Authorization diff --git a/generate.sh b/generate.sh index bf359fa..524eb05 100755 --- a/generate.sh +++ b/generate.sh @@ -3,9 +3,9 @@ # Generate Client rm src/apis src/models docs -rf -openapi-generator-cli generate \ +java -jar ../foo-openapi-generator/modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \ -g rust \ ---additional-properties=packageName=vrchatapi,packageVersion=1.0.4,supportAsync=false \ +--additional-properties=packageName=vrchatapi,supportAsync=false \ --git-user-id=vrchatapi \ --git-repo-id=vrchatapi-rust \ -o . \ diff --git a/git_push.sh b/git_push.sh index 3170971..4f224bc 100644 --- a/git_push.sh +++ b/git_push.sh @@ -38,14 +38,14 @@ git add . git commit -m "$release_note" # Sets the new remote -git_remote=`git remote` +git_remote=$(git remote) if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi fi diff --git a/src/apis/authentication_api.rs b/src/apis/authentication_api.rs index b7b1b91..6c93deb 100644 --- a/src/apis/authentication_api.rs +++ b/src/apis/authentication_api.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/apis/avatars_api.rs b/src/apis/avatars_api.rs index 8d3f092..3446df5 100644 --- a/src/apis/avatars_api.rs +++ b/src/apis/avatars_api.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ @@ -45,6 +45,7 @@ pub enum GetAvatarError { #[serde(untagged)] pub enum GetFavoritedAvatarsError { Status401(crate::models::Error), + Status403(crate::models::Error), UnknownValue(serde_json::Value), } @@ -158,7 +159,7 @@ pub fn get_avatar(configuration: &configuration::Configuration, avatar_id: &str) } /// Search and list favorited avatars by query filters. -pub fn get_favorited_avatars(configuration: &configuration::Configuration, featured: Option<&str>, sort: Option<&str>, n: Option, order: Option<&str>, offset: Option, search: Option<&str>, tag: Option<&str>, notag: Option<&str>, release_status: Option<&str>, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>, user_id: Option<&str>) -> Result<(), Error> { +pub fn get_favorited_avatars(configuration: &configuration::Configuration, featured: Option<&str>, sort: Option<&str>, n: Option, order: Option<&str>, offset: Option, search: Option<&str>, tag: Option<&str>, notag: Option<&str>, release_status: Option<&str>, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>, user_id: Option<&str>) -> Result, Error> { let local_var_client = &configuration.client; @@ -215,7 +216,7 @@ pub fn get_favorited_avatars(configuration: &configuration::Configuration, featu let local_var_content = local_var_resp.text()?; if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) + 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 }; diff --git a/src/apis/configuration.rs b/src/apis/configuration.rs index 8dd14ae..0c2fb99 100644 --- a/src/apis/configuration.rs +++ b/src/apis/configuration.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/apis/favorites_api.rs b/src/apis/favorites_api.rs index 576b998..c48a982 100644 --- a/src/apis/favorites_api.rs +++ b/src/apis/favorites_api.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ @@ -108,7 +108,7 @@ pub fn add_favorite(configuration: &configuration::Configuration, inline_object8 } /// Clear ALL contents of a specific favorite group. -pub fn clear_favorite_group(configuration: &configuration::Configuration, favorite_group_type: &str, favorite_group_name: &str, user_id: &str) -> Result> { +pub fn clear_favorite_group(configuration: &configuration::Configuration, favorite_group_type: &str, favorite_group_name: &str, user_id: &str) -> Result> { let local_var_client = &configuration.client; @@ -264,7 +264,7 @@ pub fn get_favorites(configuration: &configuration::Configuration, n: Option Result> { +pub fn remove_favorite(configuration: &configuration::Configuration, favorite_id: &str) -> Result> { let local_var_client = &configuration.client; diff --git a/src/apis/files_api.rs b/src/apis/files_api.rs index 93632fb..47f51f7 100644 --- a/src/apis/files_api.rs +++ b/src/apis/files_api.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ @@ -283,7 +283,7 @@ pub fn get_file(configuration: &configuration::Configuration, file_id: &str) -> } /// Retrieves the upload status for file upload. Can currently only be accessed when `status` is `waiting`. Trying to access it on a file version already uploaded currently times out. -pub fn get_file_data_upload_status(configuration: &configuration::Configuration, file_id: &str, version_id: i32, file_type: &str) -> Result> { +pub fn get_file_data_upload_status(configuration: &configuration::Configuration, file_id: &str, version_id: i32, file_type: &str) -> Result> { let local_var_client = &configuration.client; @@ -349,7 +349,7 @@ pub fn get_files(configuration: &configuration::Configuration, tag: Option<&str> } /// Starts an upload of a specific FilePart. This endpoint will return an AWS URL which you can PUT data to. You need to call this and receive a new AWS API URL for each `partNumber`. Please see AWS's REST documentation on \"PUT Object to S3\" on how to upload. Once all parts has been uploaded, proceed to `/finish` endpoint. **Note:** `nextPartNumber` seems like it is always ignored. Despite it returning 0, first partNumber is always 1. -pub fn start_file_data_upload(configuration: &configuration::Configuration, file_id: &str, version_id: i32, file_type: &str, part_number: i32) -> Result> { +pub fn start_file_data_upload(configuration: &configuration::Configuration, file_id: &str, version_id: i32, file_type: &str, part_number: i32) -> Result> { let local_var_client = &configuration.client; diff --git a/src/apis/friends_api.rs b/src/apis/friends_api.rs index e061b0e..e884110 100644 --- a/src/apis/friends_api.rs +++ b/src/apis/friends_api.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ @@ -113,7 +113,7 @@ pub fn friend(configuration: &configuration::Configuration, user_id: &str) -> Re } /// Retrieve if the user is currently a friend with a given user, if they have an outgoing friend request, and if they have an incoming friend request. The proper way to receive and accept friend request is by checking if the user has an incoming `Notification` of type `friendRequest`, and then accepting that notification. -pub fn get_friend_status(configuration: &configuration::Configuration, user_id: &str) -> Result> { +pub fn get_friend_status(configuration: &configuration::Configuration, user_id: &str) -> Result> { let local_var_client = &configuration.client; diff --git a/src/apis/invite_api.rs b/src/apis/invite_api.rs new file mode 100644 index 0000000..dc0726b --- /dev/null +++ b/src/apis/invite_api.rs @@ -0,0 +1,268 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.3.0 + * Contact: me@ruby.js.org + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; + +use crate::apis::ResponseContent; +use super::{Error, configuration}; + + +/// struct for typed errors of method `get_invite_message` +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetInviteMessageError { + Status400(crate::models::InlineResponse400), + Status401(crate::models::InlineResponse400), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method `get_invite_messages` +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetInviteMessagesError { + Status400(crate::models::InlineResponse400), + Status401(crate::models::InlineResponse400), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method `invite_user` +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum InviteUserError { + Status403(crate::models::InlineResponse400), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method `request_invite` +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RequestInviteError { + Status403(crate::models::InlineResponse400), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method `reset_invite_message` +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ResetInviteMessageError { + Status400(crate::models::InlineResponse400), + Status401(crate::models::InlineResponse400), + Status429(crate::models::InlineResponse400), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method `respond_invite` +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RespondInviteError { + Status400(crate::models::InlineResponse400), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method `update_invite_message` +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateInviteMessageError { + Status400(crate::models::InlineResponse400), + Status401(crate::models::InlineResponse400), + Status429(crate::models::InlineResponse400), + UnknownValue(serde_json::Value), +} + + +/// Returns a single Invite Message. This returns the exact same information but less than `getInviteMessages`. Admin Credentials are required to view messages of other users! +pub fn get_invite_message(configuration: &configuration::Configuration, user_id: &str, message_id: i32) -> Result> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/message/{userId}/message/{messageId}", configuration.base_path, userId=crate::apis::urlencode(user_id), messageId=message_id); + 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) = 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 a list of all that users Invite Messages. Admin Credentials are required to view messages of other users! +pub fn get_invite_messages(configuration: &configuration::Configuration, user_id: &str) -> Result, Error> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/message/{userId}/message", configuration.base_path, userId=crate::apis::urlencode(user_id)); + 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) = 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)) + } +} + +/// 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) -> Result> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/invite/{userId}", configuration.base_path, userId=crate::apis::urlencode(user_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) = 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)) + } +} + +/// Requests an invite from a user. Returns the Notification of type `requestInvite` that was sent. +pub fn request_invite(configuration: &configuration::Configuration, user_id: &str) -> Result> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/requestInvite/{userId}", configuration.base_path, userId=crate::apis::urlencode(user_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) = 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)) + } +} + +/// Resets a single Invite Message back to it's original message, and then returns a list of all of them. Admin Credentials are required to update messages of other users! Resetting a message respects the rate-limit, but resetting it does not set the rate-limit to 60 like when editing it. It is possible to edit it right after resetting it. Trying to edit a message before the cooldown timer expires results in a 429 Too Fast Error. +pub fn reset_invite_message(configuration: &configuration::Configuration, user_id: &str, message_id: i32) -> Result, Error> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/message/{userId}/message/{messageId}", configuration.base_path, userId=crate::apis::urlencode(user_id), messageId=message_id); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = 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)) + } +} + +/// Sends a world invite to a user. +pub fn respond_invite(configuration: &configuration::Configuration, notification_id: &str) -> Result> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/invite/{notificationId}/response", configuration.base_path, notificationId=crate::apis::urlencode(notification_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) = 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)) + } +} + +/// Updates a single Invite Message and then returns a list of all of them. Admin Credentials are required to update messages of other users! Updating a message automatically sets the cooldown timer to 60 minutes. Trying to edit a message before the cooldown timer expires results in a 429 Too Fast Error. +pub fn update_invite_message(configuration: &configuration::Configuration, user_id: &str, message_id: i32) -> Result, Error> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/message/{userId}/message/{messageId}", configuration.base_path, userId=crate::apis::urlencode(user_id), messageId=message_id); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = 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)) + } +} + diff --git a/src/apis/mod.rs b/src/apis/mod.rs index 7a16572..998a8d9 100644 --- a/src/apis/mod.rs +++ b/src/apis/mod.rs @@ -66,6 +66,7 @@ pub mod avatars_api; pub mod favorites_api; pub mod files_api; pub mod friends_api; +pub mod invite_api; pub mod notifications_api; pub mod permissions_api; pub mod playermoderation_api; diff --git a/src/apis/notifications_api.rs b/src/apis/notifications_api.rs index feb70a2..635d906 100644 --- a/src/apis/notifications_api.rs +++ b/src/apis/notifications_api.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/apis/permissions_api.rs b/src/apis/permissions_api.rs index 45ad2af..ea10b05 100644 --- a/src/apis/permissions_api.rs +++ b/src/apis/permissions_api.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/apis/playermoderation_api.rs b/src/apis/playermoderation_api.rs index 7cacda9..18d46b8 100644 --- a/src/apis/playermoderation_api.rs +++ b/src/apis/playermoderation_api.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ @@ -93,7 +93,7 @@ pub fn clear_all_player_moderations(configuration: &configuration::Configuration } /// Deletes a specific player moderation based on it's `pmod_` ID. The website uses `unmoderateUser` instead. You can delete the same player moderation multiple times successfully. -pub fn delete_player_moderation(configuration: &configuration::Configuration, player_moderation_id: &str) -> Result> { +pub fn delete_player_moderation(configuration: &configuration::Configuration, player_moderation_id: &str) -> Result> { let local_var_client = &configuration.client; @@ -208,7 +208,7 @@ pub fn moderate_user(configuration: &configuration::Configuration, inline_object } /// Removes a player moderation previously added through `moderateUser`. E.g if you previuosly have shown their avatar, but now want to reset it to default. -pub fn unmoderate_user(configuration: &configuration::Configuration, inline_object13: Option) -> Result> { +pub fn unmoderate_user(configuration: &configuration::Configuration, inline_object13: Option) -> Result> { let local_var_client = &configuration.client; diff --git a/src/apis/system_api.rs b/src/apis/system_api.rs index 36ef084..8c6be23 100644 --- a/src/apis/system_api.rs +++ b/src/apis/system_api.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/apis/users_api.rs b/src/apis/users_api.rs index 0fd93bc..23a0b5b 100644 --- a/src/apis/users_api.rs +++ b/src/apis/users_api.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ @@ -30,14 +30,6 @@ pub enum GetUserByNameError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method `search_active_users` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum SearchActiveUsersError { - Status403(crate::models::InlineResponse403), - UnknownValue(serde_json::Value), -} - /// struct for typed errors of method `search_users` #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -109,43 +101,6 @@ pub fn get_user_by_name(configuration: &configuration::Configuration, username: } } -/// Search and list any Active users by text query. **Has been locked down and now always respond with \"Invalid Admin Credentials\".** -pub fn search_active_users(configuration: &configuration::Configuration, search: &str, developer_type: Option<&str>, offset: Option, n: Option) -> Result, Error> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/users/active", configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("search", &search.to_string())]); - if let Some(ref local_var_str) = developer_type { - local_var_req_builder = local_var_req_builder.query(&[("developerType", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = offset { - local_var_req_builder = local_var_req_builder.query(&[("offset", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = n { - local_var_req_builder = local_var_req_builder.query(&[("n", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = 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)) - } -} - /// Search and list any users by text query pub fn search_users(configuration: &configuration::Configuration, search: Option<&str>, developer_type: Option<&str>, n: Option, offset: Option) -> Result, Error> { diff --git a/src/apis/worlds_api.rs b/src/apis/worlds_api.rs index 3bd4efc..d12a6b8 100644 --- a/src/apis/worlds_api.rs +++ b/src/apis/worlds_api.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ @@ -432,7 +432,7 @@ pub fn get_world_instance(configuration: &configuration::Configuration, world_id } /// Return a worlds custom metadata. This is currently believed to be unused. Metadata can be set with `updateWorld` and can be any arbitrary object. -pub fn get_world_metadata(configuration: &configuration::Configuration, world_id: &str) -> Result> { +pub fn get_world_metadata(configuration: &configuration::Configuration, world_id: &str) -> Result> { let local_var_client = &configuration.client; @@ -459,7 +459,7 @@ pub fn get_world_metadata(configuration: &configuration::Configuration, world_id } /// Returns a worlds publish status. -pub fn get_world_publish_status(configuration: &configuration::Configuration, world_id: &str) -> Result> { +pub fn get_world_publish_status(configuration: &configuration::Configuration, world_id: &str) -> Result> { let local_var_client = &configuration.client; diff --git a/src/models/avatar.rs b/src/models/avatar.rs index 61d223d..bd262ba 100644 --- a/src/models/avatar.rs +++ b/src/models/avatar.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/avatar_unity_package_url_object.rs b/src/models/avatar_unity_package_url_object.rs index 97b23de..e88218d 100644 --- a/src/models/avatar_unity_package_url_object.rs +++ b/src/models/avatar_unity_package_url_object.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/config.rs b/src/models/config.rs index 4614b2c..f5fc081 100644 --- a/src/models/config.rs +++ b/src/models/config.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/config_announcements.rs b/src/models/config_announcements.rs index 7e11290..a0f132d 100644 --- a/src/models/config_announcements.rs +++ b/src/models/config_announcements.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/config_download_urls.rs b/src/models/config_download_urls.rs index 94d17a8..2cc89c9 100644 --- a/src/models/config_download_urls.rs +++ b/src/models/config_download_urls.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/config_dynamic_world_rows.rs b/src/models/config_dynamic_world_rows.rs index 76fe622..afe6f17 100644 --- a/src/models/config_dynamic_world_rows.rs +++ b/src/models/config_dynamic_world_rows.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/config_events.rs b/src/models/config_events.rs index 35d702d..f94cee7 100644 --- a/src/models/config_events.rs +++ b/src/models/config_events.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/current_user.rs b/src/models/current_user.rs index 6bff16c..cc804b2 100644 --- a/src/models/current_user.rs +++ b/src/models/current_user.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ @@ -87,8 +87,9 @@ pub struct CurrentUser { pub developer_type: crate::models::DeveloperType, #[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: crate::models::Platform, + pub last_platform: String, #[serde(rename = "allowAvatarCopying")] pub allow_avatar_copying: bool, #[serde(rename = "status")] @@ -108,7 +109,7 @@ pub struct CurrentUser { } impl CurrentUser { - pub fn new(id: String, username: String, display_name: String, user_icon: String, bio: String, bio_links: Vec, profile_pic_override: String, status_description: String, past_display_names: Vec, has_email: bool, has_pending_email: bool, obfuscated_email: String, obfuscated_pending_email: String, email_verified: bool, has_birthday: bool, unsubscribe: bool, status_history: Vec, status_first_time: bool, friends: Vec, friend_group_names: Vec, current_avatar_image_url: String, current_avatar_thumbnail_image_url: String, fallback_avatar: String, current_avatar: String, current_avatar_asset_url: String, accepted_tos_version: f32, steam_id: String, steam_details: serde_json::Value, oculus_id: String, has_logged_in_from_client: bool, home_location: String, two_factor_auth_enabled: bool, state: crate::models::UserState, tags: Vec, developer_type: crate::models::DeveloperType, last_login: String, last_platform: crate::models::Platform, allow_avatar_copying: bool, status: crate::models::UserStatus, date_joined: String, is_friend: bool, friend_key: String) -> CurrentUser { + pub fn new(id: String, username: String, display_name: String, user_icon: String, bio: String, bio_links: Vec, profile_pic_override: String, status_description: String, past_display_names: Vec, has_email: bool, has_pending_email: bool, obfuscated_email: String, obfuscated_pending_email: String, email_verified: bool, has_birthday: bool, unsubscribe: bool, status_history: Vec, status_first_time: bool, friends: Vec, friend_group_names: Vec, current_avatar_image_url: String, current_avatar_thumbnail_image_url: String, fallback_avatar: String, current_avatar: String, current_avatar_asset_url: String, accepted_tos_version: f32, steam_id: String, steam_details: serde_json::Value, oculus_id: String, has_logged_in_from_client: bool, home_location: String, two_factor_auth_enabled: bool, state: crate::models::UserState, tags: Vec, developer_type: crate::models::DeveloperType, last_login: String, last_platform: String, allow_avatar_copying: bool, status: crate::models::UserStatus, date_joined: String, is_friend: bool, friend_key: String) -> CurrentUser { CurrentUser { id, username, diff --git a/src/models/deployment_group.rs b/src/models/deployment_group.rs index eadaffc..36ef6bd 100644 --- a/src/models/deployment_group.rs +++ b/src/models/deployment_group.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/developer_type.rs b/src/models/developer_type.rs index 4b44011..22c1b47 100644 --- a/src/models/developer_type.rs +++ b/src/models/developer_type.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/error.rs b/src/models/error.rs index d3abbec..083bfe6 100644 --- a/src/models/error.rs +++ b/src/models/error.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/favorite.rs b/src/models/favorite.rs index 27dcfcc..24d9de4 100644 --- a/src/models/favorite.rs +++ b/src/models/favorite.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/favorite_group.rs b/src/models/favorite_group.rs index eae8dae..72d3fdf 100644 --- a/src/models/favorite_group.rs +++ b/src/models/favorite_group.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/favorite_group_visibility.rs b/src/models/favorite_group_visibility.rs index f5d3477..a52459a 100644 --- a/src/models/favorite_group_visibility.rs +++ b/src/models/favorite_group_visibility.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/favorite_type.rs b/src/models/favorite_type.rs index 6cb953d..c103461 100644 --- a/src/models/favorite_type.rs +++ b/src/models/favorite_type.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/file.rs b/src/models/file.rs index e402981..7ebefe6 100644 --- a/src/models/file.rs +++ b/src/models/file.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/file_data.rs b/src/models/file_data.rs index 5dbf722..9494276 100644 --- a/src/models/file_data.rs +++ b/src/models/file_data.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/file_status.rs b/src/models/file_status.rs index 3c52fb3..e2e9275 100644 --- a/src/models/file_status.rs +++ b/src/models/file_status.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/file_version.rs b/src/models/file_version.rs index 59c029e..c2c3109 100644 --- a/src/models/file_version.rs +++ b/src/models/file_version.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/friend_status.rs b/src/models/friend_status.rs new file mode 100644 index 0000000..47d29bb --- /dev/null +++ b/src/models/friend_status.rs @@ -0,0 +1,33 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.3.0 + * Contact: me@ruby.js.org + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct FriendStatus { + #[serde(rename = "isFriend")] + pub is_friend: bool, + #[serde(rename = "outgoingRequest")] + pub outgoing_request: bool, + #[serde(rename = "incomingRequest")] + pub incoming_request: bool, +} + +impl FriendStatus { + pub fn new(is_friend: bool, outgoing_request: bool, incoming_request: bool) -> FriendStatus { + FriendStatus { + is_friend, + outgoing_request, + incoming_request, + } + } +} + + diff --git a/src/models/inline_object.rs b/src/models/inline_object.rs index 3016ee0..6ed5254 100644 --- a/src/models/inline_object.rs +++ b/src/models/inline_object.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/inline_object_1.rs b/src/models/inline_object_1.rs index 53fc0d1..bc21f97 100644 --- a/src/models/inline_object_1.rs +++ b/src/models/inline_object_1.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/inline_object_10.rs b/src/models/inline_object_10.rs index 88290a4..023df5f 100644 --- a/src/models/inline_object_10.rs +++ b/src/models/inline_object_10.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/inline_object_11.rs b/src/models/inline_object_11.rs index 5e70e83..fe20ef3 100644 --- a/src/models/inline_object_11.rs +++ b/src/models/inline_object_11.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/inline_object_12.rs b/src/models/inline_object_12.rs index 9d55cfd..24cea44 100644 --- a/src/models/inline_object_12.rs +++ b/src/models/inline_object_12.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/inline_object_13.rs b/src/models/inline_object_13.rs index 06341a2..7c2c21f 100644 --- a/src/models/inline_object_13.rs +++ b/src/models/inline_object_13.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/inline_object_2.rs b/src/models/inline_object_2.rs index 212e681..0bd3b11 100644 --- a/src/models/inline_object_2.rs +++ b/src/models/inline_object_2.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/inline_object_3.rs b/src/models/inline_object_3.rs index b2fc7a2..d747343 100644 --- a/src/models/inline_object_3.rs +++ b/src/models/inline_object_3.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/inline_object_4.rs b/src/models/inline_object_4.rs index 49d201d..78629d6 100644 --- a/src/models/inline_object_4.rs +++ b/src/models/inline_object_4.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/inline_object_5.rs b/src/models/inline_object_5.rs index 1416af0..8ddce08 100644 --- a/src/models/inline_object_5.rs +++ b/src/models/inline_object_5.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/inline_object_6.rs b/src/models/inline_object_6.rs index d2ac757..98f7598 100644 --- a/src/models/inline_object_6.rs +++ b/src/models/inline_object_6.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ @@ -30,8 +30,9 @@ pub struct InlineObject6 { pub image_url: String, #[serde(rename = "name")] pub name: 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 = "platform", skip_serializing_if = "Option::is_none")] - pub platform: Option, + pub platform: Option, #[serde(rename = "releaseStatus", skip_serializing_if = "Option::is_none")] pub release_status: Option, #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] diff --git a/src/models/inline_object_7.rs b/src/models/inline_object_7.rs index ff00ebf..12eb103 100644 --- a/src/models/inline_object_7.rs +++ b/src/models/inline_object_7.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ @@ -30,8 +30,9 @@ pub struct InlineObject7 { pub image_url: Option, #[serde(rename = "name", skip_serializing_if = "Option::is_none")] pub name: Option, + /// 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 = "platform", skip_serializing_if = "Option::is_none")] - pub platform: Option, + pub platform: Option, #[serde(rename = "releaseStatus", skip_serializing_if = "Option::is_none")] pub release_status: Option, #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] diff --git a/src/models/inline_object_8.rs b/src/models/inline_object_8.rs index 3ad2133..a225ab1 100644 --- a/src/models/inline_object_8.rs +++ b/src/models/inline_object_8.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/inline_object_9.rs b/src/models/inline_object_9.rs index 13f1298..8b3096e 100644 --- a/src/models/inline_object_9.rs +++ b/src/models/inline_object_9.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/inline_response_200.rs b/src/models/inline_response_200.rs index 7865797..f01a90e 100644 --- a/src/models/inline_response_200.rs +++ b/src/models/inline_response_200.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/inline_response_200_1.rs b/src/models/inline_response_200_1.rs index 36491d3..e2002ee 100644 --- a/src/models/inline_response_200_1.rs +++ b/src/models/inline_response_200_1.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/inline_response_200_2.rs b/src/models/inline_response_200_2.rs index 80d0f6b..28164fd 100644 --- a/src/models/inline_response_200_2.rs +++ b/src/models/inline_response_200_2.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/inline_response_200_3.rs b/src/models/inline_response_200_3.rs index 688ec37..eea3205 100644 --- a/src/models/inline_response_200_3.rs +++ b/src/models/inline_response_200_3.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ @@ -12,20 +12,30 @@ #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct InlineResponse2003 { - #[serde(rename = "isFriend")] - pub is_friend: bool, - #[serde(rename = "outgoingRequest")] - pub outgoing_request: bool, - #[serde(rename = "incomingRequest")] - pub incoming_request: bool, + #[serde(rename = "uploadId")] + pub upload_id: String, + #[serde(rename = "fileName")] + pub file_name: String, + #[serde(rename = "nextPartNumber")] + pub next_part_number: f32, + #[serde(rename = "maxParts")] + pub max_parts: f32, + #[serde(rename = "parts")] + pub parts: Vec, + /// Unknown + #[serde(rename = "etags")] + pub etags: Vec, } impl InlineResponse2003 { - pub fn new(is_friend: bool, outgoing_request: bool, incoming_request: bool) -> InlineResponse2003 { + pub fn new(upload_id: String, file_name: String, next_part_number: f32, max_parts: f32, parts: Vec, etags: Vec) -> InlineResponse2003 { InlineResponse2003 { - is_friend, - outgoing_request, - incoming_request, + upload_id, + file_name, + next_part_number, + max_parts, + parts, + etags, } } } diff --git a/src/models/inline_response_200_4.rs b/src/models/inline_response_200_4.rs index 7c93d5b..a36cd56 100644 --- a/src/models/inline_response_200_4.rs +++ b/src/models/inline_response_200_4.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ @@ -12,30 +12,14 @@ #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct InlineResponse2004 { - #[serde(rename = "uploadId")] - pub upload_id: String, - #[serde(rename = "fileName")] - pub file_name: String, - #[serde(rename = "nextPartNumber")] - pub next_part_number: f32, - #[serde(rename = "maxParts")] - pub max_parts: f32, - #[serde(rename = "parts")] - pub parts: Vec, - /// Unknown - #[serde(rename = "etags")] - pub etags: Vec, + #[serde(rename = "url")] + pub url: String, } impl InlineResponse2004 { - pub fn new(upload_id: String, file_name: String, next_part_number: f32, max_parts: f32, parts: Vec, etags: Vec) -> InlineResponse2004 { + pub fn new(url: String) -> InlineResponse2004 { InlineResponse2004 { - upload_id, - file_name, - next_part_number, - max_parts, - parts, - etags, + url, } } } diff --git a/src/models/inline_response_200_5.rs b/src/models/inline_response_200_5.rs index bbff246..ddb5ff4 100644 --- a/src/models/inline_response_200_5.rs +++ b/src/models/inline_response_200_5.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ @@ -12,14 +12,17 @@ #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct InlineResponse2005 { - #[serde(rename = "url")] - pub url: String, + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "metadata")] + pub metadata: serde_json::Value, } impl InlineResponse2005 { - pub fn new(url: String) -> InlineResponse2005 { + pub fn new(id: String, metadata: serde_json::Value) -> InlineResponse2005 { InlineResponse2005 { - url, + id, + metadata, } } } diff --git a/src/models/inline_response_200_6.rs b/src/models/inline_response_200_6.rs index f66ad3f..abb8ae8 100644 --- a/src/models/inline_response_200_6.rs +++ b/src/models/inline_response_200_6.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ @@ -12,17 +12,14 @@ #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct InlineResponse2006 { - #[serde(rename = "id")] - pub id: String, - #[serde(rename = "metadata")] - pub metadata: serde_json::Value, + #[serde(rename = "canPubilsh")] + pub can_pubilsh: bool, } impl InlineResponse2006 { - pub fn new(id: String, metadata: serde_json::Value) -> InlineResponse2006 { + pub fn new(can_pubilsh: bool) -> InlineResponse2006 { InlineResponse2006 { - id, - metadata, + can_pubilsh, } } } diff --git a/src/models/inline_response_200_7.rs b/src/models/inline_response_200_7.rs deleted file mode 100644 index d594f33..0000000 --- a/src/models/inline_response_200_7.rs +++ /dev/null @@ -1,27 +0,0 @@ -/* - * VRChat API Documentation - * - * - * The version of the OpenAPI document: 1.1.2 - * Contact: me@ruby.js.org - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct InlineResponse2007 { - #[serde(rename = "canPubilsh")] - pub can_pubilsh: bool, -} - -impl InlineResponse2007 { - pub fn new(can_pubilsh: bool) -> InlineResponse2007 { - InlineResponse2007 { - can_pubilsh, - } - } -} - - diff --git a/src/models/inline_response_403.rs b/src/models/inline_response_400.rs similarity index 61% rename from src/models/inline_response_403.rs rename to src/models/inline_response_400.rs index 9b89bf3..7c47f4e 100644 --- a/src/models/inline_response_403.rs +++ b/src/models/inline_response_400.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ @@ -11,14 +11,14 @@ #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct InlineResponse403 { +pub struct InlineResponse400 { #[serde(rename = "error")] pub error: Box, } -impl InlineResponse403 { - pub fn new(error: crate::models::Error) -> InlineResponse403 { - InlineResponse403 { +impl InlineResponse400 { + pub fn new(error: crate::models::Error) -> InlineResponse400 { + InlineResponse400 { error: Box::new(error), } } diff --git a/src/models/instance.rs b/src/models/instance.rs index 0b80f20..efcb1c8 100644 --- a/src/models/instance.rs +++ b/src/models/instance.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/instance_platforms.rs b/src/models/instance_platforms.rs index b916e1f..011b272 100644 --- a/src/models/instance_platforms.rs +++ b/src/models/instance_platforms.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/invite_message.rs b/src/models/invite_message.rs new file mode 100644 index 0000000..6c380c5 --- /dev/null +++ b/src/models/invite_message.rs @@ -0,0 +1,46 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.3.0 + * Contact: me@ruby.js.org + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct InviteMessage { + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "slot")] + pub slot: i32, + #[serde(rename = "message")] + pub message: String, + #[serde(rename = "messageType")] + pub message_type: crate::models::InviteMessageType, + #[serde(rename = "updatedAt")] + pub updated_at: String, + /// Changes to 60 when updated, although probably server-side configurable. + #[serde(rename = "remainingCooldownMinutes")] + pub remaining_cooldown_minutes: i32, + #[serde(rename = "canBeUpdated")] + pub can_be_updated: bool, +} + +impl InviteMessage { + pub fn new(id: String, slot: i32, message: String, message_type: crate::models::InviteMessageType, updated_at: String, remaining_cooldown_minutes: i32, can_be_updated: bool) -> InviteMessage { + InviteMessage { + id, + slot, + message, + message_type, + updated_at, + remaining_cooldown_minutes, + can_be_updated, + } + } +} + + diff --git a/src/models/invite_message_type.rs b/src/models/invite_message_type.rs new file mode 100644 index 0000000..48aa8f7 --- /dev/null +++ b/src/models/invite_message_type.rs @@ -0,0 +1,29 @@ +/* + * VRChat API Documentation + * + * + * The version of the OpenAPI document: 1.3.0 + * Contact: me@ruby.js.org + * Generated by: https://openapi-generator.tech + */ + + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum InviteMessageType { + #[serde(rename = "message")] + Message, + +} + +impl ToString for InviteMessageType { + fn to_string(&self) -> String { + match self { + Self::Message => String::from("message"), + } + } +} + + + + diff --git a/src/models/limited_unity_package.rs b/src/models/limited_unity_package.rs index e959c72..5cee1f9 100644 --- a/src/models/limited_unity_package.rs +++ b/src/models/limited_unity_package.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ @@ -12,14 +12,15 @@ #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LimitedUnityPackage { + /// 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 = "platform")] - pub platform: crate::models::Platform, + pub platform: String, #[serde(rename = "unityVersion")] pub unity_version: String, } impl LimitedUnityPackage { - pub fn new(platform: crate::models::Platform, unity_version: String) -> LimitedUnityPackage { + pub fn new(platform: String, unity_version: String) -> LimitedUnityPackage { LimitedUnityPackage { platform, unity_version, diff --git a/src/models/limited_user.rs b/src/models/limited_user.rs index 8670b79..1aa1ea3 100644 --- a/src/models/limited_user.rs +++ b/src/models/limited_user.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ @@ -34,21 +34,20 @@ pub struct LimitedUser { pub fallback_avatar: String, #[serde(rename = "developerType")] pub developer_type: crate::models::DeveloperType, + /// 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: crate::models::Platform, + pub last_platform: String, #[serde(rename = "status")] pub status: crate::models::UserStatus, #[serde(rename = "isFriend")] pub is_friend: bool, - #[serde(rename = "location")] - pub location: String, /// <- Always empty. #[serde(rename = "tags")] pub tags: Vec, } impl LimitedUser { - pub fn new(id: String, username: String, display_name: String, user_icon: String, profile_pic_override: String, status_description: String, current_avatar_image_url: String, current_avatar_thumbnail_image_url: String, fallback_avatar: String, developer_type: crate::models::DeveloperType, last_platform: crate::models::Platform, status: crate::models::UserStatus, is_friend: bool, location: String, tags: Vec) -> LimitedUser { + pub fn new(id: String, username: String, display_name: String, user_icon: String, profile_pic_override: String, status_description: String, current_avatar_image_url: String, current_avatar_thumbnail_image_url: String, fallback_avatar: String, developer_type: crate::models::DeveloperType, last_platform: String, status: crate::models::UserStatus, is_friend: bool, tags: Vec) -> LimitedUser { LimitedUser { id, username, @@ -64,7 +63,6 @@ impl LimitedUser { last_platform, status, is_friend, - location, tags, } } diff --git a/src/models/limited_world.rs b/src/models/limited_world.rs index 3a52637..19b1037 100644 --- a/src/models/limited_world.rs +++ b/src/models/limited_world.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/mime_type.rs b/src/models/mime_type.rs index 39bffce..14701d7 100644 --- a/src/models/mime_type.rs +++ b/src/models/mime_type.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/mod.rs b/src/models/mod.rs index 45de51f..f1209ce 100644 --- a/src/models/mod.rs +++ b/src/models/mod.rs @@ -36,6 +36,8 @@ pub mod file_status; pub use self::file_status::FileStatus; pub mod file_version; pub use self::file_version::FileVersion; +pub mod friend_status; +pub use self::friend_status::FriendStatus; pub mod inline_object; pub use self::inline_object::InlineObject; pub mod inline_object_1; @@ -78,14 +80,16 @@ pub mod inline_response_200_5; pub use self::inline_response_200_5::InlineResponse2005; pub mod inline_response_200_6; pub use self::inline_response_200_6::InlineResponse2006; -pub mod inline_response_200_7; -pub use self::inline_response_200_7::InlineResponse2007; -pub mod inline_response_403; -pub use self::inline_response_403::InlineResponse403; +pub mod inline_response_400; +pub use self::inline_response_400::InlineResponse400; pub mod instance; pub use self::instance::Instance; pub mod instance_platforms; pub use self::instance_platforms::InstancePlatforms; +pub mod invite_message; +pub use self::invite_message::InviteMessage; +pub mod invite_message_type; +pub use self::invite_message_type::InviteMessageType; pub mod limited_unity_package; pub use self::limited_unity_package::LimitedUnityPackage; pub mod limited_user; @@ -102,8 +106,6 @@ pub mod past_display_name; pub use self::past_display_name::PastDisplayName; pub mod permission; pub use self::permission::Permission; -pub mod platform; -pub use self::platform::Platform; pub mod player_moderation; pub use self::player_moderation::PlayerModeration; pub mod player_moderation_type; diff --git a/src/models/notification.rs b/src/models/notification.rs index 6a9b84d..ec9837b 100644 --- a/src/models/notification.rs +++ b/src/models/notification.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/notification_type.rs b/src/models/notification_type.rs index f57e120..add9433 100644 --- a/src/models/notification_type.rs +++ b/src/models/notification_type.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ @@ -11,18 +11,16 @@ /// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum NotificationType { - #[serde(rename = "all")] - All, - #[serde(rename = "broadcast")] - Broadcast, #[serde(rename = "friendRequest")] FriendRequest, #[serde(rename = "invite")] Invite, - #[serde(rename = "message")] - Message, - #[serde(rename = "RequestInvite")] + #[serde(rename = "inviteResponse")] + InviteResponse, + #[serde(rename = "requestInvite")] RequestInvite, + #[serde(rename = "requestInviteResponse")] + RequestInviteResponse, #[serde(rename = "votetokick")] Votetokick, @@ -31,12 +29,11 @@ pub enum NotificationType { impl ToString for NotificationType { fn to_string(&self) -> String { match self { - Self::All => String::from("all"), - Self::Broadcast => String::from("broadcast"), Self::FriendRequest => String::from("friendRequest"), Self::Invite => String::from("invite"), - Self::Message => String::from("message"), - Self::RequestInvite => String::from("RequestInvite"), + Self::InviteResponse => String::from("inviteResponse"), + Self::RequestInvite => String::from("requestInvite"), + Self::RequestInviteResponse => String::from("requestInviteResponse"), Self::Votetokick => String::from("votetokick"), } } diff --git a/src/models/past_display_name.rs b/src/models/past_display_name.rs index 022665b..0c8f081 100644 --- a/src/models/past_display_name.rs +++ b/src/models/past_display_name.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/permission.rs b/src/models/permission.rs index 5b7aa05..716b604 100644 --- a/src/models/permission.rs +++ b/src/models/permission.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/platform.rs b/src/models/platform.rs deleted file mode 100644 index 607b5d9..0000000 --- a/src/models/platform.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * VRChat API Documentation - * - * - * The version of the OpenAPI document: 1.1.2 - * Contact: me@ruby.js.org - * Generated by: https://openapi-generator.tech - */ - - -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Platform { - #[serde(rename = "standalonewindows")] - Standalonewindows, - #[serde(rename = "android")] - Android, - -} - -impl ToString for Platform { - fn to_string(&self) -> String { - match self { - Self::Standalonewindows => String::from("standalonewindows"), - Self::Android => String::from("android"), - } - } -} - - - - diff --git a/src/models/player_moderation.rs b/src/models/player_moderation.rs index 39b1da2..f44da5f 100644 --- a/src/models/player_moderation.rs +++ b/src/models/player_moderation.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/player_moderation_type.rs b/src/models/player_moderation_type.rs index 03b9597..c880feb 100644 --- a/src/models/player_moderation_type.rs +++ b/src/models/player_moderation_type.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/release_status.rs b/src/models/release_status.rs index 4a3ea9d..1048839 100644 --- a/src/models/release_status.rs +++ b/src/models/release_status.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/response.rs b/src/models/response.rs index 37a414d..efedb59 100644 --- a/src/models/response.rs +++ b/src/models/response.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ @@ -12,16 +12,16 @@ #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct Response { - #[serde(rename = "message")] - pub message: String, + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, #[serde(rename = "status_code")] pub status_code: f32, } impl Response { - pub fn new(message: String, status_code: f32) -> Response { + pub fn new(status_code: f32) -> Response { Response { - message, + message: None, status_code, } } diff --git a/src/models/success.rs b/src/models/success.rs index 8d44a73..0e87fb9 100644 --- a/src/models/success.rs +++ b/src/models/success.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/unity_package.rs b/src/models/unity_package.rs index b951b2c..328ed66 100644 --- a/src/models/unity_package.rs +++ b/src/models/unity_package.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ @@ -28,14 +28,15 @@ pub struct UnityPackage { pub unity_sort_number: Option, #[serde(rename = "assetVersion")] pub asset_version: f32, + /// 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 = "platform")] - pub platform: crate::models::Platform, + pub platform: String, #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] pub created_at: Option, } impl UnityPackage { - pub fn new(id: String, unity_version: String, asset_version: f32, platform: crate::models::Platform) -> UnityPackage { + pub fn new(id: String, unity_version: String, asset_version: f32, platform: String) -> UnityPackage { UnityPackage { id, asset_url: None, diff --git a/src/models/user.rs b/src/models/user.rs index aa92a88..662a2c9 100644 --- a/src/models/user.rs +++ b/src/models/user.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ @@ -42,8 +42,9 @@ pub struct User { pub developer_type: crate::models::DeveloperType, #[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: crate::models::Platform, + pub last_platform: String, #[serde(rename = "allowAvatarCopying")] pub allow_avatar_copying: bool, #[serde(rename = "status")] @@ -63,7 +64,7 @@ pub struct User { } impl User { - pub fn new(id: String, username: String, display_name: String, user_icon: String, bio: String, bio_links: Vec, profile_pic_override: String, status_description: String, current_avatar_image_url: String, current_avatar_thumbnail_image_url: String, fallback_avatar: String, state: crate::models::UserState, tags: Vec, developer_type: crate::models::DeveloperType, last_login: String, last_platform: crate::models::Platform, allow_avatar_copying: bool, status: crate::models::UserStatus, date_joined: String, is_friend: bool, friend_key: String, world_id: String, instance_id: String, location: String) -> User { + pub fn new(id: String, username: String, display_name: String, user_icon: String, bio: String, bio_links: Vec, profile_pic_override: String, status_description: String, current_avatar_image_url: String, current_avatar_thumbnail_image_url: String, fallback_avatar: String, state: crate::models::UserState, tags: Vec, developer_type: crate::models::DeveloperType, last_login: String, last_platform: String, allow_avatar_copying: bool, status: crate::models::UserStatus, date_joined: String, is_friend: bool, friend_key: String, world_id: String, instance_id: String, location: String) -> User { User { id, username, diff --git a/src/models/user_state.rs b/src/models/user_state.rs index 7e42085..bbf4f57 100644 --- a/src/models/user_state.rs +++ b/src/models/user_state.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/user_status.rs b/src/models/user_status.rs index 5bed75a..a669ece 100644 --- a/src/models/user_status.rs +++ b/src/models/user_status.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */ diff --git a/src/models/world.rs b/src/models/world.rs index 51eb0ce..5fbb326 100644 --- a/src/models/world.rs +++ b/src/models/world.rs @@ -2,7 +2,7 @@ * VRChat API Documentation * * - * The version of the OpenAPI document: 1.1.2 + * The version of the OpenAPI document: 1.3.0 * Contact: me@ruby.js.org * Generated by: https://openapi-generator.tech */