Apply Changes

This commit is contained in:
C0D3 M4513R
2024-05-28 11:45:53 +02:00
parent 838a126e33
commit 539f0948e2
118 changed files with 3146 additions and 3446 deletions

View File

@ -12,6 +12,7 @@ docs/AuthenticationApi.md
docs/Avatar.md
docs/AvatarUnityPackageUrlObject.md
docs/AvatarsApi.md
docs/Badge.md
docs/BanGroupMemberRequest.md
docs/CreateAvatarRequest.md
docs/CreateFileRequest.md
@ -19,8 +20,10 @@ docs/CreateFileVersionRequest.md
docs/CreateGroupAnnouncementRequest.md
docs/CreateGroupGalleryRequest.md
docs/CreateGroupInviteRequest.md
docs/CreateGroupPostRequest.md
docs/CreateGroupRequest.md
docs/CreateGroupRoleRequest.md
docs/CreateInstanceRequest.md
docs/CreateWorldRequest.md
docs/CurrentUser.md
docs/CurrentUserPresence.md
@ -45,10 +48,13 @@ docs/FinishFileDataUploadRequest.md
docs/FriendStatus.md
docs/FriendsApi.md
docs/Group.md
docs/GroupAccessType.md
docs/GroupAnnouncement.md
docs/GroupAuditLogEntry.md
docs/GroupGallery.md
docs/GroupGalleryImage.md
docs/GroupInstance.md
docs/GroupJoinRequestAction.md
docs/GroupJoinState.md
docs/GroupLimitedMember.md
docs/GroupMember.md
@ -56,9 +62,12 @@ docs/GroupMemberLimitedUser.md
docs/GroupMemberStatus.md
docs/GroupMyMember.md
docs/GroupPermission.md
docs/GroupPost.md
docs/GroupPostVisibility.md
docs/GroupPrivacy.md
docs/GroupRole.md
docs/GroupRoleTemplate.md
docs/GroupSearchSort.md
docs/GroupUserVisibility.md
docs/GroupsApi.md
docs/InfoPush.md
@ -68,6 +77,7 @@ docs/InfoPushDataArticleContent.md
docs/InfoPushDataClickable.md
docs/Instance.md
docs/InstancePlatforms.md
docs/InstanceRegion.md
docs/InstanceShortNameResponse.md
docs/InstanceType.md
docs/InstancesApi.md
@ -80,12 +90,19 @@ docs/License.md
docs/LicenseAction.md
docs/LicenseGroup.md
docs/LicenseType.md
docs/LimitedGroup.md
docs/LimitedUnityPackage.md
docs/LimitedUser.md
docs/LimitedUserGroups.md
docs/LimitedWorld.md
docs/MimeType.md
docs/ModerateUserRequest.md
docs/Notification.md
docs/NotificationDetailInvite.md
docs/NotificationDetailInviteResponse.md
docs/NotificationDetailRequestInvite.md
docs/NotificationDetailRequestInviteResponse.md
docs/NotificationDetailVoteToKick.md
docs/NotificationType.md
docs/NotificationsApi.md
docs/OrderOption.md
@ -98,6 +115,7 @@ docs/PlayerModerationType.md
docs/PlayermoderationApi.md
docs/Region.md
docs/ReleaseStatus.md
docs/RepresentedGroup.md
docs/RequestInviteRequest.md
docs/RespondGroupJoinRequest.md
docs/Response.md
@ -166,6 +184,7 @@ src/models/api_config_events.rs
src/models/api_health.rs
src/models/avatar.rs
src/models/avatar_unity_package_url_object.rs
src/models/badge.rs
src/models/ban_group_member_request.rs
src/models/create_avatar_request.rs
src/models/create_file_request.rs
@ -173,8 +192,10 @@ src/models/create_file_version_request.rs
src/models/create_group_announcement_request.rs
src/models/create_group_gallery_request.rs
src/models/create_group_invite_request.rs
src/models/create_group_post_request.rs
src/models/create_group_request.rs
src/models/create_group_role_request.rs
src/models/create_instance_request.rs
src/models/create_world_request.rs
src/models/current_user.rs
src/models/current_user_presence.rs
@ -195,10 +216,13 @@ src/models/file_version_upload_status.rs
src/models/finish_file_data_upload_request.rs
src/models/friend_status.rs
src/models/group.rs
src/models/group_access_type.rs
src/models/group_announcement.rs
src/models/group_audit_log_entry.rs
src/models/group_gallery.rs
src/models/group_gallery_image.rs
src/models/group_instance.rs
src/models/group_join_request_action.rs
src/models/group_join_state.rs
src/models/group_limited_member.rs
src/models/group_member.rs
@ -206,9 +230,12 @@ src/models/group_member_limited_user.rs
src/models/group_member_status.rs
src/models/group_my_member.rs
src/models/group_permission.rs
src/models/group_post.rs
src/models/group_post_visibility.rs
src/models/group_privacy.rs
src/models/group_role.rs
src/models/group_role_template.rs
src/models/group_search_sort.rs
src/models/group_user_visibility.rs
src/models/info_push.rs
src/models/info_push_data.rs
@ -217,6 +244,7 @@ src/models/info_push_data_article_content.rs
src/models/info_push_data_clickable.rs
src/models/instance.rs
src/models/instance_platforms.rs
src/models/instance_region.rs
src/models/instance_short_name_response.rs
src/models/instance_type.rs
src/models/invite_message.rs
@ -227,13 +255,20 @@ src/models/license.rs
src/models/license_action.rs
src/models/license_group.rs
src/models/license_type.rs
src/models/limited_group.rs
src/models/limited_unity_package.rs
src/models/limited_user.rs
src/models/limited_user_groups.rs
src/models/limited_world.rs
src/models/mime_type.rs
src/models/mod.rs
src/models/moderate_user_request.rs
src/models/notification.rs
src/models/notification_detail_invite.rs
src/models/notification_detail_invite_response.rs
src/models/notification_detail_request_invite.rs
src/models/notification_detail_request_invite_response.rs
src/models/notification_detail_vote_to_kick.rs
src/models/notification_type.rs
src/models/order_option.rs
src/models/paginated_group_audit_log_entry_list.rs
@ -243,6 +278,7 @@ src/models/player_moderation.rs
src/models/player_moderation_type.rs
src/models/region.rs
src/models/release_status.rs
src/models/represented_group.rs
src/models/request_invite_request.rs
src/models/respond_group_join_request.rs
src/models/response.rs

View File

@ -1,6 +1,6 @@
[package]
name = "vrchatapi"
version = "1.15.0"
version = "1.17.5"
authors = ["vrchatapi.lpv0t@aries.fyi"]
description = "VRChat API Client for Rust"
license = "MIT"
@ -13,4 +13,11 @@ serde_with = "^2.0"
serde_json = "^1.0"
url = "^2.2"
uuid = { version = "^1.0", features = ["serde"] }
reqwest = "~0.9"
[dependencies.reqwest]
version = "^0.11"
features = ["json", "cookies", "multipart"]
[dev-dependencies]
tokio = { version = '1', features = ['macros', 'rt-multi-thread'] }
[dependencies.log]
version = "0.4"

View File

@ -1,6 +1,6 @@
# \AuthenticationApi
All URIs are relative to *https://api.vrchat.cloud/api/1*
All URIs are relative to *https://vrchat.com/api/1*
Method | HTTP request | Description
------------- | ------------- | -------------
@ -144,7 +144,7 @@ Finishes the login sequence with a normal 2FA-generated code for accounts with 2
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**two_factor_auth_code** | Option<[**TwoFactorAuthCode**](TwoFactorAuthCode.md)> | | |
**two_factor_auth_code** | [**TwoFactorAuthCode**](TwoFactorAuthCode.md) | | [required] |
### Return type
@ -174,7 +174,7 @@ Finishes the login sequence with an 2FA email code.
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**two_factor_email_code** | Option<[**TwoFactorEmailCode**](TwoFactorEmailCode.md)> | | |
**two_factor_email_code** | [**TwoFactorEmailCode**](TwoFactorEmailCode.md) | | [required] |
### Return type
@ -231,7 +231,7 @@ Finishes the login sequence with an OTP (One Time Password) recovery code for ac
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**two_factor_auth_code** | Option<[**TwoFactorAuthCode**](TwoFactorAuthCode.md)> | | |
**two_factor_auth_code** | [**TwoFactorAuthCode**](TwoFactorAuthCode.md) | | [required] |
### Return type

View File

@ -1,6 +1,6 @@
# \AvatarsApi
All URIs are relative to *https://api.vrchat.cloud/api/1*
All URIs are relative to *https://vrchat.com/api/1*
Method | HTTP request | Description
------------- | ------------- | -------------

18
docs/Badge.md Normal file
View File

@ -0,0 +1,18 @@
# Badge
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**assigned_at** | Option<**String**> | only present in CurrentUser badges | [optional]
**badge_description** | **String** | |
**badge_id** | **String** | |
**badge_image_url** | **String** | direct url to image |
**badge_name** | **String** | |
**hidden** | Option<**bool**> | only present in CurrentUser badges | [optional]
**showcased** | **bool** | |
**updated_at** | Option<**String**> | only present in CurrentUser badges | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -13,6 +13,7 @@ Name | Type | Description | Notes
**release_status** | Option<[**crate::models::ReleaseStatus**](ReleaseStatus.md)> | | [optional]
**version** | Option<**f32**> | | [optional][default to 1]
**unity_package_url** | Option<**String**> | | [optional]
**unity_version** | Option<**String**> | | [optional][default to 5.3.4p1]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,16 @@
# CreateGroupPostRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**title** | **String** | Post title |
**text** | **String** | Post text |
**image_id** | Option<**String**> | | [optional]
**send_notification** | **bool** | Send notification to group members. | [default to false]
**role_ids** | Option<**Vec<String>**> | | [optional]
**visibility** | [**crate::models::GroupPostVisibility**](GroupPostVisibility.md) | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,21 @@
# CreateInstanceRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**world_id** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. |
**r#type** | [**crate::models::InstanceType**](InstanceType.md) | |
**region** | [**crate::models::InstanceRegion**](InstanceRegion.md) | |
**owner_id** | Option<**String**> | A groupId if the instance type is \"group\", null if instance type is public, or a userId otherwise | [optional]
**role_ids** | Option<**Vec<String>**> | Group roleIds that are allowed to join if the type is \"group\" and groupAccessType is \"member\" | [optional]
**group_access_type** | Option<[**crate::models::GroupAccessType**](GroupAccessType.md)> | | [optional]
**queue_enabled** | Option<**bool**> | | [optional][default to false]
**closed_at** | Option<**String**> | The time after which users won't be allowed to join the instance. This doesn't work for public instances. | [optional]
**can_request_invite** | Option<**bool**> | Only applies to invite type instances to make them invite+ | [optional][default to false]
**hard_close** | Option<**bool**> | Currently unused, but will eventually be a flag to set if the closing of the instance should kick people. | [optional][default to false]
**invite_only** | Option<**bool**> | | [optional][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)

View File

@ -10,12 +10,14 @@ Name | Type | Description | Notes
**account_deletion_log** | Option<[**Vec<crate::models::AccountDeletionLog>**](AccountDeletionLog.md)> | | [optional]
**active_friends** | Option<**Vec<String>**> | | [optional]
**allow_avatar_copying** | **bool** | |
**badges** | Option<[**Vec<crate::models::Badge>**](Badge.md)> | | [optional]
**bio** | **String** | |
**bio_links** | **Vec<String>** | |
**current_avatar** | **String** | |
**current_avatar_asset_url** | **String** | |
**current_avatar_image_url** | **String** | When profilePicOverride is not empty, use it instead. |
**current_avatar_thumbnail_image_url** | **String** | When profilePicOverride is not empty, use it instead. |
**current_avatar_tags** | **Vec<String>** | |
**date_joined** | [**String**](string.md) | |
**developer_type** | [**crate::models::DeveloperType**](DeveloperType.md) | |
**display_name** | **String** | |
@ -25,6 +27,9 @@ Name | Type | Description | Notes
**friend_key** | **String** | |
**friends** | **Vec<String>** | |
**has_birthday** | **bool** | |
**hide_content_filter_settings** | Option<**bool**> | | [optional]
**user_language** | Option<**String**> | | [optional]
**user_language_code** | Option<**String**> | | [optional]
**has_email** | **bool** | |
**has_logged_in_from_client** | **bool** | |
**has_pending_email** | **bool** | |
@ -33,15 +38,21 @@ Name | Type | Description | Notes
**is_friend** | **bool** | | [default to false]
**last_activity** | Option<**String**> | | [optional]
**last_login** | **String** | |
**last_mobile** | Option<**String**> | |
**last_platform** | **String** | This can be `standalonewindows` or `android`, but can also pretty much be any random Unity verison such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. |
**obfuscated_email** | **String** | |
**obfuscated_pending_email** | **String** | |
**oculus_id** | **String** | |
**google_id** | Option<**String**> | | [optional]
**google_details** | Option<[**serde_json::Value**](.md)> | | [optional]
**pico_id** | Option<**String**> | | [optional]
**vive_id** | Option<**String**> | | [optional]
**offline_friends** | Option<**Vec<String>**> | | [optional]
**online_friends** | Option<**Vec<String>**> | | [optional]
**past_display_names** | [**Vec<crate::models::PastDisplayName>**](PastDisplayName.md) | |
**presence** | Option<[**crate::models::CurrentUserPresence**](CurrentUserPresence.md)> | | [optional]
**profile_pic_override** | **String** | |
**pronouns** | **String** | |
**state** | [**crate::models::UserState**](UserState.md) | |
**status** | [**crate::models::UserStatus**](UserStatus.md) | |
**status_description** | **String** | |

View File

@ -1,6 +1,6 @@
# \EconomyApi
All URIs are relative to *https://api.vrchat.cloud/api/1*
All URIs are relative to *https://vrchat.com/api/1*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@ -1,6 +1,6 @@
# \FavoritesApi
All URIs are relative to *https://api.vrchat.cloud/api/1*
All URIs are relative to *https://vrchat.com/api/1*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@ -1,6 +1,6 @@
# \FilesApi
All URIs are relative to *https://api.vrchat.cloud/api/1*
All URIs are relative to *https://vrchat.com/api/1*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@ -1,6 +1,6 @@
# \FriendsApi
All URIs are relative to *https://api.vrchat.cloud/api/1*
All URIs are relative to *https://vrchat.com/api/1*
Method | HTTP request | Description
------------- | ------------- | -------------

10
docs/GroupAccessType.md Normal file
View File

@ -0,0 +1,10 @@
# GroupAccessType
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -8,7 +8,7 @@ Name | Type | Description | Notes
**created_at** | Option<**String**> | | [optional]
**group_id** | Option<**String**> | | [optional]
**actor_id** | Option<**String**> | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. | [optional]
**actor_displayname** | Option<**String**> | | [optional]
**actor_display_name** | Option<**String**> | | [optional]
**target_id** | Option<**String**> | Typically GroupID or GroupRoleID, but could be other types of IDs. | [optional]
**event_type** | Option<**String**> | The type of event that occurred. This is a string that is prefixed with the type of object that the event occurred on. For example, a group role update event would be prefixed with `group.role`. | [optional][default to group.update]
**description** | Option<**String**> | A human-readable description of the event. | [optional]

14
docs/GroupInstance.md Normal file
View File

@ -0,0 +1,14 @@
# GroupInstance
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**instance_id** | **String** | |
**location** | **String** | InstanceID can be \"offline\" on User profiles if you are not friends with that user and \"private\" if you are friends and user is in private instance. |
**world** | [**crate::models::World**](World.md) | |
**member_count** | **i32** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,10 @@
# GroupJoinRequestAction
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -7,7 +7,18 @@ Name | Type | Description | Notes
**id** | Option<**String**> | | [optional]
**group_id** | Option<**String**> | | [optional]
**user_id** | Option<**String**> | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. | [optional]
**is_representing** | Option<**bool**> | | [optional][default to false]
**is_representing** | Option<**bool**> | Whether the user is representing the group. This makes the group show up above the name tag in-game. | [optional][default to false]
**role_ids** | Option<**Vec<String>**> | | [optional]
**m_role_ids** | Option<**Vec<String>**> | | [optional]
**joined_at** | Option<**String**> | | [optional]
**membership_status** | Option<[**crate::models::GroupMemberStatus**](GroupMemberStatus.md)> | | [optional]
**visibility** | Option<**String**> | | [optional]
**is_subscribed_to_announcements** | Option<**bool**> | | [optional][default to false]
**created_at** | Option<**String**> | Only visible via the /groups/:groupId/members endpoint, **not** when fetching a specific user. | [optional]
**banned_at** | Option<**String**> | Only visible via the /groups/:groupId/members endpoint, **not** when fetching a specific user. | [optional]
**manager_notes** | Option<**String**> | Only visible via the /groups/:groupId/members endpoint, **not** when fetching a specific user. | [optional]
**last_post_read_at** | Option<**String**> | | [optional]
**has_joined_from_purchase** | Option<**bool**> | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -10,13 +10,16 @@ Name | Type | Description | Notes
**is_representing** | Option<**bool**> | Whether the user is representing the group. This makes the group show up above the name tag in-game. | [optional][default to false]
**user** | Option<[**crate::models::GroupMemberLimitedUser**](GroupMemberLimitedUser.md)> | | [optional]
**role_ids** | Option<**Vec<String>**> | | [optional]
**m_role_ids** | Option<**Vec<String>**> | | [optional]
**joined_at** | Option<**String**> | | [optional]
**membership_status** | Option<**String**> | | [optional]
**membership_status** | Option<[**crate::models::GroupMemberStatus**](GroupMemberStatus.md)> | | [optional]
**visibility** | Option<**String**> | | [optional]
**is_subscribed_to_announcements** | Option<**bool**> | | [optional][default to false]
**created_at** | Option<**String**> | Only visible via the /groups/:groupId/members endpoint, **not** when fetching a specific user. | [optional]
**banned_at** | Option<**String**> | Only visible via the /groups/:groupId/members endpoint, **not** when fetching a specific user. | [optional]
**manager_notes** | Option<**String**> | Only visible via the /groups/:groupId/members endpoint, **not** when fetching a specific user. | [optional]
**last_post_read_at** | Option<**String**> | | [optional]
**has_joined_from_purchase** | Option<**bool**> | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -8,6 +8,9 @@ Name | Type | Description | Notes
**display_name** | Option<**String**> | | [optional]
**thumbnail_url** | Option<**String**> | | [optional]
**icon_url** | Option<**String**> | | [optional]
**profile_pic_override** | Option<**String**> | | [optional]
**current_avatar_thumbnail_image_url** | Option<**String**> | | [optional]
**current_avatar_tags** | Option<**Vec<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)

22
docs/GroupPost.md Normal file
View File

@ -0,0 +1,22 @@
# GroupPost
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | Option<**String**> | | [optional]
**group_id** | Option<**String**> | | [optional]
**author_id** | Option<**String**> | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. | [optional]
**editor_id** | Option<**String**> | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. | [optional]
**visibility** | Option<[**crate::models::GroupPostVisibility**](GroupPostVisibility.md)> | | [optional]
**role_id** | Option<**Vec<String>**> | | [optional]
**title** | Option<**String**> | | [optional]
**text** | Option<**String**> | | [optional]
**image_id** | Option<**String**> | | [optional]
**image_url** | Option<**String**> | | [optional]
**created_at** | Option<**String**> | | [optional]
**updated_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)

View File

@ -0,0 +1,10 @@
# GroupPostVisibility
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

10
docs/GroupSearchSort.md Normal file
View File

@ -0,0 +1,10 @@
# GroupSearchSort
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,11 +1,12 @@
# \GroupsApi
All URIs are relative to *https://api.vrchat.cloud/api/1*
All URIs are relative to *https://vrchat.com/api/1*
Method | HTTP request | Description
------------- | ------------- | -------------
[**add_group_gallery_image**](GroupsApi.md#add_group_gallery_image) | **POST** /groups/{groupId}/galleries/{groupGalleryId}/images | Add Group Gallery Image
[**add_group_member_role**](GroupsApi.md#add_group_member_role) | **PUT** /groups/{groupId}/members/{userId}/roles/{groupRoleId} | Add Role to GroupMember
[**add_group_post**](GroupsApi.md#add_group_post) | **POST** /groups/{groupId}/posts | Create a post in a Group
[**ban_group_member**](GroupsApi.md#ban_group_member) | **POST** /groups/{groupId}/bans | Ban Group Member
[**cancel_group_request**](GroupsApi.md#cancel_group_request) | **DELETE** /groups/{groupId}/requests | Cancel Group Join Request
[**create_group**](GroupsApi.md#create_group) | **POST** /groups | Create Group
@ -18,16 +19,19 @@ Method | HTTP request | Description
[**delete_group_gallery**](GroupsApi.md#delete_group_gallery) | **DELETE** /groups/{groupId}/galleries/{groupGalleryId} | Delete Group Gallery
[**delete_group_gallery_image**](GroupsApi.md#delete_group_gallery_image) | **DELETE** /groups/{groupId}/galleries/{groupGalleryId}/images/{groupGalleryImageId} | Delete Group Gallery Image
[**delete_group_invite**](GroupsApi.md#delete_group_invite) | **DELETE** /groups/{groupId}/invites/{userId} | Delete User Invite
[**delete_group_post**](GroupsApi.md#delete_group_post) | **DELETE** /groups/{groupId}/posts/{notificationId} | Delete a Group post
[**delete_group_role**](GroupsApi.md#delete_group_role) | **DELETE** /groups/{groupId}/roles/{groupRoleId} | Delete Group Role
[**get_group**](GroupsApi.md#get_group) | **GET** /groups/{groupId} | Get Group by ID
[**get_group_announcements**](GroupsApi.md#get_group_announcements) | **GET** /groups/{groupId}/announcement | Get Group Announcement
[**get_group_audit_logs**](GroupsApi.md#get_group_audit_logs) | **GET** /groups/{groupId}/auditLogs | Get Group Audit Logs
[**get_group_bans**](GroupsApi.md#get_group_bans) | **GET** /groups/{groupId}/bans | Get Group Bans
[**get_group_gallery_images**](GroupsApi.md#get_group_gallery_images) | **GET** /groups/{groupId}/galleries/{groupGalleryId} | Get Group Gallery Images
[**get_group_instances**](GroupsApi.md#get_group_instances) | **GET** /groups/{groupId}/instances | Get Group Instances
[**get_group_invites**](GroupsApi.md#get_group_invites) | **GET** /groups/{groupId}/invites | Get Group Invites Sent
[**get_group_member**](GroupsApi.md#get_group_member) | **GET** /groups/{groupId}/members/{userId} | Get Group Member
[**get_group_members**](GroupsApi.md#get_group_members) | **GET** /groups/{groupId}/members | List Group Members
[**get_group_permissions**](GroupsApi.md#get_group_permissions) | **GET** /groups/{groupId}/permissions | List Group Permissions
[**get_group_post**](GroupsApi.md#get_group_post) | **GET** /groups/{groupId}/posts | Get posts from a Group
[**get_group_requests**](GroupsApi.md#get_group_requests) | **GET** /groups/{groupId}/requests | Get Group Join Requests
[**get_group_roles**](GroupsApi.md#get_group_roles) | **GET** /groups/{groupId}/roles | Get Group Roles
[**join_group**](GroupsApi.md#join_group) | **POST** /groups/{groupId}/join | Join Group
@ -35,10 +39,12 @@ Method | HTTP request | Description
[**leave_group**](GroupsApi.md#leave_group) | **POST** /groups/{groupId}/leave | Leave Group
[**remove_group_member_role**](GroupsApi.md#remove_group_member_role) | **DELETE** /groups/{groupId}/members/{userId}/roles/{groupRoleId} | Remove Role from GroupMember
[**respond_group_join_request**](GroupsApi.md#respond_group_join_request) | **PUT** /groups/{groupId}/requests/{userId} | Respond Group Join request
[**search_groups**](GroupsApi.md#search_groups) | **GET** /groups | Search Group
[**unban_group_member**](GroupsApi.md#unban_group_member) | **DELETE** /groups/{groupId}/bans/{userId} | Unban Group Member
[**update_group**](GroupsApi.md#update_group) | **PUT** /groups/{groupId} | Update Group
[**update_group_gallery**](GroupsApi.md#update_group_gallery) | **PUT** /groups/{groupId}/galleries/{groupGalleryId} | Update Group Gallery
[**update_group_member**](GroupsApi.md#update_group_member) | **PUT** /groups/{groupId}/members/{userId} | Update Group Member
[**update_group_post**](GroupsApi.md#update_group_post) | **PUT** /groups/{groupId}/posts/{notificationId} | Edits a Group post
[**update_group_role**](GroupsApi.md#update_group_role) | **PUT** /groups/{groupId}/roles/{groupRoleId} | Update Group Role
@ -57,7 +63,7 @@ Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**group_id** | **String** | Must be a valid group ID. | [required] |
**group_gallery_id** | **String** | Must be a valid group gallery ID. | [required] |
**add_group_gallery_image_request** | Option<[**AddGroupGalleryImageRequest**](AddGroupGalleryImageRequest.md)> | | |
**add_group_gallery_image_request** | [**AddGroupGalleryImageRequest**](AddGroupGalleryImageRequest.md) | | [required] |
### Return type
@ -107,6 +113,37 @@ 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)
## add_group_post
> crate::models::GroupPost add_group_post(group_id, create_group_post_request)
Create a post in a Group
Create a post in a Group.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**group_id** | **String** | Must be a valid group ID. | [required] |
**create_group_post_request** | [**CreateGroupPostRequest**](CreateGroupPostRequest.md) | | [required] |
### Return type
[**crate::models::GroupPost**](GroupPost.md)
### Authorization
[authCookie](../README.md#authCookie)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## ban_group_member
> crate::models::GroupMember ban_group_member(group_id, ban_group_member_request)
@ -120,7 +157,7 @@ Bans a user from a Group.
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**group_id** | **String** | Must be a valid group ID. | [required] |
**ban_group_member_request** | Option<[**BanGroupMemberRequest**](BanGroupMemberRequest.md)> | | |
**ban_group_member_request** | [**BanGroupMemberRequest**](BanGroupMemberRequest.md) | | [required] |
### Return type
@ -180,7 +217,7 @@ Creates a Group and returns a Group object. **Requires VRC+ Subscription.**
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**create_group_request** | Option<[**CreateGroupRequest**](CreateGroupRequest.md)> | | |
**create_group_request** | [**CreateGroupRequest**](CreateGroupRequest.md) | | [required] |
### Return type
@ -211,7 +248,7 @@ Creates an Announcement for a Group.
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**group_id** | **String** | Must be a valid group ID. | [required] |
**create_group_announcement_request** | Option<[**CreateGroupAnnouncementRequest**](CreateGroupAnnouncementRequest.md)> | | |
**create_group_announcement_request** | [**CreateGroupAnnouncementRequest**](CreateGroupAnnouncementRequest.md) | | [required] |
### Return type
@ -242,7 +279,7 @@ Creates a gallery for a Group.
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**group_id** | **String** | Must be a valid group ID. | [required] |
**create_group_gallery_request** | Option<[**CreateGroupGalleryRequest**](CreateGroupGalleryRequest.md)> | | |
**create_group_gallery_request** | [**CreateGroupGalleryRequest**](CreateGroupGalleryRequest.md) | | [required] |
### Return type
@ -273,7 +310,7 @@ Sends an invite to a user to join the group.
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**group_id** | **String** | Must be a valid group ID. | [required] |
**create_group_invite_request** | Option<[**CreateGroupInviteRequest**](CreateGroupInviteRequest.md)> | | |
**create_group_invite_request** | [**CreateGroupInviteRequest**](CreateGroupInviteRequest.md) | | [required] |
### Return type
@ -304,7 +341,7 @@ Create a Group role.
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**group_id** | **String** | Must be a valid group ID. | [required] |
**create_group_role_request** | Option<[**CreateGroupRoleRequest**](CreateGroupRoleRequest.md)> | | |
**create_group_role_request** | [**CreateGroupRoleRequest**](CreateGroupRoleRequest.md) | | [required] |
### Return type
@ -476,6 +513,37 @@ 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)
## delete_group_post
> crate::models::Success delete_group_post(group_id, notification_id)
Delete a Group post
Delete a Group post
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**group_id** | **String** | Must be a valid group ID. | [required] |
**notification_id** | **String** | Must be a valid notification ID. | [required] |
### Return type
[**crate::models::Success**](Success.md)
### Authorization
[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)
## delete_group_role
> Vec<crate::models::GroupRole> delete_group_role(group_id, group_role_id)
@ -668,9 +736,39 @@ Name | Type | Description | Required | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## get_group_instances
> Vec<crate::models::GroupInstance> get_group_instances(group_id)
Get Group Instances
Returns a list of group instances
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**group_id** | **String** | Must be a valid group ID. | [required] |
### Return type
[**Vec<crate::models::GroupInstance>**](GroupInstance.md)
### Authorization
[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_group_invites
> Vec<crate::models::GroupMember> get_group_invites(group_id)
> Vec<crate::models::GroupMember> get_group_invites(group_id, n, offset)
Get Group Invites Sent
Returns a list of members that have been invited to the Group.
@ -681,6 +779,8 @@ Returns a list of members that have been invited to the Group.
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**group_id** | **String** | Must be a valid group ID. | [required] |
**n** | Option<**i32**> | The number of objects to return. | |[default to 60]
**offset** | Option<**i32**> | A zero-based offset from the default object sorting from where search results start. | |
### Return type
@ -731,7 +831,7 @@ Name | Type | Description | Required | Notes
## get_group_members
> Vec<crate::models::GroupMember> get_group_members(group_id, n, offset)
> Vec<crate::models::GroupMember> get_group_members(group_id, n, offset, sort)
List Group Members
Returns a List of all **other** Group Members. This endpoint will never return the user calling the endpoint. Information about the user calling the endpoint must be found in the `myMember` field of the Group object.
@ -744,6 +844,7 @@ Name | Type | Description | Required | Notes
**group_id** | **String** | Must be a valid group ID. | [required] |
**n** | Option<**i32**> | The number of objects to return. | |[default to 60]
**offset** | Option<**i32**> | A zero-based offset from the default object sorting from where search results start. | |
**sort** | Option<[**GroupSearchSort**](.md)> | The sort order of Group Member results | |
### Return type
@ -791,9 +892,42 @@ Name | Type | Description | Required | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## get_group_post
> crate::models::GroupPost get_group_post(group_id, n, offset, public_only)
Get posts from a Group
Get posts from a Group
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**group_id** | **String** | Must be a valid group ID. | [required] |
**n** | Option<**i32**> | The number of objects to return. | |[default to 60]
**offset** | Option<**i32**> | A zero-based offset from the default object sorting from where search results start. | |
**public_only** | Option<**bool**> | See public posts only. | |
### Return type
[**crate::models::GroupPost**](GroupPost.md)
### Authorization
[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_group_requests
> Vec<crate::models::GroupMember> get_group_requests(group_id)
> Vec<crate::models::GroupMember> get_group_requests(group_id, n, offset, blocked)
Get Group Join Requests
Returns a list of members that have requested to join the Group.
@ -804,6 +938,9 @@ Returns a list of members that have requested to join the Group.
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**group_id** | **String** | Must be a valid group ID. | [required] |
**n** | Option<**i32**> | The number of objects to return. | |[default to 60]
**offset** | Option<**i32**> | A zero-based offset from the default object sorting from where search results start. | |
**blocked** | Option<**bool**> | See blocked join requests | |
### Return type
@ -988,7 +1125,7 @@ Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**group_id** | **String** | Must be a valid group ID. | [required] |
**user_id** | **String** | Must be a valid user ID. | [required] |
**respond_group_join_request** | Option<[**RespondGroupJoinRequest**](RespondGroupJoinRequest.md)> | | |
**respond_group_join_request** | [**RespondGroupJoinRequest**](RespondGroupJoinRequest.md) | | [required] |
### Return type
@ -1006,6 +1143,38 @@ 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_groups
> Vec<crate::models::LimitedGroup> search_groups(query, offset, n)
Search Group
Searches Groups by name or shortCode
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**query** | Option<**String**> | Query to search for, can be either Group Name or Group shortCode | |
**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<crate::models::LimitedGroup>**](LimitedGroup.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## unban_group_member
> crate::models::GroupMember unban_group_member(group_id, user_id)
@ -1132,6 +1301,38 @@ 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)
## update_group_post
> crate::models::GroupPost update_group_post(group_id, notification_id, create_group_post_request)
Edits a Group post
Edits a Group post
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**group_id** | **String** | Must be a valid group ID. | [required] |
**notification_id** | **String** | Must be a valid notification ID. | [required] |
**create_group_post_request** | [**CreateGroupPostRequest**](CreateGroupPostRequest.md) | | [required] |
### Return type
[**crate::models::GroupPost**](GroupPost.md)
### Authorization
[authCookie](../README.md#authCookie)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## update_group_role
> Vec<crate::models::GroupRole> update_group_role(group_id, group_role_id, update_group_role_request)

View File

@ -14,11 +14,11 @@ Name | Type | Description | Notes
**location** | **String** | InstanceID can be \"offline\" on User profiles if you are not friends with that user and \"private\" if you are friends and user is in private instance. |
**n_users** | **i32** | |
**name** | **String** | |
**owner_id** | Option<**String**> | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. | [optional]
**owner_id** | Option<**String**> | A groupId if the instance type is \"group\", null if instance type is public, or a userId otherwise | [optional]
**permanent** | **bool** | | [default to false]
**photon_region** | [**crate::models::Region**](Region.md) | |
**platforms** | [**crate::models::InstancePlatforms**](InstancePlatforms.md) | |
**region** | [**crate::models::Region**](Region.md) | |
**region** | [**crate::models::InstanceRegion**](InstanceRegion.md) | |
**secure_name** | **String** | |
**short_name** | Option<**String**> | | [optional]
**tags** | **Vec<String>** | The tags array on Instances usually contain the language tags of the people in the instance. |
@ -27,6 +27,19 @@ Name | Type | Description | Notes
**hidden** | Option<**String**> | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. | [optional]
**friends** | Option<**String**> | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. | [optional]
**private** | Option<**String**> | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. | [optional]
**queue_enabled** | **bool** | |
**queue_size** | **i32** | |
**recommended_capacity** | **i32** | |
**role_restricted** | Option<**bool**> | | [optional]
**strict** | **bool** | |
**user_count** | **i32** | |
**world** | [**crate::models::World**](World.md) | |
**users** | Option<[**Vec<crate::models::LimitedUser>**](LimitedUser.md)> | The users field is present on instances created by the requesting user. | [optional]
**group_access_type** | Option<[**crate::models::GroupAccessType**](GroupAccessType.md)> | | [optional]
**has_capacity_for_you** | Option<**bool**> | | [optional]
**nonce** | Option<**String**> | | [optional]
**closed_at** | Option<**String**> | | [optional]
**hard_close** | Option<**bool**> | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

10
docs/InstanceRegion.md Normal file
View File

@ -0,0 +1,10 @@
# InstanceRegion
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,9 +1,11 @@
# \InstancesApi
All URIs are relative to *https://api.vrchat.cloud/api/1*
All URIs are relative to *https://vrchat.com/api/1*
Method | HTTP request | Description
------------- | ------------- | -------------
[**close_instance**](InstancesApi.md#close_instance) | **DELETE** /instances/{worldId}:{instanceId} | Close Instance
[**create_instance**](InstancesApi.md#create_instance) | **POST** /instances | Create Instance
[**get_instance**](InstancesApi.md#get_instance) | **GET** /instances/{worldId}:{instanceId} | Get Instance
[**get_instance_by_short_name**](InstancesApi.md#get_instance_by_short_name) | **GET** /instances/s/{shortName} | Get Instance By Short Name
[**get_short_name**](InstancesApi.md#get_short_name) | **GET** /instances/{worldId}:{instanceId}/shortName | Get Instance Short Name
@ -11,6 +13,69 @@ Method | HTTP request | Description
## close_instance
> crate::models::Instance close_instance(world_id, instance_id, hard_close, closed_at)
Close Instance
Close an instance or update the closedAt time when it will be closed. You can only close an instance if the ownerId is yourself or if the instance owner is a group and you have the `group-instance-moderate` permission.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**world_id** | **String** | Must be a valid world ID. | [required] |
**instance_id** | **String** | Must be a valid instance ID. | [required] |
**hard_close** | Option<**bool**> | Whether to hard close the instance. Defaults to false. | |
**closed_at** | Option<**String**> | The time after which users won't be allowed to join the instances. If omitted, the instance will be closed immediately. | |
### Return type
[**crate::models::Instance**](Instance.md)
### Authorization
[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)
## create_instance
> crate::models::Instance create_instance(create_instance_request)
Create Instance
Create an instance
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**create_instance_request** | [**CreateInstanceRequest**](CreateInstanceRequest.md) | | [required] |
### Return type
[**crate::models::Instance**](Instance.md)
### Authorization
[authCookie](../README.md#authCookie)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## get_instance
> crate::models::Instance get_instance(world_id, instance_id)

View File

@ -1,6 +1,6 @@
# \InviteApi
All URIs are relative to *https://api.vrchat.cloud/api/1*
All URIs are relative to *https://vrchat.com/api/1*
Method | HTTP request | Description
------------- | ------------- | -------------
@ -122,7 +122,7 @@ Sends an invite to a user. Returns the Notification of type `invite` that was se
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**user_id** | **String** | Must be a valid user ID. | [required] |
**invite_request** | Option<[**InviteRequest**](InviteRequest.md)> | Slot number of the Invite Message to use when inviting a user. | |
**invite_request** | [**InviteRequest**](InviteRequest.md) | Slot number of the Invite Message to use when inviting a user. | [required] |
### Return type
@ -216,7 +216,7 @@ Respond to an invite request by sending a world invite to the requesting user. `
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**notification_id** | **String** | Must be a valid notification ID. | [required] |
**invite_response** | Option<[**InviteResponse**](InviteResponse.md)> | Slot number of the Response Message to use when responding to a user. | |
**invite_response** | [**InviteResponse**](InviteResponse.md) | Slot number of the Response Message to use when responding to a user. | [required] |
### Return type

27
docs/LimitedGroup.md Normal file
View File

@ -0,0 +1,27 @@
# LimitedGroup
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | Option<**String**> | | [optional]
**name** | Option<**String**> | | [optional]
**short_code** | Option<**String**> | | [optional]
**discriminator** | Option<**String**> | | [optional]
**description** | Option<**String**> | | [optional]
**icon_url** | Option<**String**> | | [optional]
**banner_url** | Option<**String**> | | [optional]
**owner_id** | Option<**String**> | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. | [optional]
**rules** | Option<**String**> | | [optional]
**icon_id** | Option<**String**> | | [optional]
**banner_id** | Option<**String**> | | [optional]
**member_count** | Option<**i32**> | | [optional]
**tags** | Option<**Vec<String>**> | | [optional]
**created_at** | Option<**String**> | | [optional]
**membership_status** | Option<[**crate::models::GroupMemberStatus**](GroupMemberStatus.md)> | | [optional]
**is_searchable** | Option<**bool**> | | [optional]
**galleries** | Option<[**Vec<crate::models::GroupGallery>**](GroupGallery.md)> | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -5,19 +5,22 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bio** | Option<**String**> | | [optional]
**current_avatar_image_url** | **String** | When profilePicOverride is not empty, use it instead. |
**current_avatar_thumbnail_image_url** | **String** | When profilePicOverride is not empty, use it instead. |
**bio_links** | Option<**Vec<String>**> | | [optional]
**current_avatar_image_url** | Option<**String**> | When profilePicOverride is not empty, use it instead. | [optional]
**current_avatar_thumbnail_image_url** | Option<**String**> | When profilePicOverride is not empty, use it instead. | [optional]
**current_avatar_tags** | Option<**Vec<String>**> | | [optional]
**developer_type** | [**crate::models::DeveloperType**](DeveloperType.md) | |
**display_name** | **String** | |
**fallback_avatar** | Option<**String**> | | [optional]
**id** | **String** | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. |
**is_friend** | **bool** | |
**last_platform** | **String** | This can be `standalonewindows` or `android`, but can also pretty much be any random Unity verison such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. |
**profile_pic_override** | **String** | |
**profile_pic_override** | Option<**String**> | | [optional]
**pronouns** | Option<**String**> | | [optional]
**status** | [**crate::models::UserStatus**](UserStatus.md) | |
**status_description** | **String** | |
**tags** | **Vec<String>** | <- Always empty. |
**user_icon** | **String** | |
**user_icon** | Option<**String**> | | [optional]
**username** | Option<**String**> | -| **DEPRECATED:** VRChat API no longer return usernames of other users. [See issue by Tupper for more information](https://github.com/pypy-vrc/VRCX/issues/429). | [optional]
**location** | Option<**String**> | | [optional]
**friend_key** | Option<**String**> | | [optional]

28
docs/LimitedUserGroups.md Normal file
View File

@ -0,0 +1,28 @@
# LimitedUserGroups
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | Option<**String**> | | [optional]
**name** | Option<**String**> | | [optional]
**short_code** | Option<**String**> | | [optional]
**discriminator** | Option<**String**> | | [optional]
**description** | Option<**String**> | | [optional]
**icon_id** | Option<**String**> | | [optional]
**icon_url** | Option<**String**> | | [optional]
**banner_id** | Option<**String**> | | [optional]
**banner_url** | Option<**String**> | | [optional]
**privacy** | Option<**String**> | | [optional]
**last_post_created_at** | Option<**String**> | | [optional]
**owner_id** | Option<**String**> | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. | [optional]
**member_count** | Option<**i32**> | | [optional]
**group_id** | Option<**String**> | | [optional]
**member_visibility** | Option<**String**> | | [optional]
**is_representing** | Option<**bool**> | | [optional]
**mutual_group** | Option<**bool**> | | [optional]
**last_post_read_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)

View File

@ -7,8 +7,10 @@ Name | Type | Description | Notes
**author_id** | **String** | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. |
**author_name** | **String** | |
**capacity** | **i32** | |
**recommended_capacity** | Option<**i32**> | | [optional]
**created_at** | **String** | |
**favorites** | **i32** | | [default to 0]
**visits** | Option<**i32**> | | [optional][default to 0]
**heat** | **i32** | | [default to 0]
**id** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. |
**image_url** | **String** | |
@ -17,12 +19,14 @@ Name | Type | Description | Notes
**occupants** | **i32** | | [default to 0]
**organization** | **String** | | [default to vrchat]
**popularity** | **i32** | | [default to 0]
**preview_youtube_id** | Option<**String**> | | [optional]
**publication_date** | **String** | |
**release_status** | [**crate::models::ReleaseStatus**](ReleaseStatus.md) | |
**tags** | **Vec<String>** | |
**thumbnail_image_url** | **String** | |
**unity_packages** | [**Vec<crate::models::LimitedUnityPackage>**](LimitedUnityPackage.md) | |
**updated_at** | **String** | |
**udon_products** | Option<**Vec<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)

View File

@ -0,0 +1,13 @@
# NotificationDetailInvite
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**invite_message** | Option<**String**> | | [optional]
**world_id** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. |
**world_name** | **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)

View File

@ -0,0 +1,12 @@
# NotificationDetailInviteResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**in_response_to** | **String** | |
**response_message** | **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)

View File

@ -0,0 +1,12 @@
# NotificationDetailRequestInvite
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**platform** | Option<**String**> | TODO: Does this still exist? | [optional]
**request_message** | Option<**String**> | Used when using InviteMessage Slot. | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,12 @@
# NotificationDetailRequestInviteResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**in_response_to** | **String** | |
**request_message** | Option<**String**> | Used when using InviteMessage Slot. | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,12 @@
# NotificationDetailVoteToKick
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**initiator_user_id** | **String** | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. |
**user_to_kick_id** | **String** | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,6 +1,6 @@
# \NotificationsApi
All URIs are relative to *https://api.vrchat.cloud/api/1*
All URIs are relative to *https://vrchat.com/api/1*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@ -1,6 +1,6 @@
# \PermissionsApi
All URIs are relative to *https://api.vrchat.cloud/api/1*
All URIs are relative to *https://vrchat.com/api/1*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@ -1,6 +1,6 @@
# \PlayermoderationApi
All URIs are relative to *https://api.vrchat.cloud/api/1*
All URIs are relative to *https://vrchat.com/api/1*
Method | HTTP request | Description
------------- | ------------- | -------------
@ -143,7 +143,7 @@ Moderate a user, e.g. unmute them or show their avatar. Please see the [Player
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**moderate_user_request** | Option<[**ModerateUserRequest**](ModerateUserRequest.md)> | | |
**moderate_user_request** | [**ModerateUserRequest**](ModerateUserRequest.md) | | [required] |
### Return type
@ -173,7 +173,7 @@ Removes a player moderation previously added through `moderateUser`. E.g if you
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**moderate_user_request** | Option<[**ModerateUserRequest**](ModerateUserRequest.md)> | | |
**moderate_user_request** | [**ModerateUserRequest**](ModerateUserRequest.md) | | [required] |
### Return type

24
docs/RepresentedGroup.md Normal file
View File

@ -0,0 +1,24 @@
# RepresentedGroup
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | Option<**String**> | | [optional]
**short_code** | Option<**String**> | | [optional]
**discriminator** | Option<**String**> | | [optional]
**description** | Option<**String**> | | [optional]
**icon_id** | Option<**String**> | | [optional]
**icon_url** | Option<**String**> | | [optional]
**banner_id** | Option<**String**> | | [optional]
**banner_url** | Option<**String**> | | [optional]
**privacy** | Option<[**crate::models::GroupPrivacy**](GroupPrivacy.md)> | | [optional]
**owner_id** | Option<**String**> | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. | [optional]
**member_count** | Option<**i32**> | | [optional]
**group_id** | Option<**String**> | | [optional]
**member_visibility** | Option<[**crate::models::GroupUserVisibility**](GroupUserVisibility.md)> | | [optional]
**is_representing** | Option<**bool**> | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -4,7 +4,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**action** | Option<**String**> | | [optional]
**action** | [**crate::models::GroupJoinRequestAction**](GroupJoinRequestAction.md) | |
**block** | Option<**bool**> | Whether to block the user from requesting again | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -5,10 +5,10 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**created_at** | **String** | |
**details** | **String** | **NOTICE:** This is not a JSON object, this is a json **encoded** object, meaning you have to json-de-encode to get the NotificationDetail object depending on the NotificationType. | [default to {}]
**details** | [**serde_json::Value**](.md) | |
**id** | **String** | |
**message** | **String** | |
**reciever_user_id** | **String** | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. |
**receiver_user_id** | **String** | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. |
**sender_user_id** | **String** | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. |
**sender_username** | Option<**String**> | -| **DEPRECATED:** VRChat API no longer return usernames of other users. [See issue by Tupper for more information](https://github.com/pypy-vrc/VRCX/issues/429). | [optional]
**r#type** | [**crate::models::NotificationType**](NotificationType.md) | |

View File

@ -6,6 +6,10 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | |
**steam_item_id** | **String** | |
**oculus_sku** | Option<**String**> | | [optional]
**google_product_id** | Option<**String**> | | [optional]
**google_plan_id** | Option<**String**> | | [optional]
**pico_sku** | Option<**String**> | | [optional]
**amount** | **f32** | |
**description** | **String** | |
**period** | [**crate::models::SubscriptionPeriod**](SubscriptionPeriod.md) | |

View File

@ -1,6 +1,6 @@
# \SystemApi
All URIs are relative to *https://api.vrchat.cloud/api/1*
All URIs are relative to *https://vrchat.com/api/1*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@ -5,6 +5,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | |
**user_id** | Option<**String**> | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. | [optional]
**user_display_name** | Option<**String**> | | [optional]
**status** | [**crate::models::TransactionStatus**](TransactionStatus.md) | |
**subscription** | [**crate::models::Subscription**](Subscription.md) | |
**sandbox** | **bool** | | [default to false]
@ -13,6 +15,8 @@ Name | Type | Description | Notes
**steam** | Option<[**crate::models::TransactionSteamInfo**](TransactionSteamInfo.md)> | | [optional]
**agreement** | Option<[**crate::models::TransactionAgreement**](TransactionAgreement.md)> | | [optional]
**error** | **String** | |
**is_gift** | Option<**bool**> | | [optional][default to false]
**is_tokens** | Option<**bool**> | | [optional][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)

View File

@ -4,16 +4,19 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | |
**asset_url** | Option<**String**> | | [optional]
**asset_url_object** | Option<[**serde_json::Value**](.md)> | | [optional]
**asset_version** | **i32** | |
**created_at** | Option<**String**> | | [optional]
**id** | **String** | |
**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`. |
**plugin_url** | Option<**String**> | | [optional]
**plugin_url_object** | Option<[**serde_json::Value**](.md)> | | [optional]
**unity_sort_number** | Option<**i64**> | | [optional]
**unity_version** | **String** | | [default to 5.3.4p1]
**impostor_url** | Option<**String**> | | [optional]
**scan_status** | Option<**String**> | | [optional]
**variant** | 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)

View File

@ -13,6 +13,7 @@ Name | Type | Description | Notes
**release_status** | Option<[**crate::models::ReleaseStatus**](ReleaseStatus.md)> | | [optional]
**version** | Option<**f32**> | | [optional][default to 1]
**unity_package_url** | Option<**String**> | | [optional]
**unity_version** | Option<**String**> | | [optional][default to 5.3.4p1]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -12,6 +12,7 @@ Name | Type | Description | Notes
**status_description** | Option<**String**> | | [optional]
**bio** | Option<**String**> | | [optional]
**bio_links** | Option<**Vec<String>**> | | [optional]
**pronouns** | Option<**String**> | | [optional]
**user_icon** | Option<**String**> | MUST be a valid VRChat /file/ url. | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -5,10 +5,12 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**allow_avatar_copying** | **bool** | | [default to true]
**badges** | Option<[**Vec<crate::models::Badge>**](Badge.md)> | | [optional]
**bio** | **String** | |
**bio_links** | **Vec<String>** | |
**current_avatar_image_url** | **String** | When profilePicOverride is not empty, use it instead. |
**current_avatar_thumbnail_image_url** | **String** | When profilePicOverride is not empty, use it instead. |
**current_avatar_tags** | **Vec<String>** | |
**date_joined** | [**String**](string.md) | |
**developer_type** | [**crate::models::DeveloperType**](DeveloperType.md) | |
**display_name** | **String** | A users visual display name. This is what shows up in-game, and can different from their `username`. Changing display name is restricted to a cooldown period. |
@ -23,6 +25,7 @@ Name | Type | Description | Notes
**location** | Option<**String**> | WorldID be \"offline\" on User profiles if you are not friends with that user. | [optional]
**note** | Option<**String**> | | [optional]
**profile_pic_override** | **String** | |
**pronouns** | **String** | |
**state** | [**crate::models::UserState**](UserState.md) | |
**status** | [**crate::models::UserStatus**](UserStatus.md) | |
**status_description** | **String** | |

View File

@ -1,6 +1,6 @@
# \UsersApi
All URIs are relative to *https://api.vrchat.cloud/api/1*
All URIs are relative to *https://vrchat.com/api/1*
Method | HTTP request | Description
------------- | ------------- | -------------
@ -8,6 +8,7 @@ Method | HTTP request | Description
[**get_user_by_name**](UsersApi.md#get_user_by_name) | **GET** /users/{username}/name | Get User by Username
[**get_user_group_requests**](UsersApi.md#get_user_group_requests) | **GET** /users/{userId}/groups/requested | Get User Group Requests
[**get_user_groups**](UsersApi.md#get_user_groups) | **GET** /users/{userId}/groups | Get User Groups
[**get_user_represented_group**](UsersApi.md#get_user_represented_group) | **GET** /users/{userId}/groups/represented | Get user's current represented group
[**search_users**](UsersApi.md#search_users) | **GET** /users | Search All Users
[**update_user**](UsersApi.md#update_user) | **PUT** /users/{userId} | Update User Info
@ -105,7 +106,7 @@ Name | Type | Description | Required | Notes
## get_user_groups
> Vec<crate::models::Group> get_user_groups(user_id)
> Vec<crate::models::LimitedUserGroups> get_user_groups(user_id)
Get User Groups
Get user's public groups
@ -119,7 +120,37 @@ Name | Type | Description | Required | Notes
### Return type
[**Vec<crate::models::Group>**](Group.md)
[**Vec<crate::models::LimitedUserGroups>**](LimitedUserGroups.md)
### Authorization
[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_user_represented_group
> crate::models::RepresentedGroup get_user_represented_group(user_id)
Get user's current represented group
Returns the current group that the user is currently representing
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**user_id** | **String** | Must be a valid user ID. | [required] |
### Return type
[**crate::models::RepresentedGroup**](representedGroup.md)
### Authorization

View File

@ -18,7 +18,7 @@ Name | Type | Description | Notes
**instances** | Option<[**Vec<Vec<serde_json::Value>>**](array.md)> | Will always be an empty list when unauthenticated. | [optional]
**labs_publication_date** | **String** | |
**name** | **String** | |
**namespace** | **String** | |
**namespace** | Option<**String**> | | [optional]
**occupants** | Option<**i32**> | Will always be `0` when unauthenticated. | [optional][default to 0]
**organization** | **String** | | [default to vrchat]
**popularity** | **i32** | | [default to 0]
@ -33,6 +33,7 @@ Name | Type | Description | Notes
**updated_at** | **String** | |
**version** | **i32** | | [default to 0]
**visits** | **i32** | | [default to 0]
**udon_products** | Option<**Vec<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)

View File

@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**can_pubilsh** | **bool** | | [default to true]
**can_publish** | **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)

View File

@ -1,6 +1,6 @@
# \WorldsApi
All URIs are relative to *https://api.vrchat.cloud/api/1*
All URIs are relative to *https://vrchat.com/api/1*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@ -9,7 +9,7 @@
use reqwest;
use crate::apis::ResponseContent;
#[allow(unused_imports)] use crate::apis::ResponseContent;
use super::{Error, configuration};
@ -79,13 +79,9 @@ pub enum VerifyRecoveryCodeError {
/// Checks if a user by a given `username`, `displayName` or `email` exist. This is used during registration to check if a username has already been taken, during change of displayName to check if a displayName is available, and during change of email to check if the email is already used. In the later two cases the `excludeUserId` is used to exclude oneself, otherwise the result would always be true. It is **REQUIRED** to include **AT LEAST** `username`, `displayName` **or** `email` query parameter. Although they can be combined - in addition with `excludeUserId` (generally to exclude yourself) - to further fine-tune the search.
pub fn check_user_exists(configuration: &configuration::Configuration, email: Option<&str>, display_name: Option<&str>, user_id: Option<&str>, exclude_user_id: Option<&str>) -> Result<crate::models::UserExists, Error<CheckUserExistsError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/exists", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
pub async fn check_user_exists(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, email: Option<&str>, display_name: Option<&str>, user_id: Option<&str>, exclude_user_id: Option<&str>) -> Result<crate::models::UserExists, Error<CheckUserExistsError>> {
let local_var_uri_str = format!("{}/auth/exists", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_str) = email {
local_var_req_builder = local_var_req_builder.query(&[("email", &local_var_str.to_string())]);
@ -99,224 +95,58 @@ pub fn check_user_exists(configuration: &configuration::Configuration, email: Op
if let Some(ref local_var_str) = exclude_user_id {
local_var_req_builder = local_var_req_builder.query(&[("excludeUserId", &local_var_str.to_string())]);
}
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<CheckUserExistsError> = 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))
}
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Deletes the account with given ID. Normal users only have permission to delete their own account. Account deletion is 14 days from this request, and will be cancelled if you do an authenticated request with the account afterwards. **VRC+ NOTE:** Despite the 14-days cooldown, any VRC+ subscription will be cancelled **immediately**. **METHOD NOTE:** Despite this being a Delete action, the method type required is PUT.
pub fn delete_user(configuration: &configuration::Configuration, user_id: &str) -> Result<crate::models::CurrentUser, Error<DeleteUserError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/users/{userId}/delete", local_var_configuration.base_path, userId=crate::apis::urlencode(user_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<DeleteUserError> = 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))
}
pub async fn delete_user(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, user_id: &str) -> Result<crate::models::CurrentUser, Error<DeleteUserError>> {
let local_var_uri_str = format!("{}/users/{userId}/delete", configuration.base_path, userId=crate::apis::urlencode(user_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// This endpoint does the following two operations: 1) Checks if you are already logged in by looking for a valid `auth` cookie. If you are have a valid auth cookie then no additional auth-related actions are taken. If you are **not** logged in then it will log you in with the `Authorization` header and set the `auth` cookie. The `auth` cookie will only be sent once. 2) If logged in, this function will also return the CurrentUser object containing detailed information about the currently logged in user. The auth string after `Authorization: Basic {string}` is a base64-encoded string of the username and password, both individually url-encoded, and then joined with a colon. > base64(urlencode(username):urlencode(password)) **WARNING: Session Limit:** Each authentication with login credentials counts as a separate session, out of which you have a limited amount. Make sure to save and reuse the `auth` cookie if you are often restarting the program. The provided API libraries automatically save cookies during runtime, but does not persist during restart. While it can be fine to use username/password during development, expect in production to very fast run into the rate-limit and be temporarily blocked from making new sessions until older ones expire. The exact number of simultaneous sessions is unknown/undisclosed.
pub fn get_current_user(configuration: &configuration::Configuration, ) -> Result<crate::models::CurrentUser, Error<GetCurrentUserError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/user", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
if let Some(ref local_var_auth_conf) = local_var_configuration.basic_auth {
pub async fn get_current_user(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, ) -> Result<crate::models::EitherUserOrTwoFactor, Error<GetCurrentUserError>> {
let local_var_uri_str = format!("{}/auth/user", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_auth_conf) = configuration.basic_auth {
local_var_req_builder = local_var_req_builder.basic_auth(local_var_auth_conf.0.to_owned(), local_var_auth_conf.1.to_owned());
};
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<GetCurrentUserError> = 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))
}
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Invalidates the login session.
pub fn logout(configuration: &configuration::Configuration, ) -> Result<crate::models::Success, Error<LogoutError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/logout", local_var_configuration.base_path);
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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<LogoutError> = 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))
}
pub async fn logout(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, ) -> Result<crate::models::Success, Error<LogoutError>> {
let local_var_uri_str = format!("{}/logout", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Finishes the login sequence with a normal 2FA-generated code for accounts with 2FA-protection enabled.
pub fn verify2_fa(configuration: &configuration::Configuration, two_factor_auth_code: Option<crate::models::TwoFactorAuthCode>) -> Result<crate::models::Verify2FaResult, Error<Verify2FaError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/twofactorauth/totp/verify", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
local_var_req_builder = local_var_req_builder.json(&two_factor_auth_code);
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<Verify2FaError> = 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))
}
pub async fn verify2_fa(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, two_factor_auth_code: crate::models::TwoFactorAuthCode) -> Result<crate::models::Verify2FaResult, Error<Verify2FaError>> {
let local_var_uri_str = format!("{}/auth/twofactorauth/totp/verify", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::POST, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, Some(two_factor_auth_code)).await
}
/// Finishes the login sequence with an 2FA email code.
pub fn verify2_fa_email_code(configuration: &configuration::Configuration, two_factor_email_code: Option<crate::models::TwoFactorEmailCode>) -> Result<crate::models::Verify2FaEmailCodeResult, Error<Verify2FaEmailCodeError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/twofactorauth/emailotp/verify", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
local_var_req_builder = local_var_req_builder.json(&two_factor_email_code);
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<Verify2FaEmailCodeError> = 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))
}
pub async fn verify2_fa_email_code(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, two_factor_email_code: crate::models::TwoFactorEmailCode) -> Result<crate::models::Verify2FaEmailCodeResult, Error<Verify2FaEmailCodeError>> {
let local_var_uri_str = format!("{}/auth/twofactorauth/emailotp/verify", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::POST, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, Some(two_factor_email_code)).await
}
/// Verify whether the currently provided Auth Token is valid.
pub fn verify_auth_token(configuration: &configuration::Configuration, ) -> Result<crate::models::VerifyAuthTokenResult, Error<VerifyAuthTokenError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<VerifyAuthTokenError> = 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))
}
pub async fn verify_auth_token(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, ) -> Result<crate::models::VerifyAuthTokenResult, Error<VerifyAuthTokenError>> {
let local_var_uri_str = format!("{}/auth", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Finishes the login sequence with an OTP (One Time Password) recovery code for accounts with 2FA-protection enabled.
pub fn verify_recovery_code(configuration: &configuration::Configuration, two_factor_auth_code: Option<crate::models::TwoFactorAuthCode>) -> Result<crate::models::Verify2FaResult, Error<VerifyRecoveryCodeError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/twofactorauth/otp/verify", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
local_var_req_builder = local_var_req_builder.json(&two_factor_auth_code);
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<VerifyRecoveryCodeError> = 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))
}
pub async fn verify_recovery_code(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, two_factor_auth_code: crate::models::TwoFactorAuthCode) -> Result<crate::models::Verify2FaResult, Error<VerifyRecoveryCodeError>> {
let local_var_uri_str = format!("{}/auth/twofactorauth/otp/verify", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::POST, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, Some(two_factor_auth_code)).await
}

View File

@ -9,7 +9,7 @@
use reqwest;
use crate::apis::ResponseContent;
#[allow(unused_imports)] use crate::apis::ResponseContent;
use super::{Error, configuration};
@ -95,98 +95,30 @@ pub enum UpdateAvatarError {
/// Create an avatar. It's possible to optionally specify a ID if you want a custom one. Attempting to create an Avatar with an already claimed ID will result in a DB error.
pub fn create_avatar(configuration: &configuration::Configuration, create_avatar_request: Option<crate::models::CreateAvatarRequest>) -> Result<crate::models::Avatar, Error<CreateAvatarError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/avatars", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
local_var_req_builder = local_var_req_builder.json(&create_avatar_request);
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<CreateAvatarError> = 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))
}
pub async fn create_avatar(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, create_avatar_request: Option<crate::models::CreateAvatarRequest>) -> Result<crate::models::Avatar, Error<CreateAvatarError>> {
let local_var_uri_str = format!("{}/avatars", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::POST, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, Some(create_avatar_request)).await
}
/// Delete an avatar. Notice an avatar is never fully \"deleted\", only its ReleaseStatus is set to \"hidden\" and the linked Files are deleted. The AvatarID is permanently reserved.
pub fn delete_avatar(configuration: &configuration::Configuration, avatar_id: &str) -> Result<crate::models::Avatar, Error<DeleteAvatarError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/avatars/{avatarId}", local_var_configuration.base_path, avatarId=crate::apis::urlencode(avatar_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<DeleteAvatarError> = 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))
}
pub async fn delete_avatar(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, avatar_id: &str) -> Result<crate::models::Avatar, Error<DeleteAvatarError>> {
let local_var_uri_str = format!("{}/avatars/{avatarId}", configuration.base_path, avatarId=crate::apis::urlencode(avatar_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Get information about a specific Avatar.
pub fn get_avatar(configuration: &configuration::Configuration, avatar_id: &str) -> Result<crate::models::Avatar, Error<GetAvatarError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/avatars/{avatarId}", local_var_configuration.base_path, avatarId=crate::apis::urlencode(avatar_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetAvatarError> = 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))
}
pub async fn get_avatar(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, avatar_id: &str) -> Result<crate::models::Avatar, Error<GetAvatarError>> {
let local_var_uri_str = format!("{}/avatars/{avatarId}", configuration.base_path, avatarId=crate::apis::urlencode(avatar_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Search and list favorited avatars by query filters.
pub fn get_favorited_avatars(configuration: &configuration::Configuration, featured: Option<bool>, sort: Option<crate::models::SortOption>, n: Option<i32>, order: Option<crate::models::OrderOption>, offset: Option<i32>, search: Option<&str>, tag: Option<&str>, notag: Option<&str>, release_status: Option<crate::models::ReleaseStatus>, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>, user_id: Option<&str>) -> Result<Vec<crate::models::Avatar>, Error<GetFavoritedAvatarsError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/avatars/favorites", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
pub async fn get_favorited_avatars(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, featured: Option<bool>, sort: Option<crate::models::SortOption>, n: Option<i32>, order: Option<crate::models::OrderOption>, offset: Option<i32>, search: Option<&str>, tag: Option<&str>, notag: Option<&str>, release_status: Option<crate::models::ReleaseStatus>, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>, user_id: Option<&str>) -> Result<Vec<crate::models::Avatar>, Error<GetFavoritedAvatarsError>> {
let local_var_uri_str = format!("{}/avatars/favorites", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_str) = featured {
local_var_req_builder = local_var_req_builder.query(&[("featured", &local_var_str.to_string())]);
@ -227,61 +159,20 @@ pub fn get_favorited_avatars(configuration: &configuration::Configuration, featu
if let Some(ref local_var_str) = user_id {
local_var_req_builder = local_var_req_builder.query(&[("userId", &local_var_str.to_string())]);
}
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetFavoritedAvatarsError> = 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))
}
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Get the current avatar for the user. This will return an error for any other user than the one logged in.
pub fn get_own_avatar(configuration: &configuration::Configuration, user_id: &str) -> Result<crate::models::Avatar, Error<GetOwnAvatarError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/users/{userId}/avatar", local_var_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetOwnAvatarError> = 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))
}
pub async fn get_own_avatar(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, user_id: &str) -> Result<crate::models::Avatar, Error<GetOwnAvatarError>> {
let local_var_uri_str = format!("{}/users/{userId}/avatar", configuration.base_path, userId=crate::apis::urlencode(user_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Search and list avatars by query filters. You can only search your own or featured avatars. It is not possible as a normal user to search other peoples avatars.
pub fn search_avatars(configuration: &configuration::Configuration, featured: Option<bool>, sort: Option<crate::models::SortOption>, user: Option<&str>, user_id: Option<&str>, n: Option<i32>, order: Option<crate::models::OrderOption>, offset: Option<i32>, tag: Option<&str>, notag: Option<&str>, release_status: Option<crate::models::ReleaseStatus>, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>) -> Result<Vec<crate::models::Avatar>, Error<SearchAvatarsError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/avatars", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
pub async fn search_avatars(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, featured: Option<bool>, sort: Option<crate::models::SortOption>, user: Option<&str>, user_id: Option<&str>, n: Option<i32>, order: Option<crate::models::OrderOption>, offset: Option<i32>, tag: Option<&str>, notag: Option<&str>, release_status: Option<crate::models::ReleaseStatus>, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>) -> Result<Vec<crate::models::Avatar>, Error<SearchAvatarsError>> {
let local_var_uri_str = format!("{}/avatars", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_str) = featured {
local_var_req_builder = local_var_req_builder.query(&[("featured", &local_var_str.to_string())]);
@ -322,107 +213,27 @@ pub fn search_avatars(configuration: &configuration::Configuration, featured: Op
if let Some(ref local_var_str) = platform {
local_var_req_builder = local_var_req_builder.query(&[("platform", &local_var_str.to_string())]);
}
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<SearchAvatarsError> = 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))
}
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Switches into that avatar.
pub fn select_avatar(configuration: &configuration::Configuration, avatar_id: &str) -> Result<crate::models::CurrentUser, Error<SelectAvatarError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/avatars/{avatarId}/select", local_var_configuration.base_path, avatarId=crate::apis::urlencode(avatar_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<SelectAvatarError> = 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))
}
pub async fn select_avatar(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, avatar_id: &str) -> Result<crate::models::CurrentUser, Error<SelectAvatarError>> {
let local_var_uri_str = format!("{}/avatars/{avatarId}/select", configuration.base_path, avatarId=crate::apis::urlencode(avatar_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Switches into that avatar as your fallback avatar.
pub fn select_fallback_avatar(configuration: &configuration::Configuration, avatar_id: &str) -> Result<crate::models::CurrentUser, Error<SelectFallbackAvatarError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/avatars/{avatarId}/selectFallback", local_var_configuration.base_path, avatarId=crate::apis::urlencode(avatar_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<SelectFallbackAvatarError> = 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))
}
pub async fn select_fallback_avatar(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, avatar_id: &str) -> Result<crate::models::CurrentUser, Error<SelectFallbackAvatarError>> {
let local_var_uri_str = format!("{}/avatars/{avatarId}/selectFallback", configuration.base_path, avatarId=crate::apis::urlencode(avatar_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Update information about a specific avatar.
pub fn update_avatar(configuration: &configuration::Configuration, avatar_id: &str, update_avatar_request: Option<crate::models::UpdateAvatarRequest>) -> Result<crate::models::Avatar, Error<UpdateAvatarError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/avatars/{avatarId}", local_var_configuration.base_path, avatarId=crate::apis::urlencode(avatar_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
local_var_req_builder = local_var_req_builder.json(&update_avatar_request);
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<UpdateAvatarError> = 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))
}
pub async fn update_avatar(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, avatar_id: &str, update_avatar_request: Option<crate::models::UpdateAvatarRequest>) -> Result<crate::models::Avatar, Error<UpdateAvatarError>> {
let local_var_uri_str = format!("{}/avatars/{avatarId}", configuration.base_path, avatarId=crate::apis::urlencode(avatar_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, Some(update_avatar_request)).await
}

View File

@ -11,10 +11,10 @@ use reqwest;
#[derive(Debug, Clone)]
pub struct Configuration {
pub struct Configuration<T> {
pub base_path: String,
pub user_agent: Option<String>,
pub client: reqwest::Client,
pub client: T,
pub basic_auth: Option<BasicAuth>,
pub oauth_access_token: Option<String>,
pub bearer_access_token: Option<String>,
@ -31,18 +31,18 @@ pub struct ApiKey {
}
impl Configuration {
pub fn new() -> Configuration {
impl <T> Configuration<T> {
pub fn new() -> Configuration<std::sync::Arc<reqwest::Client>> {
Configuration::default()
}
}
impl Default for Configuration {
impl Default for Configuration<std::sync::Arc<reqwest::Client>> {
fn default() -> Self {
Configuration {
base_path: "https://api.vrchat.cloud/api/1".to_owned(),
base_path: "https://vrchat.com/api/1".to_owned(),
user_agent: Some("vrchatapi-rust".to_owned()),
client: reqwest::Client::builder().cookie_store(true).build().unwrap(),
client: std::sync::Arc::new(reqwest::Client::builder().cookie_store(true).build().unwrap()),
basic_auth: None,
oauth_access_token: None,
bearer_access_token: None,

View File

@ -9,7 +9,7 @@
use reqwest;
use crate::apis::ResponseContent;
#[allow(unused_imports)] use crate::apis::ResponseContent;
use super::{Error, configuration};
@ -55,142 +55,37 @@ pub enum GetSubscriptionsError {
/// Get a list of all current user subscriptions.
pub fn get_current_subscriptions(configuration: &configuration::Configuration, ) -> Result<Vec<crate::models::UserSubscription>, Error<GetCurrentSubscriptionsError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/user/subscription", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetCurrentSubscriptionsError> = 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))
}
pub async fn get_current_subscriptions(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, ) -> Result<Vec<crate::models::UserSubscription>, Error<GetCurrentSubscriptionsError>> {
let local_var_uri_str = format!("{}/auth/user/subscription", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Get a single License Group by given ID.
pub fn get_license_group(configuration: &configuration::Configuration, license_group_id: &str) -> Result<crate::models::LicenseGroup, Error<GetLicenseGroupError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/licenseGroups/{licenseGroupId}", local_var_configuration.base_path, licenseGroupId=crate::apis::urlencode(license_group_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetLicenseGroupError> = 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))
}
pub async fn get_license_group(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, license_group_id: &str) -> Result<crate::models::LicenseGroup, Error<GetLicenseGroupError>> {
let local_var_uri_str = format!("{}/licenseGroups/{licenseGroupId}", configuration.base_path, licenseGroupId=crate::apis::urlencode(license_group_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Get a single Steam transactions by ID. This returns the exact same information as `getSteamTransactions`, so no point in using this endpoint.
pub fn get_steam_transaction(configuration: &configuration::Configuration, transaction_id: &str) -> Result<crate::models::Transaction, Error<GetSteamTransactionError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/Steam/transactions/{transactionId}", local_var_configuration.base_path, transactionId=crate::apis::urlencode(transaction_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetSteamTransactionError> = 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))
}
pub async fn get_steam_transaction(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, transaction_id: &str) -> Result<crate::models::Transaction, Error<GetSteamTransactionError>> {
let local_var_uri_str = format!("{}/Steam/transactions/{transactionId}", configuration.base_path, transactionId=crate::apis::urlencode(transaction_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Get all own Steam transactions.
pub fn get_steam_transactions(configuration: &configuration::Configuration, ) -> Result<Vec<crate::models::Transaction>, Error<GetSteamTransactionsError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/Steam/transactions", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetSteamTransactionsError> = 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))
}
pub async fn get_steam_transactions(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, ) -> Result<Vec<crate::models::Transaction>, Error<GetSteamTransactionsError>> {
let local_var_uri_str = format!("{}/Steam/transactions", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// List all existing Subscriptions. For example, \"vrchatplus-monthly\" and \"vrchatplus-yearly\".
pub fn get_subscriptions(configuration: &configuration::Configuration, ) -> Result<Vec<crate::models::Subscription>, Error<GetSubscriptionsError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/subscriptions", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetSubscriptionsError> = 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))
}
pub async fn get_subscriptions(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, ) -> Result<Vec<crate::models::Subscription>, Error<GetSubscriptionsError>> {
let local_var_uri_str = format!("{}/subscriptions", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}

View File

@ -9,7 +9,7 @@
use reqwest;
use crate::apis::ResponseContent;
#[allow(unused_imports)] use crate::apis::ResponseContent;
use super::{Error, configuration};
@ -79,126 +79,37 @@ pub enum UpdateFavoriteGroupError {
/// Add a new favorite. Friend groups are named `group_0` through `group_3`. Avatar and World groups are named `avatars1` to `avatars4` and `worlds1` to `worlds4`. You cannot add people whom you are not friends with to your friends list. Destroying a friendship removes the person as favorite on both sides.
pub fn add_favorite(configuration: &configuration::Configuration, add_favorite_request: Option<crate::models::AddFavoriteRequest>) -> Result<crate::models::Favorite, Error<AddFavoriteError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/favorites", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
local_var_req_builder = local_var_req_builder.json(&add_favorite_request);
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<AddFavoriteError> = 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))
}
pub async fn add_favorite(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, add_favorite_request: Option<crate::models::AddFavoriteRequest>) -> Result<crate::models::Favorite, Error<AddFavoriteError>> {
let local_var_uri_str = format!("{}/favorites", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::POST, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, Some(add_favorite_request)).await
}
/// 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<crate::models::Success, Error<ClearFavoriteGroupError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId}", local_var_configuration.base_path, favoriteGroupType=crate::apis::urlencode(favorite_group_type), favoriteGroupName=crate::apis::urlencode(favorite_group_name), userId=crate::apis::urlencode(user_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<ClearFavoriteGroupError> = 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))
}
pub async fn clear_favorite_group(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, favorite_group_type: &str, favorite_group_name: &str, user_id: &str) -> Result<crate::models::Success, Error<ClearFavoriteGroupError>> {
let local_var_uri_str = format!("{}/favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId}", configuration.base_path, favoriteGroupType=crate::apis::urlencode(favorite_group_type), favoriteGroupName=crate::apis::urlencode(favorite_group_name), userId=crate::apis::urlencode(user_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Return information about a specific Favorite.
pub fn get_favorite(configuration: &configuration::Configuration, favorite_id: &str) -> Result<crate::models::Favorite, Error<GetFavoriteError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/favorites/{favoriteId}", local_var_configuration.base_path, favoriteId=crate::apis::urlencode(favorite_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetFavoriteError> = 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))
}
pub async fn get_favorite(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, favorite_id: &str) -> Result<crate::models::Favorite, Error<GetFavoriteError>> {
let local_var_uri_str = format!("{}/favorites/{favoriteId}", configuration.base_path, favoriteId=crate::apis::urlencode(favorite_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Fetch information about a specific favorite group.
pub fn get_favorite_group(configuration: &configuration::Configuration, favorite_group_type: &str, favorite_group_name: &str, user_id: &str) -> Result<crate::models::FavoriteGroup, Error<GetFavoriteGroupError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId}", local_var_configuration.base_path, favoriteGroupType=crate::apis::urlencode(favorite_group_type), favoriteGroupName=crate::apis::urlencode(favorite_group_name), 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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetFavoriteGroupError> = 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))
}
pub async fn get_favorite_group(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, favorite_group_type: &str, favorite_group_name: &str, user_id: &str) -> Result<crate::models::FavoriteGroup, Error<GetFavoriteGroupError>> {
let local_var_uri_str = format!("{}/favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId}", configuration.base_path, favoriteGroupType=crate::apis::urlencode(favorite_group_type), favoriteGroupName=crate::apis::urlencode(favorite_group_name), userId=crate::apis::urlencode(user_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Return a list of favorite groups owned by a user. Returns the same information as `getFavoriteGroups`.
pub fn get_favorite_groups(configuration: &configuration::Configuration, n: Option<i32>, offset: Option<i32>, owner_id: Option<&str>) -> Result<Vec<crate::models::FavoriteGroup>, Error<GetFavoriteGroupsError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/favorite/groups", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
pub async fn get_favorite_groups(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, n: Option<i32>, offset: Option<i32>, owner_id: Option<&str>) -> Result<Vec<crate::models::FavoriteGroup>, Error<GetFavoriteGroupsError>> {
let local_var_uri_str = format!("{}/favorite/groups", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_str) = n {
local_var_req_builder = local_var_req_builder.query(&[("n", &local_var_str.to_string())]);
@ -209,33 +120,13 @@ pub fn get_favorite_groups(configuration: &configuration::Configuration, n: Opti
if let Some(ref local_var_str) = owner_id {
local_var_req_builder = local_var_req_builder.query(&[("ownerId", &local_var_str.to_string())]);
}
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetFavoriteGroupsError> = 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))
}
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Returns a list of favorites.
pub fn get_favorites(configuration: &configuration::Configuration, n: Option<i32>, offset: Option<i32>, r#type: Option<&str>, tag: Option<&str>) -> Result<Vec<crate::models::Favorite>, Error<GetFavoritesError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/favorites", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
pub async fn get_favorites(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, n: Option<i32>, offset: Option<i32>, r#type: Option<&str>, tag: Option<&str>) -> Result<Vec<crate::models::Favorite>, Error<GetFavoritesError>> {
let local_var_uri_str = format!("{}/favorites", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_str) = n {
local_var_req_builder = local_var_req_builder.query(&[("n", &local_var_str.to_string())]);
@ -249,79 +140,20 @@ pub fn get_favorites(configuration: &configuration::Configuration, n: Option<i32
if let Some(ref local_var_str) = tag {
local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
}
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetFavoritesError> = 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))
}
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Remove a favorite from your favorites list.
pub fn remove_favorite(configuration: &configuration::Configuration, favorite_id: &str) -> Result<crate::models::Success, Error<RemoveFavoriteError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/favorites/{favoriteId}", local_var_configuration.base_path, favoriteId=crate::apis::urlencode(favorite_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<RemoveFavoriteError> = 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))
}
pub async fn remove_favorite(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, favorite_id: &str) -> Result<crate::models::Success, Error<RemoveFavoriteError>> {
let local_var_uri_str = format!("{}/favorites/{favoriteId}", configuration.base_path, favoriteId=crate::apis::urlencode(favorite_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Update information about a specific favorite group.
pub fn update_favorite_group(configuration: &configuration::Configuration, favorite_group_type: &str, favorite_group_name: &str, user_id: &str, update_favorite_group_request: Option<crate::models::UpdateFavoriteGroupRequest>) -> Result<(), Error<UpdateFavoriteGroupError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId}", local_var_configuration.base_path, favoriteGroupType=crate::apis::urlencode(favorite_group_type), favoriteGroupName=crate::apis::urlencode(favorite_group_name), userId=crate::apis::urlencode(user_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
local_var_req_builder = local_var_req_builder.json(&update_favorite_group_request);
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
Ok(())
} else {
let local_var_entity: Option<UpdateFavoriteGroupError> = 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))
}
pub async fn update_favorite_group(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, favorite_group_type: &str, favorite_group_name: &str, user_id: &str, update_favorite_group_request: Option<crate::models::UpdateFavoriteGroupRequest>) -> Result<(), Error<UpdateFavoriteGroupError>> {
let local_var_uri_str = format!("{}/favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId}", configuration.base_path, favoriteGroupType=crate::apis::urlencode(favorite_group_type), favoriteGroupName=crate::apis::urlencode(favorite_group_name), userId=crate::apis::urlencode(user_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
crate::request_ok(configuration, local_var_req_builder, Some(update_favorite_group_request)).await
}

View File

@ -9,7 +9,7 @@
use reqwest;
use crate::apis::ResponseContent;
#[allow(unused_imports)] use crate::apis::ResponseContent;
use super::{Error, configuration};
@ -90,240 +90,65 @@ pub enum StartFileDataUploadError {
/// Creates a new File object
pub fn create_file(configuration: &configuration::Configuration, create_file_request: Option<crate::models::CreateFileRequest>) -> Result<crate::models::File, Error<CreateFileError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/file", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
local_var_req_builder = local_var_req_builder.json(&create_file_request);
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<CreateFileError> = 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))
}
pub async fn create_file(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, create_file_request: Option<crate::models::CreateFileRequest>) -> Result<crate::models::File, Error<CreateFileError>> {
let local_var_uri_str = format!("{}/file", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::POST, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, Some(create_file_request)).await
}
/// Creates a new FileVersion. Once a Version has been created, proceed to the `/file/{fileId}/{versionId}/file/start` endpoint to start a file upload.
pub fn create_file_version(configuration: &configuration::Configuration, file_id: &str, create_file_version_request: Option<crate::models::CreateFileVersionRequest>) -> Result<crate::models::File, Error<CreateFileVersionError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/file/{fileId}", local_var_configuration.base_path, fileId=crate::apis::urlencode(file_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
local_var_req_builder = local_var_req_builder.json(&create_file_version_request);
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<CreateFileVersionError> = 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))
}
pub async fn create_file_version(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, file_id: &str, create_file_version_request: Option<crate::models::CreateFileVersionRequest>) -> Result<crate::models::File, Error<CreateFileVersionError>> {
let local_var_uri_str = format!("{}/file/{fileId}", configuration.base_path, fileId=crate::apis::urlencode(file_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::POST, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, Some(create_file_version_request)).await
}
/// Deletes a File object.
pub fn delete_file(configuration: &configuration::Configuration, file_id: &str) -> Result<crate::models::Success, Error<DeleteFileError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/file/{fileId}", local_var_configuration.base_path, fileId=crate::apis::urlencode(file_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<DeleteFileError> = 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))
}
pub async fn delete_file(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, file_id: &str) -> Result<crate::models::Success, Error<DeleteFileError>> {
let local_var_uri_str = format!("{}/file/{fileId}", configuration.base_path, fileId=crate::apis::urlencode(file_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Delete a specific version of a file. You can only delete the latest version.
pub fn delete_file_version(configuration: &configuration::Configuration, file_id: &str, version_id: i32) -> Result<crate::models::File, Error<DeleteFileVersionError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/file/{fileId}/{versionId}", local_var_configuration.base_path, fileId=crate::apis::urlencode(file_id), versionId=version_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<DeleteFileVersionError> = 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))
}
pub async fn delete_file_version(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, file_id: &str, version_id: i32) -> Result<crate::models::File, Error<DeleteFileVersionError>> {
let local_var_uri_str = format!("{}/file/{fileId}/{versionId}", configuration.base_path, fileId=crate::apis::urlencode(file_id), versionId=version_id);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Downloads the file with the provided version number. **Version Note:** Version 0 is always when the file was created. The real data is usually always located in version 1 and up. **Extension Note:** Files are not guaranteed to have a file extensions. UnityPackage files tends to have it, images through this endpoint do not. You are responsible for appending file extension from the `extension` field when neccesary.
pub fn download_file_version(configuration: &configuration::Configuration, file_id: &str, version_id: i32) -> Result<(), Error<DownloadFileVersionError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/file/{fileId}/{versionId}", local_var_configuration.base_path, fileId=crate::apis::urlencode(file_id), versionId=version_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
Ok(())
} else {
let local_var_entity: Option<DownloadFileVersionError> = 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))
}
pub async fn download_file_version(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, file_id: &str, version_id: i32) -> Result<(), Error<DownloadFileVersionError>> {
let local_var_uri_str = format!("{}/file/{fileId}/{versionId}", configuration.base_path, fileId=crate::apis::urlencode(file_id), versionId=version_id);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request_ok(configuration, local_var_req_builder, None::<()>).await
}
/// Finish an upload of a FileData. This will mark it as \"complete\". After uploading the `file` for Avatars and Worlds you then have to upload a `signature` file.
pub fn finish_file_data_upload(configuration: &configuration::Configuration, file_id: &str, version_id: i32, file_type: &str, finish_file_data_upload_request: Option<crate::models::FinishFileDataUploadRequest>) -> Result<crate::models::File, Error<FinishFileDataUploadError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/file/{fileId}/{versionId}/{fileType}/finish", local_var_configuration.base_path, fileId=crate::apis::urlencode(file_id), versionId=version_id, fileType=crate::apis::urlencode(file_type));
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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
local_var_req_builder = local_var_req_builder.json(&finish_file_data_upload_request);
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<FinishFileDataUploadError> = 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))
}
pub async fn finish_file_data_upload(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, file_id: &str, version_id: i32, file_type: &str, finish_file_data_upload_request: Option<crate::models::FinishFileDataUploadRequest>) -> Result<crate::models::File, Error<FinishFileDataUploadError>> {
let local_var_uri_str = format!("{}/file/{fileId}/{versionId}/{fileType}/finish", configuration.base_path, fileId=crate::apis::urlencode(file_id), versionId=version_id, fileType=crate::apis::urlencode(file_type));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, Some(finish_file_data_upload_request)).await
}
/// Shows general information about the \"File\" object. Each File can have several \"Version\"'s, and each Version can have multiple real files or \"Data\" blobs.
pub fn get_file(configuration: &configuration::Configuration, file_id: &str) -> Result<crate::models::File, Error<GetFileError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/file/{fileId}", local_var_configuration.base_path, fileId=crate::apis::urlencode(file_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetFileError> = 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))
}
pub async fn get_file(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, file_id: &str) -> Result<crate::models::File, Error<GetFileError>> {
let local_var_uri_str = format!("{}/file/{fileId}", configuration.base_path, fileId=crate::apis::urlencode(file_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// 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<crate::models::FileVersionUploadStatus, Error<GetFileDataUploadStatusError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/file/{fileId}/{versionId}/{fileType}/status", local_var_configuration.base_path, fileId=crate::apis::urlencode(file_id), versionId=version_id, fileType=crate::apis::urlencode(file_type));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetFileDataUploadStatusError> = 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))
}
pub async fn get_file_data_upload_status(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, file_id: &str, version_id: i32, file_type: &str) -> Result<crate::models::FileVersionUploadStatus, Error<GetFileDataUploadStatusError>> {
let local_var_uri_str = format!("{}/file/{fileId}/{versionId}/{fileType}/status", configuration.base_path, fileId=crate::apis::urlencode(file_id), versionId=version_id, fileType=crate::apis::urlencode(file_type));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Returns a list of files
pub fn get_files(configuration: &configuration::Configuration, tag: Option<&str>, user_id: Option<&str>, n: Option<i32>, offset: Option<i32>) -> Result<Vec<crate::models::File>, Error<GetFilesError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/files", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
pub async fn get_files(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, tag: Option<&str>, user_id: Option<&str>, n: Option<i32>, offset: Option<i32>) -> Result<Vec<crate::models::File>, Error<GetFilesError>> {
let local_var_uri_str = format!("{}/files", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_str) = tag {
local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
@ -337,53 +162,17 @@ pub fn get_files(configuration: &configuration::Configuration, tag: Option<&str>
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_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetFilesError> = 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))
}
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// 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: Option<i32>) -> Result<crate::models::FileUploadUrl, Error<StartFileDataUploadError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/file/{fileId}/{versionId}/{fileType}/start", local_var_configuration.base_path, fileId=crate::apis::urlencode(file_id), versionId=version_id, fileType=crate::apis::urlencode(file_type));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
pub async fn start_file_data_upload(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, file_id: &str, version_id: i32, file_type: &str, part_number: Option<i32>) -> Result<crate::models::FileUploadUrl, Error<StartFileDataUploadError>> {
let local_var_uri_str = format!("{}/file/{fileId}/{versionId}/{fileType}/start", configuration.base_path, fileId=crate::apis::urlencode(file_id), versionId=version_id, fileType=crate::apis::urlencode(file_type));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
if let Some(ref local_var_str) = part_number {
local_var_req_builder = local_var_req_builder.query(&[("partNumber", &local_var_str.to_string())]);
}
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<StartFileDataUploadError> = 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))
}
crate::request(configuration, local_var_req_builder, None::<()>).await
}

View File

@ -9,7 +9,7 @@
use reqwest;
use crate::apis::ResponseContent;
#[allow(unused_imports)] use crate::apis::ResponseContent;
use super::{Error, configuration};
@ -26,6 +26,7 @@ pub enum DeleteFriendRequestError {
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum FriendError {
Status400(crate::models::Error),
Status401(crate::models::Error),
Status404(crate::models::Error),
UnknownValue(serde_json::Value),
@ -58,97 +59,30 @@ pub enum UnfriendError {
/// Deletes an outgoing pending friend request to another user. To delete an incoming friend request, use the `deleteNotification` endpoint instead.
pub fn delete_friend_request(configuration: &configuration::Configuration, user_id: &str) -> Result<crate::models::Success, Error<DeleteFriendRequestError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/user/{userId}/friendRequest", local_var_configuration.base_path, userId=crate::apis::urlencode(user_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<DeleteFriendRequestError> = 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))
}
pub async fn delete_friend_request(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, user_id: &str) -> Result<crate::models::Success, Error<DeleteFriendRequestError>> {
let local_var_uri_str = format!("{}/user/{userId}/friendRequest", configuration.base_path, userId=crate::apis::urlencode(user_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Send a friend request to another user.
pub fn friend(configuration: &configuration::Configuration, user_id: &str) -> Result<crate::models::Notification, Error<FriendError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/user/{userId}/friendRequest", local_var_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<FriendError> = 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))
}
pub async fn friend(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, user_id: &str) -> Result<crate::models::Notification, Error<FriendError>> {
let local_var_uri_str = format!("{}/user/{userId}/friendRequest", configuration.base_path, userId=crate::apis::urlencode(user_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::POST, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// 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<crate::models::FriendStatus, Error<GetFriendStatusError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/user/{userId}/friendStatus", local_var_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetFriendStatusError> = 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))
}
pub async fn get_friend_status(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, user_id: &str) -> Result<crate::models::FriendStatus, Error<GetFriendStatusError>> {
let local_var_uri_str = format!("{}/user/{userId}/friendStatus", configuration.base_path, userId=crate::apis::urlencode(user_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// List information about friends.
pub fn get_friends(configuration: &configuration::Configuration, offset: Option<i32>, n: Option<i32>, offline: Option<bool>) -> Result<Vec<crate::models::LimitedUser>, Error<GetFriendsError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/user/friends", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
pub async fn get_friends(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, offset: Option<i32>, n: Option<i32>, offline: Option<bool>) -> Result<Vec<crate::models::LimitedUser>, Error<GetFriendsError>> {
let local_var_uri_str = format!("{}/auth/user/friends", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_str) = offset {
local_var_req_builder = local_var_req_builder.query(&[("offset", &local_var_str.to_string())]);
@ -159,50 +93,13 @@ pub fn get_friends(configuration: &configuration::Configuration, offset: Option<
if let Some(ref local_var_str) = offline {
local_var_req_builder = local_var_req_builder.query(&[("offline", &local_var_str.to_string())]);
}
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetFriendsError> = 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))
}
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Unfriend a user by ID.
pub fn unfriend(configuration: &configuration::Configuration, user_id: &str) -> Result<crate::models::Success, Error<UnfriendError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/user/friends/{userId}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<UnfriendError> = 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))
}
pub async fn unfriend(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, user_id: &str) -> Result<crate::models::Success, Error<UnfriendError>> {
let local_var_uri_str = format!("{}/auth/user/friends/{userId}", configuration.base_path, userId=crate::apis::urlencode(user_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}

File diff suppressed because it is too large Load Diff

View File

@ -9,10 +9,28 @@
use reqwest;
use crate::apis::ResponseContent;
#[allow(unused_imports)] use crate::apis::ResponseContent;
use super::{Error, configuration};
/// struct for typed errors of method [`close_instance`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CloseInstanceError {
Status401(crate::models::Error),
Status403(crate::models::Error),
Status404(crate::models::Error),
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`create_instance`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreateInstanceError {
Status401(crate::models::Error),
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_instance`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
@ -47,115 +65,52 @@ pub enum SendSelfInviteError {
}
/// Close an instance or update the closedAt time when it will be closed. You can only close an instance if the ownerId is yourself or if the instance owner is a group and you have the `group-instance-moderate` permission.
pub async fn close_instance(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, world_id: &str, instance_id: &str, hard_close: Option<bool>, closed_at: Option<String>) -> Result<crate::models::Instance, Error<CloseInstanceError>> {
let local_var_uri_str = format!("{}/instances/{worldId}:{instanceId}", configuration.base_path, worldId=crate::apis::urlencode(world_id), instanceId=crate::apis::urlencode(instance_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
if let Some(ref local_var_str) = hard_close {
local_var_req_builder = local_var_req_builder.query(&[("hardClose", &local_var_str.to_string())]);
}
if let Some(ref local_var_str) = closed_at {
local_var_req_builder = local_var_req_builder.query(&[("closedAt", &local_var_str.to_string())]);
}
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Create an instance
pub async fn create_instance(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, create_instance_request: crate::models::CreateInstanceRequest) -> Result<crate::models::Instance, Error<CreateInstanceError>> {
let local_var_uri_str = format!("{}/instances", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::POST, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, Some(create_instance_request)).await
}
/// Returns an instance. Please read [Instances Tutorial](https://vrchatapi.github.io/tutorials/instances/) for more information on Instances. If an invalid instanceId is provided, this endpoint will simply return \"null\"!
pub fn get_instance(configuration: &configuration::Configuration, world_id: &str, instance_id: &str) -> Result<crate::models::Instance, Error<GetInstanceError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/instances/{worldId}:{instanceId}", local_var_configuration.base_path, worldId=crate::apis::urlencode(world_id), instanceId=crate::apis::urlencode(instance_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetInstanceError> = 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))
}
pub async fn get_instance(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, world_id: &str, instance_id: &str) -> Result<crate::models::Instance, Error<GetInstanceError>> {
let local_var_uri_str = format!("{}/instances/{worldId}:{instanceId}", configuration.base_path, worldId=crate::apis::urlencode(world_id), instanceId=crate::apis::urlencode(instance_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Returns an instance. Please read [Instances Tutorial](https://vrchatapi.github.io/tutorials/instances/) for more information on Instances.
pub fn get_instance_by_short_name(configuration: &configuration::Configuration, short_name: &str) -> Result<crate::models::Instance, Error<GetInstanceByShortNameError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/instances/s/{shortName}", local_var_configuration.base_path, shortName=crate::apis::urlencode(short_name));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetInstanceByShortNameError> = 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))
}
pub async fn get_instance_by_short_name(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, short_name: &str) -> Result<crate::models::Instance, Error<GetInstanceByShortNameError>> {
let local_var_uri_str = format!("{}/instances/s/{shortName}", configuration.base_path, shortName=crate::apis::urlencode(short_name));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Returns an instance short name.
pub fn get_short_name(configuration: &configuration::Configuration, world_id: &str, instance_id: &str) -> Result<crate::models::InstanceShortNameResponse, Error<GetShortNameError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/instances/{worldId}:{instanceId}/shortName", local_var_configuration.base_path, worldId=crate::apis::urlencode(world_id), instanceId=crate::apis::urlencode(instance_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetShortNameError> = 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))
}
pub async fn get_short_name(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, world_id: &str, instance_id: &str) -> Result<crate::models::InstanceShortNameResponse, Error<GetShortNameError>> {
let local_var_uri_str = format!("{}/instances/{worldId}:{instanceId}/shortName", configuration.base_path, worldId=crate::apis::urlencode(world_id), instanceId=crate::apis::urlencode(instance_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Sends an invite to the instance to yourself.
pub fn send_self_invite(configuration: &configuration::Configuration, world_id: &str, instance_id: &str) -> Result<crate::models::Success, Error<SendSelfInviteError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/instances/{worldId}:{instanceId}/invite", local_var_configuration.base_path, worldId=crate::apis::urlencode(world_id), instanceId=crate::apis::urlencode(instance_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
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<SendSelfInviteError> = 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))
}
pub async fn send_self_invite(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, world_id: &str, instance_id: &str) -> Result<crate::models::Success, Error<SendSelfInviteError>> {
let local_var_uri_str = format!("{}/instances/{worldId}:{instanceId}/invite", configuration.base_path, worldId=crate::apis::urlencode(world_id), instanceId=crate::apis::urlencode(instance_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::POST, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}

View File

@ -9,7 +9,7 @@
use reqwest;
use crate::apis::ResponseContent;
#[allow(unused_imports)] use crate::apis::ResponseContent;
use super::{Error, configuration};
@ -88,230 +88,58 @@ pub enum UpdateInviteMessageError {
/// 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! Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite
pub fn get_invite_message(configuration: &configuration::Configuration, user_id: &str, message_type: crate::models::InviteMessageType, slot: i32) -> Result<crate::models::InviteMessage, Error<GetInviteMessageError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/message/{userId}/{messageType}/{slot}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id), messageType=message_type, slot=slot);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetInviteMessageError> = 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))
}
pub async fn get_invite_message(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, user_id: &str, message_type: crate::models::InviteMessageType, slot: i32) -> Result<crate::models::InviteMessage, Error<GetInviteMessageError>> {
let local_var_uri_str = format!("{}/message/{userId}/{messageType}/{slot}", configuration.base_path, userId=crate::apis::urlencode(user_id), messageType=message_type, slot=slot);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Returns a list of all the users Invite Messages. Admin Credentials are required to view messages of other users! Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite
pub fn get_invite_messages(configuration: &configuration::Configuration, user_id: &str, message_type: crate::models::InviteMessageType) -> Result<Vec<crate::models::InviteMessage>, Error<GetInviteMessagesError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/message/{userId}/{messageType}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id), messageType=message_type);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetInviteMessagesError> = 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))
}
pub async fn get_invite_messages(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, user_id: &str, message_type: crate::models::InviteMessageType) -> Result<Vec<crate::models::InviteMessage>, Error<GetInviteMessagesError>> {
let local_var_uri_str = format!("{}/message/{userId}/{messageType}", configuration.base_path, userId=crate::apis::urlencode(user_id), messageType=message_type);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Sends self an invite to an instance
pub fn invite_myself_to(configuration: &configuration::Configuration, world_id: &str, instance_id: &str) -> Result<crate::models::SentNotification, Error<InviteMyselfToError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/invite/myself/to/{worldId}:{instanceId}", local_var_configuration.base_path, worldId=crate::apis::urlencode(world_id), instanceId=crate::apis::urlencode(instance_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
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<InviteMyselfToError> = 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))
}
pub async fn invite_myself_to(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, world_id: &str, instance_id: &str) -> Result<crate::models::SentNotification, Error<InviteMyselfToError>> {
let local_var_uri_str = format!("{}/invite/myself/to/{worldId}:{instanceId}", configuration.base_path, worldId=crate::apis::urlencode(world_id), instanceId=crate::apis::urlencode(instance_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::POST, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Sends an invite to a user. Returns the Notification of type `invite` that was sent.
pub fn invite_user(configuration: &configuration::Configuration, user_id: &str, invite_request: Option<crate::models::InviteRequest>) -> Result<crate::models::SentNotification, Error<InviteUserError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/invite/{userId}", local_var_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
local_var_req_builder = local_var_req_builder.json(&invite_request);
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<InviteUserError> = 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))
}
pub async fn invite_user(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, user_id: &str, invite_request: crate::models::InviteRequest) -> Result<crate::models::SentNotification, Error<InviteUserError>> {
let local_var_uri_str = format!("{}/invite/{userId}", configuration.base_path, userId=crate::apis::urlencode(user_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::POST, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, Some(invite_request)).await
}
/// 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, request_invite_request: Option<crate::models::RequestInviteRequest>) -> Result<crate::models::Notification, Error<RequestInviteError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/requestInvite/{userId}", local_var_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
local_var_req_builder = local_var_req_builder.json(&request_invite_request);
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<RequestInviteError> = 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))
}
pub async fn request_invite(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, user_id: &str, request_invite_request: Option<crate::models::RequestInviteRequest>) -> Result<crate::models::Notification, Error<RequestInviteError>> {
let local_var_uri_str = format!("{}/requestInvite/{userId}", configuration.base_path, userId=crate::apis::urlencode(user_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::POST, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, Some(request_invite_request)).await
}
/// Resets a single Invite Message back to its 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, so it is not possible to reset within the 60 minutes countdown. Resetting it does however 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\". Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite The DELETE endpoint does not have/require any request body.
pub fn reset_invite_message(configuration: &configuration::Configuration, user_id: &str, message_type: crate::models::InviteMessageType, slot: i32) -> Result<Vec<crate::models::InviteMessage>, Error<ResetInviteMessageError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/message/{userId}/{messageType}/{slot}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id), messageType=message_type, slot=slot);
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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<ResetInviteMessageError> = 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))
}
pub async fn reset_invite_message(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, user_id: &str, message_type: crate::models::InviteMessageType, slot: i32) -> Result<Vec<crate::models::InviteMessage>, Error<ResetInviteMessageError>> {
let local_var_uri_str = format!("{}/message/{userId}/{messageType}/{slot}", configuration.base_path, userId=crate::apis::urlencode(user_id), messageType=message_type, slot=slot);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Respond to an invite request by sending a world invite to the requesting user. `:notificationId` is the ID of the requesting notification.
pub fn respond_invite(configuration: &configuration::Configuration, notification_id: &str, invite_response: Option<crate::models::InviteResponse>) -> Result<crate::models::Notification, Error<RespondInviteError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/invite/{notificationId}/response", local_var_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
local_var_req_builder = local_var_req_builder.json(&invite_response);
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<RespondInviteError> = 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))
}
pub async fn respond_invite(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, notification_id: &str, invite_response: crate::models::InviteResponse) -> Result<crate::models::Notification, Error<RespondInviteError>> {
let local_var_uri_str = format!("{}/invite/{notificationId}/response", configuration.base_path, notificationId=crate::apis::urlencode(notification_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::POST, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, Some(invite_response)).await
}
/// 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\". Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite
pub fn update_invite_message(configuration: &configuration::Configuration, user_id: &str, message_type: crate::models::InviteMessageType, slot: i32, update_invite_message_request: Option<crate::models::UpdateInviteMessageRequest>) -> Result<Vec<crate::models::InviteMessage>, Error<UpdateInviteMessageError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/message/{userId}/{messageType}/{slot}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id), messageType=message_type, slot=slot);
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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
local_var_req_builder = local_var_req_builder.json(&update_invite_message_request);
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<UpdateInviteMessageError> = 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))
}
pub async fn update_invite_message(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, user_id: &str, message_type: crate::models::InviteMessageType, slot: i32, update_invite_message_request: Option<crate::models::UpdateInviteMessageRequest>) -> Result<Vec<crate::models::InviteMessage>, Error<UpdateInviteMessageError>> {
let local_var_uri_str = format!("{}/message/{userId}/{messageType}/{slot}", configuration.base_path, userId=crate::apis::urlencode(user_id), messageType=message_type, slot=slot);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, Some(update_invite_message_request)).await
}

View File

@ -9,7 +9,7 @@
use reqwest;
use crate::apis::ResponseContent;
#[allow(unused_imports)] use crate::apis::ResponseContent;
use super::{Error, configuration};
@ -56,97 +56,30 @@ pub enum MarkNotificationAsReadError {
/// Accept a friend request by notification `frq_` ID. Friend requests can be found using the NotificationsAPI `getNotifications` by filtering of type `friendRequest`.
pub fn accept_friend_request(configuration: &configuration::Configuration, notification_id: &str) -> Result<crate::models::Success, Error<AcceptFriendRequestError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/user/notifications/{notificationId}/accept", local_var_configuration.base_path, notificationId=crate::apis::urlencode(notification_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<AcceptFriendRequestError> = 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))
}
pub async fn accept_friend_request(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, notification_id: &str) -> Result<crate::models::Success, Error<AcceptFriendRequestError>> {
let local_var_uri_str = format!("{}/auth/user/notifications/{notificationId}/accept", configuration.base_path, notificationId=crate::apis::urlencode(notification_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Clear **all** notifications.
pub fn clear_notifications(configuration: &configuration::Configuration, ) -> Result<crate::models::Success, Error<ClearNotificationsError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/user/notifications/clear", local_var_configuration.base_path);
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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<ClearNotificationsError> = 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))
}
pub async fn clear_notifications(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, ) -> Result<crate::models::Success, Error<ClearNotificationsError>> {
let local_var_uri_str = format!("{}/auth/user/notifications/clear", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Delete a notification.
pub fn delete_notification(configuration: &configuration::Configuration, notification_id: &str) -> Result<crate::models::Notification, Error<DeleteNotificationError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/user/notifications/{notificationId}/hide", local_var_configuration.base_path, notificationId=crate::apis::urlencode(notification_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<DeleteNotificationError> = 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))
}
pub async fn delete_notification(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, notification_id: &str) -> Result<crate::models::Notification, Error<DeleteNotificationError>> {
let local_var_uri_str = format!("{}/auth/user/notifications/{notificationId}/hide", configuration.base_path, notificationId=crate::apis::urlencode(notification_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Retrieve all of the current user's notifications.
pub fn get_notifications(configuration: &configuration::Configuration, r#type: Option<&str>, sent: Option<bool>, hidden: Option<bool>, after: Option<&str>, n: Option<i32>, offset: Option<i32>) -> Result<Vec<crate::models::Notification>, Error<GetNotificationsError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/user/notifications", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
pub async fn get_notifications(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, r#type: Option<&str>, sent: Option<bool>, hidden: Option<bool>, after: Option<&str>, n: Option<i32>, offset: Option<i32>) -> Result<Vec<crate::models::Notification>, Error<GetNotificationsError>> {
let local_var_uri_str = format!("{}/auth/user/notifications", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_str) = r#type {
local_var_req_builder = local_var_req_builder.query(&[("type", &local_var_str.to_string())]);
@ -166,50 +99,13 @@ pub fn get_notifications(configuration: &configuration::Configuration, r#type: O
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_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetNotificationsError> = 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))
}
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Mark a notification as seen.
pub fn mark_notification_as_read(configuration: &configuration::Configuration, notification_id: &str) -> Result<crate::models::Notification, Error<MarkNotificationAsReadError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/user/notifications/{notificationId}/see", local_var_configuration.base_path, notificationId=crate::apis::urlencode(notification_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<MarkNotificationAsReadError> = 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))
}
pub async fn mark_notification_as_read(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, notification_id: &str) -> Result<crate::models::Notification, Error<MarkNotificationAsReadError>> {
let local_var_uri_str = format!("{}/auth/user/notifications/{notificationId}/see", configuration.base_path, notificationId=crate::apis::urlencode(notification_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}

View File

@ -9,7 +9,7 @@
use reqwest;
use crate::apis::ResponseContent;
#[allow(unused_imports)] use crate::apis::ResponseContent;
use super::{Error, configuration};
@ -31,58 +31,16 @@ pub enum GetPermissionError {
/// Returns a list of all permissions currently granted by the user. Permissions are assigned e.g. by subscribing to VRC+.
pub fn get_assigned_permissions(configuration: &configuration::Configuration, ) -> Result<Vec<crate::models::Permission>, Error<GetAssignedPermissionsError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/permissions", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetAssignedPermissionsError> = 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))
}
pub async fn get_assigned_permissions(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, ) -> Result<Vec<crate::models::Permission>, Error<GetAssignedPermissionsError>> {
let local_var_uri_str = format!("{}/auth/permissions", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Returns a single permission. This endpoint is pretty useless, as it returns the exact same information as `/auth/permissions`.
pub fn get_permission(configuration: &configuration::Configuration, permission_id: &str) -> Result<crate::models::Permission, Error<GetPermissionError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/permissions/{permissionId}", local_var_configuration.base_path, permissionId=crate::apis::urlencode(permission_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetPermissionError> = 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))
}
pub async fn get_permission(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, permission_id: &str) -> Result<crate::models::Permission, Error<GetPermissionError>> {
let local_var_uri_str = format!("{}/permissions/{permissionId}", configuration.base_path, permissionId=crate::apis::urlencode(permission_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}

View File

@ -9,7 +9,7 @@
use reqwest;
use crate::apis::ResponseContent;
#[allow(unused_imports)] use crate::apis::ResponseContent;
use super::{Error, configuration};
@ -65,97 +65,30 @@ pub enum UnmoderateUserError {
/// ⚠️ **This will delete every single player moderation you've ever made.**
pub fn clear_all_player_moderations(configuration: &configuration::Configuration, ) -> Result<crate::models::Success, Error<ClearAllPlayerModerationsError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/user/playermoderations", local_var_configuration.base_path);
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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<ClearAllPlayerModerationsError> = 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))
}
pub async fn clear_all_player_moderations(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, ) -> Result<crate::models::Success, Error<ClearAllPlayerModerationsError>> {
let local_var_uri_str = format!("{}/auth/user/playermoderations", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// 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<crate::models::Success, Error<DeletePlayerModerationError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/user/playermoderations/{playerModerationId}", local_var_configuration.base_path, playerModerationId=crate::apis::urlencode(player_moderation_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<DeletePlayerModerationError> = 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))
}
pub async fn delete_player_moderation(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, player_moderation_id: &str) -> Result<crate::models::Success, Error<DeletePlayerModerationError>> {
let local_var_uri_str = format!("{}/auth/user/playermoderations/{playerModerationId}", configuration.base_path, playerModerationId=crate::apis::urlencode(player_moderation_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Returns a single Player Moderation. This returns the exact same amount of information as the more generalised `getPlayerModerations`.
pub fn get_player_moderation(configuration: &configuration::Configuration, player_moderation_id: &str) -> Result<crate::models::PlayerModeration, Error<GetPlayerModerationError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/user/playermoderations/{playerModerationId}", local_var_configuration.base_path, playerModerationId=crate::apis::urlencode(player_moderation_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetPlayerModerationError> = 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))
}
pub async fn get_player_moderation(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, player_moderation_id: &str) -> Result<crate::models::PlayerModeration, Error<GetPlayerModerationError>> {
let local_var_uri_str = format!("{}/auth/user/playermoderations/{playerModerationId}", configuration.base_path, playerModerationId=crate::apis::urlencode(player_moderation_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Returns a list of all player moderations made by **you**. This endpoint does not have pagination, and will return *all* results. Use query parameters to limit your query if needed.
pub fn get_player_moderations(configuration: &configuration::Configuration, r#type: Option<&str>, target_user_id: Option<&str>) -> Result<Vec<crate::models::PlayerModeration>, Error<GetPlayerModerationsError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/user/playermoderations", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
pub async fn get_player_moderations(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, r#type: Option<&str>, target_user_id: Option<&str>) -> Result<Vec<crate::models::PlayerModeration>, Error<GetPlayerModerationsError>> {
let local_var_uri_str = format!("{}/auth/user/playermoderations", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_str) = r#type {
local_var_req_builder = local_var_req_builder.query(&[("type", &local_var_str.to_string())]);
@ -163,80 +96,20 @@ pub fn get_player_moderations(configuration: &configuration::Configuration, r#ty
if let Some(ref local_var_str) = target_user_id {
local_var_req_builder = local_var_req_builder.query(&[("targetUserId", &local_var_str.to_string())]);
}
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetPlayerModerationsError> = 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))
}
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Moderate a user, e.g. unmute them or show their avatar. Please see the [Player Moderation docs](https://vrchatapi.github.io/docs/api/#tag--playermoderation) on what playerModerations are, and how they differ from staff moderations.
pub fn moderate_user(configuration: &configuration::Configuration, moderate_user_request: Option<crate::models::ModerateUserRequest>) -> Result<crate::models::PlayerModeration, Error<ModerateUserError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/user/playermoderations", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
local_var_req_builder = local_var_req_builder.json(&moderate_user_request);
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<ModerateUserError> = 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))
}
pub async fn moderate_user(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, moderate_user_request: crate::models::ModerateUserRequest) -> Result<crate::models::PlayerModeration, Error<ModerateUserError>> {
let local_var_uri_str = format!("{}/auth/user/playermoderations", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::POST, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, Some(moderate_user_request)).await
}
/// Removes a player moderation previously added through `moderateUser`. E.g if you previously have shown their avatar, but now want to reset it to default.
pub fn unmoderate_user(configuration: &configuration::Configuration, moderate_user_request: Option<crate::models::ModerateUserRequest>) -> Result<crate::models::Success, Error<UnmoderateUserError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/auth/user/unplayermoderate", local_var_configuration.base_path);
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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
local_var_req_builder = local_var_req_builder.json(&moderate_user_request);
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<UnmoderateUserError> = 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))
}
pub async fn unmoderate_user(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, moderate_user_request: crate::models::ModerateUserRequest) -> Result<crate::models::Success, Error<UnmoderateUserError>> {
let local_var_uri_str = format!("{}/auth/user/unplayermoderate", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, Some(moderate_user_request)).await
}

View File

@ -9,7 +9,7 @@
use reqwest;
use crate::apis::ResponseContent;
#[allow(unused_imports)] use crate::apis::ResponseContent;
use super::{Error, configuration};
@ -66,41 +66,16 @@ pub enum GetSystemTimeError {
/// API config contains configuration that the clients needs to work properly. Currently the most important value here is `clientApiKey` which is used for all other API endpoints.
pub fn get_config(configuration: &configuration::Configuration, ) -> Result<crate::models::ApiConfig, Error<GetConfigError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/config", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetConfigError> = 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))
}
pub async fn get_config(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, ) -> Result<crate::models::ApiConfig, Error<GetConfigError>> {
let local_var_uri_str = format!("{}/config", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Fetches the CSS code to the frontend React website.
pub fn get_css(configuration: &configuration::Configuration, variant: Option<&str>, branch: Option<&str>) -> Result<String, Error<GetCssError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/css/app.css", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
pub async fn get_css(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, variant: Option<&str>, branch: Option<&str>) -> Result<String, Error<GetCssError>> {
let local_var_uri_str = format!("{}/css/app.css", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_str) = variant {
local_var_req_builder = local_var_req_builder.query(&[("variant", &local_var_str.to_string())]);
@ -108,89 +83,27 @@ pub fn get_css(configuration: &configuration::Configuration, variant: Option<&st
if let Some(ref local_var_str) = branch {
local_var_req_builder = local_var_req_builder.query(&[("branch", &local_var_str.to_string())]);
}
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetCssError> = 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))
}
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Returns the current number of online users. **NOTE:** The response type is not a JSON object, but a simple JSON integer.
pub fn get_current_online_users(configuration: &configuration::Configuration, ) -> Result<i32, Error<GetCurrentOnlineUsersError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/visits", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetCurrentOnlineUsersError> = 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))
}
pub async fn get_current_online_users(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, ) -> Result<i32, Error<GetCurrentOnlineUsersError>> {
let local_var_uri_str = format!("{}/visits", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// ~~Gets the overall health status, the server name, and the current build version tag of the API.~~ **DEPRECATED:** VRChat has suddenly restricted this endpoint for unknown reasons, and now always return 401 Unauthorized.
pub fn get_health(configuration: &configuration::Configuration, ) -> Result<crate::models::ApiHealth, Error<GetHealthError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/health", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetHealthError> = 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))
}
pub async fn get_health(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, ) -> Result<crate::models::ApiHealth, Error<GetHealthError>> {
let local_var_uri_str = format!("{}/health", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// IPS (Info Push System) is a system for VRChat to push out dynamic information to the client. This is primarily used by the Quick-Menu info banners, but can also be used to e.g. alert you to update your game to the latest version. `include` is used to query what Information Pushes should be included in the response. If include is missing or empty, then no notices will normally be returned. This is an \"any of\" search. `require` is used to limit what Information Pushes should be included in the response. This is usually used in combination with `include`, and is an \"all of\" search.
pub fn get_info_push(configuration: &configuration::Configuration, require: Option<&str>, include: Option<&str>) -> Result<Vec<crate::models::InfoPush>, Error<GetInfoPushError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/infoPush", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
pub async fn get_info_push(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, require: Option<&str>, include: Option<&str>) -> Result<Vec<crate::models::InfoPush>, Error<GetInfoPushError>> {
let local_var_uri_str = format!("{}/infoPush", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_str) = require {
local_var_req_builder = local_var_req_builder.query(&[("require", &local_var_str.to_string())]);
@ -198,33 +111,13 @@ pub fn get_info_push(configuration: &configuration::Configuration, require: Opti
if let Some(ref local_var_str) = include {
local_var_req_builder = local_var_req_builder.query(&[("include", &local_var_str.to_string())]);
}
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetInfoPushError> = 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))
}
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Fetches the JavaScript code to the frontend React website.
pub fn get_java_script(configuration: &configuration::Configuration, variant: Option<&str>, branch: Option<&str>) -> Result<String, Error<GetJavaScriptError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/js/app.js", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
pub async fn get_java_script(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, variant: Option<&str>, branch: Option<&str>) -> Result<String, Error<GetJavaScriptError>> {
let local_var_uri_str = format!("{}/js/app.js", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_str) = variant {
local_var_req_builder = local_var_req_builder.query(&[("variant", &local_var_str.to_string())]);
@ -232,50 +125,13 @@ pub fn get_java_script(configuration: &configuration::Configuration, variant: Op
if let Some(ref local_var_str) = branch {
local_var_req_builder = local_var_req_builder.query(&[("branch", &local_var_str.to_string())]);
}
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetJavaScriptError> = 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))
}
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Returns the current time of the API server. **NOTE:** The response type is not a JSON object, but a simple JSON string.
pub fn get_system_time(configuration: &configuration::Configuration, ) -> Result<String, Error<GetSystemTimeError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/time", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetSystemTimeError> = 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))
}
pub async fn get_system_time(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, ) -> Result<String, Error<GetSystemTimeError>> {
let local_var_uri_str = format!("{}/time", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}

View File

@ -9,7 +9,7 @@
use reqwest;
use crate::apis::ResponseContent;
#[allow(unused_imports)] use crate::apis::ResponseContent;
use super::{Error, configuration};
@ -45,6 +45,14 @@ pub enum GetUserGroupsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_user_represented_group`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetUserRepresentedGroupError {
Status401(crate::models::Error),
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`search_users`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
@ -64,125 +72,44 @@ pub enum UpdateUserError {
/// Get public user information about a specific user using their ID.
pub fn get_user(configuration: &configuration::Configuration, user_id: &str) -> Result<crate::models::User, Error<GetUserError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/users/{userId}", local_var_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetUserError> = 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))
}
pub async fn get_user(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, user_id: &str) -> Result<crate::models::User, Error<GetUserError>> {
let local_var_uri_str = format!("{}/users/{userId}", configuration.base_path, userId=crate::apis::urlencode(user_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// ~~Get public user information about a specific user using their name.~~ **DEPRECATED:** VRChat API no longer return usernames of other users. [See issue by Tupper for more information](https://github.com/pypy-vrc/VRCX/issues/429). This endpoint now require Admin Credentials.
pub fn get_user_by_name(configuration: &configuration::Configuration, username: &str) -> Result<crate::models::User, Error<GetUserByNameError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/users/{username}/name", local_var_configuration.base_path, username=crate::apis::urlencode(username));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetUserByNameError> = 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))
}
pub async fn get_user_by_name(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, username: &str) -> Result<crate::models::User, Error<GetUserByNameError>> {
let local_var_uri_str = format!("{}/users/{username}/name", configuration.base_path, username=crate::apis::urlencode(username));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Returns a list of Groups the user has requested to be invited into.
pub fn get_user_group_requests(configuration: &configuration::Configuration, user_id: &str) -> Result<Vec<crate::models::Group>, Error<GetUserGroupRequestsError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/users/{userId}/groups/requested", local_var_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetUserGroupRequestsError> = 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))
}
pub async fn get_user_group_requests(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, user_id: &str) -> Result<Vec<crate::models::Group>, Error<GetUserGroupRequestsError>> {
let local_var_uri_str = format!("{}/users/{userId}/groups/requested", configuration.base_path, userId=crate::apis::urlencode(user_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Get user's public groups
pub fn get_user_groups(configuration: &configuration::Configuration, user_id: &str) -> Result<Vec<crate::models::Group>, Error<GetUserGroupsError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/users/{userId}/groups", local_var_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
pub async fn get_user_groups(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, user_id: &str) -> Result<Vec<crate::models::LimitedUserGroups>, Error<GetUserGroupsError>> {
let local_var_uri_str = format!("{}/users/{userId}/groups", configuration.base_path, userId=crate::apis::urlencode(user_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
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<GetUserGroupsError> = 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 the current group that the user is currently representing
pub async fn get_user_represented_group(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, user_id: &str) -> Result<crate::models::RepresentedGroup, Error<GetUserRepresentedGroupError>> {
let local_var_uri_str = format!("{}/users/{userId}/groups/represented", configuration.base_path, userId=crate::apis::urlencode(user_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Search and list any users by text query
pub fn search_users(configuration: &configuration::Configuration, search: Option<&str>, developer_type: Option<&str>, n: Option<i32>, offset: Option<i32>) -> Result<Vec<crate::models::LimitedUser>, Error<SearchUsersError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/users", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
pub async fn search_users(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, search: Option<&str>, developer_type: Option<&str>, n: Option<i32>, offset: Option<i32>) -> Result<Vec<crate::models::LimitedUser>, Error<SearchUsersError>> {
let local_var_uri_str = format!("{}/users", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_str) = search {
local_var_req_builder = local_var_req_builder.query(&[("search", &local_var_str.to_string())]);
@ -196,51 +123,13 @@ pub fn search_users(configuration: &configuration::Configuration, search: Option
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_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<SearchUsersError> = 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))
}
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Update a users information such as the email and birthday.
pub fn update_user(configuration: &configuration::Configuration, user_id: &str, update_user_request: Option<crate::models::UpdateUserRequest>) -> Result<crate::models::CurrentUser, Error<UpdateUserError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/users/{userId}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
local_var_req_builder = local_var_req_builder.json(&update_user_request);
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<UpdateUserError> = 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))
}
pub async fn update_user(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, user_id: &str, update_user_request: Option<crate::models::UpdateUserRequest>) -> Result<crate::models::CurrentUser, Error<UpdateUserError>> {
let local_var_uri_str = format!("{}/users/{userId}", configuration.base_path, userId=crate::apis::urlencode(user_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, Some(update_user_request)).await
}

View File

@ -9,7 +9,7 @@
use reqwest;
use crate::apis::ResponseContent;
#[allow(unused_imports)] use crate::apis::ResponseContent;
use super::{Error, configuration};
@ -127,70 +127,23 @@ pub enum UpdateWorldError {
/// Create a new world. This endpoint requires `assetUrl` to be a valid File object with `.vrcw` file extension, and `imageUrl` to be a valid File object with an image file extension.
pub fn create_world(configuration: &configuration::Configuration, create_world_request: Option<crate::models::CreateWorldRequest>) -> Result<crate::models::World, Error<CreateWorldError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/worlds", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
local_var_req_builder = local_var_req_builder.json(&create_world_request);
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<CreateWorldError> = 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))
}
pub async fn create_world(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, create_world_request: Option<crate::models::CreateWorldRequest>) -> Result<crate::models::World, Error<CreateWorldError>> {
let local_var_uri_str = format!("{}/worlds", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::POST, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, Some(create_world_request)).await
}
/// Delete a world. Notice a world is never fully \"deleted\", only its ReleaseStatus is set to \"hidden\" and the linked Files are deleted. The WorldID is permanently reserved.
pub fn delete_world(configuration: &configuration::Configuration, world_id: &str) -> Result<(), Error<DeleteWorldError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/worlds/{worldId}", local_var_configuration.base_path, worldId=crate::apis::urlencode(world_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
Ok(())
} else {
let local_var_entity: Option<DeleteWorldError> = 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))
}
pub async fn delete_world(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, world_id: &str) -> Result<(), Error<DeleteWorldError>> {
let local_var_uri_str = format!("{}/worlds/{worldId}", configuration.base_path, worldId=crate::apis::urlencode(world_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
crate::request_ok(configuration, local_var_req_builder, None::<()>).await
}
/// Search and list currently Active worlds by query filters.
pub fn get_active_worlds(configuration: &configuration::Configuration, featured: Option<bool>, sort: Option<crate::models::SortOption>, n: Option<i32>, order: Option<crate::models::OrderOption>, offset: Option<i32>, search: Option<&str>, tag: Option<&str>, notag: Option<&str>, release_status: Option<crate::models::ReleaseStatus>, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>) -> Result<Vec<crate::models::LimitedWorld>, Error<GetActiveWorldsError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/worlds/active", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
pub async fn get_active_worlds(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, featured: Option<bool>, sort: Option<crate::models::SortOption>, n: Option<i32>, order: Option<crate::models::OrderOption>, offset: Option<i32>, search: Option<&str>, tag: Option<&str>, notag: Option<&str>, release_status: Option<crate::models::ReleaseStatus>, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>) -> Result<Vec<crate::models::LimitedWorld>, Error<GetActiveWorldsError>> {
let local_var_uri_str = format!("{}/worlds/active", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_str) = featured {
local_var_req_builder = local_var_req_builder.query(&[("featured", &local_var_str.to_string())]);
@ -228,33 +181,13 @@ pub fn get_active_worlds(configuration: &configuration::Configuration, featured:
if let Some(ref local_var_str) = platform {
local_var_req_builder = local_var_req_builder.query(&[("platform", &local_var_str.to_string())]);
}
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetActiveWorldsError> = 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))
}
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Search and list favorited worlds by query filters.
pub fn get_favorited_worlds(configuration: &configuration::Configuration, featured: Option<bool>, sort: Option<crate::models::SortOption>, n: Option<i32>, order: Option<crate::models::OrderOption>, offset: Option<i32>, search: Option<&str>, tag: Option<&str>, notag: Option<&str>, release_status: Option<crate::models::ReleaseStatus>, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>, user_id: Option<&str>) -> Result<Vec<crate::models::LimitedWorld>, Error<GetFavoritedWorldsError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/worlds/favorites", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
pub async fn get_favorited_worlds(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, featured: Option<bool>, sort: Option<crate::models::SortOption>, n: Option<i32>, order: Option<crate::models::OrderOption>, offset: Option<i32>, search: Option<&str>, tag: Option<&str>, notag: Option<&str>, release_status: Option<crate::models::ReleaseStatus>, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>, user_id: Option<&str>) -> Result<Vec<crate::models::LimitedWorld>, Error<GetFavoritedWorldsError>> {
let local_var_uri_str = format!("{}/worlds/favorites", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_str) = featured {
local_var_req_builder = local_var_req_builder.query(&[("featured", &local_var_str.to_string())]);
@ -295,33 +228,13 @@ pub fn get_favorited_worlds(configuration: &configuration::Configuration, featur
if let Some(ref local_var_str) = user_id {
local_var_req_builder = local_var_req_builder.query(&[("userId", &local_var_str.to_string())]);
}
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetFavoritedWorldsError> = 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))
}
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Search and list recently visited worlds by query filters.
pub fn get_recent_worlds(configuration: &configuration::Configuration, featured: Option<bool>, sort: Option<crate::models::SortOption>, n: Option<i32>, order: Option<crate::models::OrderOption>, offset: Option<i32>, search: Option<&str>, tag: Option<&str>, notag: Option<&str>, release_status: Option<crate::models::ReleaseStatus>, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>, user_id: Option<&str>) -> Result<Vec<crate::models::LimitedWorld>, Error<GetRecentWorldsError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/worlds/recent", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
pub async fn get_recent_worlds(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, featured: Option<bool>, sort: Option<crate::models::SortOption>, n: Option<i32>, order: Option<crate::models::OrderOption>, offset: Option<i32>, search: Option<&str>, tag: Option<&str>, notag: Option<&str>, release_status: Option<crate::models::ReleaseStatus>, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>, user_id: Option<&str>) -> Result<Vec<crate::models::LimitedWorld>, Error<GetRecentWorldsError>> {
let local_var_uri_str = format!("{}/worlds/recent", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_str) = featured {
local_var_req_builder = local_var_req_builder.query(&[("featured", &local_var_str.to_string())]);
@ -362,173 +275,48 @@ pub fn get_recent_worlds(configuration: &configuration::Configuration, featured:
if let Some(ref local_var_str) = user_id {
local_var_req_builder = local_var_req_builder.query(&[("userId", &local_var_str.to_string())]);
}
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetRecentWorldsError> = 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))
}
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Get information about a specific World. Works unauthenticated but when so will always return `0` for certain fields.
pub fn get_world(configuration: &configuration::Configuration, world_id: &str) -> Result<crate::models::World, Error<GetWorldError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/worlds/{worldId}", local_var_configuration.base_path, worldId=crate::apis::urlencode(world_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetWorldError> = 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))
}
pub async fn get_world(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, world_id: &str) -> Result<crate::models::World, Error<GetWorldError>> {
let local_var_uri_str = format!("{}/worlds/{worldId}", configuration.base_path, worldId=crate::apis::urlencode(world_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Returns a worlds instance.
pub fn get_world_instance(configuration: &configuration::Configuration, world_id: &str, instance_id: &str) -> Result<crate::models::Instance, Error<GetWorldInstanceError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/worlds/{worldId}/{instanceId}", local_var_configuration.base_path, worldId=crate::apis::urlencode(world_id), instanceId=crate::apis::urlencode(instance_id));
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetWorldInstanceError> = 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))
}
pub async fn get_world_instance(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, world_id: &str, instance_id: &str) -> Result<crate::models::Instance, Error<GetWorldInstanceError>> {
let local_var_uri_str = format!("{}/worlds/{worldId}/{instanceId}", configuration.base_path, worldId=crate::apis::urlencode(world_id), instanceId=crate::apis::urlencode(instance_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// 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<crate::models::WorldMetadata, Error<GetWorldMetadataError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/worlds/{worldId}/metadata", local_var_configuration.base_path, worldId=crate::apis::urlencode(world_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetWorldMetadataError> = 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))
}
pub async fn get_world_metadata(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, world_id: &str) -> Result<crate::models::WorldMetadata, Error<GetWorldMetadataError>> {
let local_var_uri_str = format!("{}/worlds/{worldId}/metadata", configuration.base_path, worldId=crate::apis::urlencode(world_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Returns a worlds publish status.
pub fn get_world_publish_status(configuration: &configuration::Configuration, world_id: &str) -> Result<crate::models::WorldPublishStatus, Error<GetWorldPublishStatusError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/worlds/{worldId}/publish", local_var_configuration.base_path, worldId=crate::apis::urlencode(world_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<GetWorldPublishStatusError> = 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))
}
pub async fn get_world_publish_status(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, world_id: &str) -> Result<crate::models::WorldPublishStatus, Error<GetWorldPublishStatusError>> {
let local_var_uri_str = format!("{}/worlds/{worldId}/publish", configuration.base_path, worldId=crate::apis::urlencode(world_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Publish a world. You can only publish one world per week.
pub fn publish_world(configuration: &configuration::Configuration, world_id: &str) -> Result<(), Error<PublishWorldError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/worlds/{worldId}/publish", local_var_configuration.base_path, worldId=crate::apis::urlencode(world_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
Ok(())
} else {
let local_var_entity: Option<PublishWorldError> = 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))
}
pub async fn publish_world(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, world_id: &str) -> Result<(), Error<PublishWorldError>> {
let local_var_uri_str = format!("{}/worlds/{worldId}/publish", configuration.base_path, worldId=crate::apis::urlencode(world_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
crate::request_ok(configuration, local_var_req_builder, None::<()>).await
}
/// Search and list any worlds by query filters.
pub fn search_worlds(configuration: &configuration::Configuration, featured: Option<bool>, sort: Option<crate::models::SortOption>, user: Option<&str>, user_id: Option<&str>, n: Option<i32>, order: Option<crate::models::OrderOption>, offset: Option<i32>, search: Option<&str>, tag: Option<&str>, notag: Option<&str>, release_status: Option<crate::models::ReleaseStatus>, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>) -> Result<Vec<crate::models::LimitedWorld>, Error<SearchWorldsError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/worlds", local_var_configuration.base_path);
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
pub async fn search_worlds(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, featured: Option<bool>, sort: Option<crate::models::SortOption>, user: Option<&str>, user_id: Option<&str>, n: Option<i32>, order: Option<crate::models::OrderOption>, offset: Option<i32>, search: Option<&str>, tag: Option<&str>, notag: Option<&str>, release_status: Option<crate::models::ReleaseStatus>, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>) -> Result<Vec<crate::models::LimitedWorld>, Error<SearchWorldsError>> {
let local_var_uri_str = format!("{}/worlds", configuration.base_path);
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::GET, local_var_uri_str.as_str());
if let Some(ref local_var_str) = featured {
local_var_req_builder = local_var_req_builder.query(&[("featured", &local_var_str.to_string())]);
@ -572,79 +360,20 @@ pub fn search_worlds(configuration: &configuration::Configuration, featured: Opt
if let Some(ref local_var_str) = platform {
local_var_req_builder = local_var_req_builder.query(&[("platform", &local_var_str.to_string())]);
}
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<SearchWorldsError> = 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))
}
crate::request(configuration, local_var_req_builder, None::<()>).await
}
/// Unpublish a world.
pub fn unpublish_world(configuration: &configuration::Configuration, world_id: &str) -> Result<(), Error<UnpublishWorldError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/worlds/{worldId}/publish", local_var_configuration.base_path, worldId=crate::apis::urlencode(world_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
Ok(())
} else {
let local_var_entity: Option<UnpublishWorldError> = 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))
}
pub async fn unpublish_world(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, world_id: &str) -> Result<(), Error<UnpublishWorldError>> {
let local_var_uri_str = format!("{}/worlds/{worldId}/publish", configuration.base_path, worldId=crate::apis::urlencode(world_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
crate::request_ok(configuration, local_var_req_builder, None::<()>).await
}
/// Update information about a specific World.
pub fn update_world(configuration: &configuration::Configuration, world_id: &str, update_world_request: Option<crate::models::UpdateWorldRequest>) -> Result<crate::models::World, Error<UpdateWorldError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
let local_var_uri_str = format!("{}/worlds/{worldId}", local_var_configuration.base_path, worldId=crate::apis::urlencode(world_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) = local_var_configuration.user_agent {
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
local_var_req_builder = local_var_req_builder.json(&update_world_request);
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;
let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text()?;
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_entity: Option<UpdateWorldError> = 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))
}
pub async fn update_world(configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>, world_id: &str, update_world_request: Option<crate::models::UpdateWorldRequest>) -> Result<crate::models::World, Error<UpdateWorldError>> {
let local_var_uri_str = format!("{}/worlds/{worldId}", configuration.base_path, worldId=crate::apis::urlencode(world_id));
#[allow(unused_mut)] let mut local_var_req_builder = configuration.client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
crate::request(configuration, local_var_req_builder, Some(update_world_request)).await
}

View File

@ -8,3 +8,49 @@ extern crate reqwest;
pub mod apis;
pub mod models;
use serde::de::DeserializeOwned;
use reqwest::RequestBuilder;
use serde::Serialize;
use reqwest::StatusCode;
use crate::apis::{configuration, Error, ResponseContent};
async fn request<T: Serialize, R:DeserializeOwned, E:DeserializeOwned>(
configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>,
request: RequestBuilder,
data: Option<T>,
) -> Result<R, Error<E>> {
request_int(configuration, request, data, |_, content| serde_json::from_str(&content).map_err(Error::from)).await
}
async fn request_ok<T: Serialize, E:DeserializeOwned>(
configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>,
request: RequestBuilder,
data: Option<T>,
) -> Result<(), Error<E>> {
request_int(configuration, request, data, |_,_| Ok(())).await
}
async fn request_int<T:Serialize, R, E:DeserializeOwned>(
configuration: &configuration::Configuration<impl std::ops::Deref<Target = reqwest::Client> + Clone + core::fmt::Debug>,
mut request: RequestBuilder,
data: Option<T>,
output: impl FnOnce(StatusCode, String) -> Result<R, Error<E>>
) -> Result<R, Error<E>> {
if let Some(ref local_var_user_agent) = configuration.user_agent {
request = request.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
}
if let Some(data) = data{
request = request.json(&data);
}
let resp = configuration.client.execute(request.build()?).await?;
let status = resp.status();
let content = resp.text().await?;
if !status.is_client_error() && !status.is_server_error() {
output(status, content)
} else {
let local_var_entity: Option<E> = serde_json::from_str(&content).ok();
let local_var_error = ResponseContent { status, content, entity: local_var_entity };
Err(Error::ResponseError(local_var_error))
}
}

View File

@ -18,11 +18,11 @@ pub struct AddFavoriteRequest {
pub favorite_id: String,
/// Tags indicate which group this favorite belongs to. Adding multiple groups makes it show up in all. Removing it from one in that case removes it from all.
#[serde(rename = "tags")]
pub tags: Vec<String>,
pub tags: Vec<crate::models::tags::Tags>,
}
impl AddFavoriteRequest {
pub fn new(r#type: crate::models::FavoriteType, favorite_id: String, tags: Vec<String>) -> AddFavoriteRequest {
pub fn new(r#type: crate::models::FavoriteType, favorite_id: String, tags: Vec<crate::models::tags::Tags>) -> AddFavoriteRequest {
AddFavoriteRequest {
r#type,
favorite_id,

View File

@ -39,7 +39,7 @@ pub struct Avatar {
pub release_status: crate::models::ReleaseStatus,
///
#[serde(rename = "tags")]
pub tags: Vec<String>,
pub tags: Vec<crate::models::tags::Tags>,
#[serde(rename = "thumbnailImageUrl")]
pub thumbnail_image_url: String,
#[serde(rename = "unityPackageUrl")]
@ -56,7 +56,7 @@ pub struct Avatar {
impl Avatar {
///
pub fn new(author_id: String, author_name: String, created_at: String, description: String, featured: bool, id: String, image_url: String, name: String, release_status: crate::models::ReleaseStatus, tags: Vec<String>, thumbnail_image_url: String, unity_package_url: String, unity_package_url_object: crate::models::AvatarUnityPackageUrlObject, unity_packages: Vec<crate::models::UnityPackage>, updated_at: String, version: i32) -> Avatar {
pub fn new(author_id: String, author_name: String, created_at: String, description: String, featured: bool, id: String, image_url: String, name: String, release_status: crate::models::ReleaseStatus, tags: Vec<crate::models::tags::Tags>, thumbnail_image_url: String, unity_package_url: String, unity_package_url_object: crate::models::AvatarUnityPackageUrlObject, unity_packages: Vec<crate::models::UnityPackage>, updated_at: String, version: i32) -> Avatar {
Avatar {
asset_url: None,
asset_url_object: None,

51
src/models/badge.rs Normal file
View File

@ -0,0 +1,51 @@
/*
* VRChat API Documentation
*
*
* Contact: vrchatapi.lpv0t@aries.fyi
* Generated by: https://openapi-generator.tech
*/
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Badge {
/// only present in CurrentUser badges
#[serde(rename = "assignedAt", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub assigned_at: Option<Option<String>>,
#[serde(rename = "badgeDescription")]
pub badge_description: String,
#[serde(rename = "badgeId")]
pub badge_id: String,
/// direct url to image
#[serde(rename = "badgeImageUrl")]
pub badge_image_url: String,
#[serde(rename = "badgeName")]
pub badge_name: String,
/// only present in CurrentUser badges
#[serde(rename = "hidden", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub hidden: Option<Option<bool>>,
#[serde(rename = "showcased")]
pub showcased: bool,
/// only present in CurrentUser badges
#[serde(rename = "updatedAt", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub updated_at: Option<Option<String>>,
}
impl Badge {
pub fn new(badge_description: String, badge_id: String, badge_image_url: String, badge_name: String, showcased: bool) -> Badge {
Badge {
assigned_at: None,
badge_description,
badge_id,
badge_image_url,
badge_name,
hidden: None,
showcased,
updated_at: None,
}
}
}

View File

@ -30,6 +30,8 @@ pub struct CreateAvatarRequest {
pub version: Option<f32>,
#[serde(rename = "unityPackageUrl", skip_serializing_if = "Option::is_none")]
pub unity_package_url: Option<String>,
#[serde(rename = "unityVersion", skip_serializing_if = "Option::is_none")]
pub unity_version: Option<String>,
}
impl CreateAvatarRequest {
@ -44,6 +46,7 @@ impl CreateAvatarRequest {
release_status: None,
version: None,
unity_package_url: None,
unity_version: None,
}
}
}

View File

@ -0,0 +1,45 @@
/*
* VRChat API Documentation
*
*
* Contact: vrchatapi.lpv0t@aries.fyi
* Generated by: https://openapi-generator.tech
*/
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreateGroupPostRequest {
/// Post title
#[serde(rename = "title")]
pub title: String,
/// Post text
#[serde(rename = "text")]
pub text: String,
#[serde(rename = "imageId", skip_serializing_if = "Option::is_none")]
pub image_id: Option<String>,
/// Send notification to group members.
#[serde(rename = "sendNotification")]
pub send_notification: bool,
///
#[serde(rename = "roleIds", skip_serializing_if = "Option::is_none")]
pub role_ids: Option<Vec<String>>,
#[serde(rename = "visibility")]
pub visibility: crate::models::GroupPostVisibility,
}
impl CreateGroupPostRequest {
pub fn new(title: String, text: String, send_notification: bool, visibility: crate::models::GroupPostVisibility) -> CreateGroupPostRequest {
CreateGroupPostRequest {
title,
text,
image_id: None,
send_notification,
role_ids: None,
visibility,
}
}
}

View File

@ -0,0 +1,62 @@
/*
* VRChat API Documentation
*
*
* Contact: vrchatapi.lpv0t@aries.fyi
* Generated by: https://openapi-generator.tech
*/
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreateInstanceRequest {
/// WorldID be \"offline\" on User profiles if you are not friends with that user.
#[serde(rename = "worldId")]
pub world_id: String,
#[serde(rename = "type")]
pub r#type: crate::models::InstanceType,
#[serde(rename = "region")]
pub region: crate::models::InstanceRegion,
/// A groupId if the instance type is \"group\", null if instance type is public, or a userId otherwise
#[serde(rename = "ownerId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub owner_id: Option<Option<String>>,
/// Group roleIds that are allowed to join if the type is \"group\" and groupAccessType is \"member\"
#[serde(rename = "roleIds", skip_serializing_if = "Option::is_none")]
pub role_ids: Option<Vec<String>>,
#[serde(rename = "groupAccessType", skip_serializing_if = "Option::is_none")]
pub group_access_type: Option<crate::models::GroupAccessType>,
#[serde(rename = "queueEnabled", skip_serializing_if = "Option::is_none")]
pub queue_enabled: Option<bool>,
/// The time after which users won't be allowed to join the instance. This doesn't work for public instances.
#[serde(rename = "closedAt", skip_serializing_if = "Option::is_none")]
pub closed_at: Option<String>,
/// Only applies to invite type instances to make them invite+
#[serde(rename = "canRequestInvite", skip_serializing_if = "Option::is_none")]
pub can_request_invite: Option<bool>,
/// Currently unused, but will eventually be a flag to set if the closing of the instance should kick people.
#[serde(rename = "hardClose", skip_serializing_if = "Option::is_none")]
pub hard_close: Option<bool>,
#[serde(rename = "inviteOnly", skip_serializing_if = "Option::is_none")]
pub invite_only: Option<bool>,
}
impl CreateInstanceRequest {
pub fn new(world_id: String, r#type: crate::models::InstanceType, region: crate::models::InstanceRegion) -> CreateInstanceRequest {
CreateInstanceRequest {
world_id,
r#type,
region,
owner_id: None,
role_ids: None,
group_access_type: None,
queue_enabled: None,
closed_at: None,
can_request_invite: None,
hard_close: None,
invite_only: None,
}
}
}

View File

@ -25,6 +25,9 @@ pub struct CurrentUser {
pub active_friends: Option<Vec<String>>,
#[serde(rename = "allowAvatarCopying")]
pub allow_avatar_copying: bool,
///
#[serde(rename = "badges", skip_serializing_if = "Option::is_none")]
pub badges: Option<Vec<crate::models::Badge>>,
#[serde(rename = "bio")]
pub bio: String,
///
@ -40,6 +43,8 @@ pub struct CurrentUser {
/// When profilePicOverride is not empty, use it instead.
#[serde(rename = "currentAvatarThumbnailImageUrl")]
pub current_avatar_thumbnail_image_url: String,
#[serde(rename = "currentAvatarTags")]
pub current_avatar_tags: Vec<crate::models::tags::Tags>,
#[serde(rename = "date_joined")]
pub date_joined: String,
#[serde(rename = "developerType")]
@ -59,6 +64,12 @@ pub struct CurrentUser {
pub friends: Vec<String>,
#[serde(rename = "hasBirthday")]
pub has_birthday: bool,
#[serde(rename = "hideContentFilterSettings", skip_serializing_if = "Option::is_none")]
pub hide_content_filter_settings: Option<bool>,
#[serde(rename = "userLanguage", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub user_language: Option<Option<String>>,
#[serde(rename = "userLanguageCode", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub user_language_code: Option<Option<String>>,
#[serde(rename = "hasEmail")]
pub has_email: bool,
#[serde(rename = "hasLoggedInFromClient")]
@ -77,6 +88,8 @@ pub struct CurrentUser {
pub last_activity: Option<String>,
#[serde(rename = "last_login")]
pub last_login: String,
#[serde(rename = "last_mobile", deserialize_with = "Option::deserialize")]
pub last_mobile: 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`.
#[serde(rename = "last_platform")]
pub last_platform: String,
@ -86,6 +99,14 @@ pub struct CurrentUser {
pub obfuscated_pending_email: String,
#[serde(rename = "oculusId")]
pub oculus_id: String,
#[serde(rename = "googleId", skip_serializing_if = "Option::is_none")]
pub google_id: Option<String>,
#[serde(rename = "googleDetails", skip_serializing_if = "Option::is_none")]
pub google_details: Option<serde_json::Value>,
#[serde(rename = "picoId", skip_serializing_if = "Option::is_none")]
pub pico_id: Option<String>,
#[serde(rename = "viveId", skip_serializing_if = "Option::is_none")]
pub vive_id: Option<String>,
#[serde(rename = "offlineFriends", skip_serializing_if = "Option::is_none")]
pub offline_friends: Option<Vec<String>>,
#[serde(rename = "onlineFriends", skip_serializing_if = "Option::is_none")]
@ -97,6 +118,8 @@ pub struct CurrentUser {
pub presence: Option<Box<crate::models::CurrentUserPresence>>,
#[serde(rename = "profilePicOverride")]
pub profile_pic_override: String,
#[serde(rename = "pronouns")]
pub pronouns: String,
#[serde(rename = "state")]
pub state: crate::models::UserState,
#[serde(rename = "status")]
@ -112,7 +135,7 @@ pub struct CurrentUser {
#[serde(rename = "steamId")]
pub steam_id: String,
#[serde(rename = "tags")]
pub tags: Vec<String>,
pub tags: Vec<crate::models::tags::Tags>,
#[serde(rename = "twoFactorAuthEnabled")]
pub two_factor_auth_enabled: bool,
#[serde(rename = "twoFactorAuthEnabledDate", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
@ -129,7 +152,7 @@ pub struct CurrentUser {
}
impl CurrentUser {
pub fn new(accepted_tos_version: i32, allow_avatar_copying: bool, bio: String, bio_links: Vec<String>, current_avatar: String, current_avatar_asset_url: String, current_avatar_image_url: String, current_avatar_thumbnail_image_url: String, date_joined: String, developer_type: crate::models::DeveloperType, display_name: String, email_verified: bool, friend_group_names: Vec<String>, friend_key: String, friends: Vec<String>, has_birthday: bool, has_email: bool, has_logged_in_from_client: bool, has_pending_email: bool, home_location: String, id: String, is_friend: bool, last_login: String, last_platform: String, obfuscated_email: String, obfuscated_pending_email: String, oculus_id: String, past_display_names: Vec<crate::models::PastDisplayName>, profile_pic_override: String, state: crate::models::UserState, status: crate::models::UserStatus, status_description: String, status_first_time: bool, status_history: Vec<String>, steam_details: serde_json::Value, steam_id: String, tags: Vec<String>, two_factor_auth_enabled: bool, unsubscribe: bool, user_icon: String) -> CurrentUser {
pub fn new(accepted_tos_version: i32, allow_avatar_copying: bool, bio: String, bio_links: Vec<String>, current_avatar: String, current_avatar_asset_url: String, current_avatar_image_url: String, current_avatar_thumbnail_image_url: String, current_avatar_tags: Vec<crate::models::tags::Tags>, date_joined: String, developer_type: crate::models::DeveloperType, display_name: String, email_verified: bool, friend_group_names: Vec<String>, friend_key: String, friends: Vec<String>, has_birthday: bool, has_email: bool, has_logged_in_from_client: bool, has_pending_email: bool, home_location: String, id: String, is_friend: bool, last_login: String, last_mobile: Option<String>, last_platform: String, obfuscated_email: String, obfuscated_pending_email: String, oculus_id: String, past_display_names: Vec<crate::models::PastDisplayName>, profile_pic_override: String, pronouns: String, state: crate::models::UserState, status: crate::models::UserStatus, status_description: String, status_first_time: bool, status_history: Vec<String>, steam_details: serde_json::Value, steam_id: String, tags: Vec<crate::models::tags::Tags>, two_factor_auth_enabled: bool, unsubscribe: bool, user_icon: String) -> CurrentUser {
CurrentUser {
accepted_tos_version,
accepted_privacy_version: None,
@ -137,12 +160,14 @@ impl CurrentUser {
account_deletion_log: None,
active_friends: None,
allow_avatar_copying,
badges: None,
bio,
bio_links,
current_avatar,
current_avatar_asset_url,
current_avatar_image_url,
current_avatar_thumbnail_image_url,
current_avatar_tags,
date_joined,
developer_type,
display_name,
@ -152,6 +177,9 @@ impl CurrentUser {
friend_key,
friends,
has_birthday,
hide_content_filter_settings: None,
user_language: None,
user_language_code: None,
has_email,
has_logged_in_from_client,
has_pending_email,
@ -160,15 +188,21 @@ impl CurrentUser {
is_friend,
last_activity: None,
last_login,
last_mobile,
last_platform,
obfuscated_email,
obfuscated_pending_email,
oculus_id,
google_id: None,
google_details: None,
pico_id: None,
vive_id: None,
offline_friends: None,
online_friends: None,
past_display_names,
presence: None,
profile_pic_override,
pronouns,
state,
status,
status_description,
@ -188,3 +222,15 @@ impl CurrentUser {
}
#[derive(Serialize, Deserialize)]
#[serde(untagged)]
pub enum EitherUserOrTwoFactor{
CurrentUser(CurrentUser),
RequiresTwoFactorAuth(RequiresTwoFactorAuth),
}
#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)]
pub struct RequiresTwoFactorAuth{
#[serde(rename = "requiresTwoFactorAuth")]
pub requires_two_factor_auth: Vec<String>
}

View File

@ -19,14 +19,14 @@ pub struct Favorite {
pub id: String,
///
#[serde(rename = "tags")]
pub tags: Vec<String>,
pub tags: Vec<crate::models::tags::Tags>,
#[serde(rename = "type")]
pub r#type: crate::models::FavoriteType,
}
impl Favorite {
///
pub fn new(favorite_id: String, id: String, tags: Vec<String>, r#type: crate::models::FavoriteType) -> Favorite {
pub fn new(favorite_id: String, id: String, tags: Vec<crate::models::tags::Tags>, r#type: crate::models::FavoriteType) -> Favorite {
Favorite {
favorite_id,
id,

View File

@ -25,7 +25,7 @@ pub struct FavoriteGroup {
pub owner_id: String,
///
#[serde(rename = "tags")]
pub tags: Vec<String>,
pub tags: Vec<crate::models::tags::Tags>,
#[serde(rename = "type")]
pub r#type: crate::models::FavoriteType,
#[serde(rename = "visibility")]
@ -34,7 +34,7 @@ pub struct FavoriteGroup {
impl FavoriteGroup {
///
pub fn new(display_name: String, id: String, name: String, owner_display_name: String, owner_id: String, tags: Vec<String>, r#type: crate::models::FavoriteType, visibility: crate::models::FavoriteGroupVisibility) -> FavoriteGroup {
pub fn new(display_name: String, id: String, name: String, owner_display_name: String, owner_id: String, tags: Vec<crate::models::tags::Tags>, r#type: crate::models::FavoriteType, visibility: crate::models::FavoriteGroupVisibility) -> FavoriteGroup {
FavoriteGroup {
display_name,
id,

View File

@ -26,7 +26,7 @@ pub struct File {
pub owner_id: String,
///
#[serde(rename = "tags")]
pub tags: Vec<String>,
pub tags: Vec<crate::models::tags::Tags>,
///
#[serde(rename = "versions")]
pub versions: Vec<crate::models::FileVersion>,
@ -34,7 +34,7 @@ pub struct File {
impl File {
///
pub fn new(extension: String, id: String, mime_type: crate::models::MimeType, name: String, owner_id: String, tags: Vec<String>, versions: Vec<crate::models::FileVersion>) -> File {
pub fn new(extension: String, id: String, mime_type: crate::models::MimeType, name: String, owner_id: String, tags: Vec<crate::models::tags::Tags>, versions: Vec<crate::models::FileVersion>) -> File {
File {
extension,
id,

View File

@ -0,0 +1,41 @@
/*
* VRChat API Documentation
*
*
* Contact: vrchatapi.lpv0t@aries.fyi
* Generated by: https://openapi-generator.tech
*/
/// GroupAccessType : Group access type when the instance type is \"group\"
/// Group access type when the instance type is \"group\"
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum GroupAccessType {
#[serde(rename = "public")]
Public,
#[serde(rename = "plus")]
Plus,
#[serde(rename = "members")]
Members,
}
impl ToString for GroupAccessType {
fn to_string(&self) -> String {
match self {
Self::Public => String::from("public"),
Self::Plus => String::from("plus"),
Self::Members => String::from("members"),
}
}
}
impl Default for GroupAccessType {
fn default() -> GroupAccessType {
Self::Public
}
}

View File

@ -20,8 +20,8 @@ pub struct GroupAuditLogEntry {
/// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.
#[serde(rename = "actorId", skip_serializing_if = "Option::is_none")]
pub actor_id: Option<String>,
#[serde(rename = "actorDisplayname", skip_serializing_if = "Option::is_none")]
pub actor_displayname: Option<String>,
#[serde(rename = "actorDisplayName", skip_serializing_if = "Option::is_none")]
pub actor_display_name: Option<String>,
/// Typically GroupID or GroupRoleID, but could be other types of IDs.
#[serde(rename = "targetId", skip_serializing_if = "Option::is_none")]
pub target_id: Option<String>,
@ -43,7 +43,7 @@ impl GroupAuditLogEntry {
created_at: None,
group_id: None,
actor_id: None,
actor_displayname: None,
actor_display_name: None,
target_id: None,
event_type: None,
description: None,

View File

@ -0,0 +1,36 @@
/*
* VRChat API Documentation
*
*
* Contact: vrchatapi.lpv0t@aries.fyi
* Generated by: https://openapi-generator.tech
*/
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct GroupInstance {
#[serde(rename = "instanceId")]
pub instance_id: String,
/// InstanceID can be \"offline\" on User profiles if you are not friends with that user and \"private\" if you are friends and user is in private instance.
#[serde(rename = "location")]
pub location: String,
#[serde(rename = "world")]
pub world: Box<crate::models::World>,
#[serde(rename = "memberCount")]
pub member_count: i32,
}
impl GroupInstance {
pub fn new(instance_id: String, location: String, world: crate::models::World, member_count: i32) -> GroupInstance {
GroupInstance {
instance_id,
location,
world: Box::new(world),
member_count,
}
}
}

View File

@ -0,0 +1,37 @@
/*
* VRChat API Documentation
*
*
* Contact: vrchatapi.lpv0t@aries.fyi
* Generated by: https://openapi-generator.tech
*/
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum GroupJoinRequestAction {
#[serde(rename = "accept")]
Accept,
#[serde(rename = "reject")]
Reject,
}
impl ToString for GroupJoinRequestAction {
fn to_string(&self) -> String {
match self {
Self::Accept => String::from("accept"),
Self::Reject => String::from("reject"),
}
}
}
impl Default for GroupJoinRequestAction {
fn default() -> GroupJoinRequestAction {
Self::Accept
}
}

View File

@ -18,8 +18,34 @@ pub struct GroupLimitedMember {
/// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.
#[serde(rename = "userId", skip_serializing_if = "Option::is_none")]
pub user_id: Option<String>,
/// Whether the user is representing the group. This makes the group show up above the name tag in-game.
#[serde(rename = "isRepresenting", skip_serializing_if = "Option::is_none")]
pub is_representing: Option<bool>,
#[serde(rename = "roleIds", skip_serializing_if = "Option::is_none")]
pub role_ids: Option<Vec<String>>,
#[serde(rename = "mRoleIds", skip_serializing_if = "Option::is_none")]
pub m_role_ids: Option<Vec<String>>,
#[serde(rename = "joinedAt", skip_serializing_if = "Option::is_none")]
pub joined_at: Option<String>,
#[serde(rename = "membershipStatus", skip_serializing_if = "Option::is_none")]
pub membership_status: Option<crate::models::GroupMemberStatus>,
#[serde(rename = "visibility", skip_serializing_if = "Option::is_none")]
pub visibility: Option<String>,
#[serde(rename = "isSubscribedToAnnouncements", skip_serializing_if = "Option::is_none")]
pub is_subscribed_to_announcements: Option<bool>,
/// Only visible via the /groups/:groupId/members endpoint, **not** when fetching a specific user.
#[serde(rename = "createdAt", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub created_at: Option<Option<String>>,
/// Only visible via the /groups/:groupId/members endpoint, **not** when fetching a specific user.
#[serde(rename = "bannedAt", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub banned_at: Option<Option<String>>,
/// Only visible via the /groups/:groupId/members endpoint, **not** when fetching a specific user.
#[serde(rename = "managerNotes", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub manager_notes: Option<Option<String>>,
#[serde(rename = "lastPostReadAt", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub last_post_read_at: Option<Option<String>>,
#[serde(rename = "hasJoinedFromPurchase", skip_serializing_if = "Option::is_none")]
pub has_joined_from_purchase: Option<bool>,
}
impl GroupLimitedMember {
@ -29,6 +55,17 @@ impl GroupLimitedMember {
group_id: None,
user_id: None,
is_representing: None,
role_ids: None,
m_role_ids: None,
joined_at: None,
membership_status: None,
visibility: None,
is_subscribed_to_announcements: None,
created_at: None,
banned_at: None,
manager_notes: None,
last_post_read_at: None,
has_joined_from_purchase: None,
}
}
}

View File

@ -25,10 +25,12 @@ pub struct GroupMember {
pub user: Option<Box<crate::models::GroupMemberLimitedUser>>,
#[serde(rename = "roleIds", skip_serializing_if = "Option::is_none")]
pub role_ids: Option<Vec<String>>,
#[serde(rename = "joinedAt", skip_serializing_if = "Option::is_none")]
pub joined_at: Option<String>,
#[serde(rename = "mRoleIds", skip_serializing_if = "Option::is_none")]
pub m_role_ids: Option<Vec<String>>,
#[serde(rename = "joinedAt", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub joined_at: Option<Option<String>>,
#[serde(rename = "membershipStatus", skip_serializing_if = "Option::is_none")]
pub membership_status: Option<String>,
pub membership_status: Option<crate::models::GroupMemberStatus>,
#[serde(rename = "visibility", skip_serializing_if = "Option::is_none")]
pub visibility: Option<String>,
#[serde(rename = "isSubscribedToAnnouncements", skip_serializing_if = "Option::is_none")]
@ -42,6 +44,10 @@ pub struct GroupMember {
/// Only visible via the /groups/:groupId/members endpoint, **not** when fetching a specific user.
#[serde(rename = "managerNotes", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub manager_notes: Option<Option<String>>,
#[serde(rename = "lastPostReadAt", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub last_post_read_at: Option<Option<String>>,
#[serde(rename = "hasJoinedFromPurchase", skip_serializing_if = "Option::is_none")]
pub has_joined_from_purchase: Option<bool>,
}
impl GroupMember {
@ -53,6 +59,7 @@ impl GroupMember {
is_representing: None,
user: None,
role_ids: None,
m_role_ids: None,
joined_at: None,
membership_status: None,
visibility: None,
@ -60,6 +67,8 @@ impl GroupMember {
created_at: None,
banned_at: None,
manager_notes: None,
last_post_read_at: None,
has_joined_from_purchase: None,
}
}
}

View File

@ -17,10 +17,16 @@ pub struct GroupMemberLimitedUser {
pub id: Option<String>,
#[serde(rename = "displayName", skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(rename = "thumbnailUrl", skip_serializing_if = "Option::is_none")]
pub thumbnail_url: Option<String>,
#[serde(rename = "thumbnailUrl", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub thumbnail_url: Option<Option<String>>,
#[serde(rename = "iconUrl", skip_serializing_if = "Option::is_none")]
pub icon_url: Option<String>,
#[serde(rename = "profilePicOverride", skip_serializing_if = "Option::is_none")]
pub profile_pic_override: Option<String>,
#[serde(rename = "currentAvatarThumbnailImageUrl", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub current_avatar_thumbnail_image_url: Option<Option<String>>,
#[serde(rename = "currentAvatarTags", skip_serializing_if = "Option::is_none")]
pub current_avatar_tags: Option<Vec<String>>,
}
impl GroupMemberLimitedUser {
@ -31,6 +37,9 @@ impl GroupMemberLimitedUser {
display_name: None,
thumbnail_url: None,
icon_url: None,
profile_pic_override: None,
current_avatar_thumbnail_image_url: None,
current_avatar_tags: None,
}
}
}

View File

@ -18,6 +18,8 @@ pub enum GroupMemberStatus {
Requested,
#[serde(rename = "invited")]
Invited,
#[serde(rename = "banned")]
Banned,
}
@ -28,6 +30,7 @@ impl ToString for GroupMemberStatus {
Self::Member => String::from("member"),
Self::Requested => String::from("requested"),
Self::Invited => String::from("invited"),
Self::Banned => String::from("banned"),
}
}
}

62
src/models/group_post.rs Normal file
View File

@ -0,0 +1,62 @@
/*
* VRChat API Documentation
*
*
* Contact: vrchatapi.lpv0t@aries.fyi
* Generated by: https://openapi-generator.tech
*/
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct GroupPost {
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "groupId", skip_serializing_if = "Option::is_none")]
pub group_id: Option<String>,
/// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.
#[serde(rename = "authorId", skip_serializing_if = "Option::is_none")]
pub author_id: Option<String>,
/// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.
#[serde(rename = "editorId", skip_serializing_if = "Option::is_none")]
pub editor_id: Option<String>,
#[serde(rename = "visibility", skip_serializing_if = "Option::is_none")]
pub visibility: Option<crate::models::GroupPostVisibility>,
///
#[serde(rename = "roleId", skip_serializing_if = "Option::is_none")]
pub role_id: Option<Vec<String>>,
#[serde(rename = "title", skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
#[serde(rename = "text", skip_serializing_if = "Option::is_none")]
pub text: Option<String>,
#[serde(rename = "imageId", skip_serializing_if = "Option::is_none")]
pub image_id: Option<String>,
#[serde(rename = "imageUrl", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub image_url: Option<Option<String>>,
#[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
#[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")]
pub updated_at: Option<String>,
}
impl GroupPost {
pub fn new() -> GroupPost {
GroupPost {
id: None,
group_id: None,
author_id: None,
editor_id: None,
visibility: None,
role_id: None,
title: None,
text: None,
image_id: None,
image_url: None,
created_at: None,
updated_at: None,
}
}
}

View File

@ -0,0 +1,37 @@
/*
* VRChat API Documentation
*
*
* Contact: vrchatapi.lpv0t@aries.fyi
* Generated by: https://openapi-generator.tech
*/
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum GroupPostVisibility {
#[serde(rename = "group")]
Group,
#[serde(rename = "public")]
Public,
}
impl ToString for GroupPostVisibility {
fn to_string(&self) -> String {
match self {
Self::Group => String::from("group"),
Self::Public => String::from("public"),
}
}
}
impl Default for GroupPostVisibility {
fn default() -> GroupPostVisibility {
Self::Group
}
}

View File

@ -0,0 +1,37 @@
/*
* VRChat API Documentation
*
*
* Contact: vrchatapi.lpv0t@aries.fyi
* Generated by: https://openapi-generator.tech
*/
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum GroupSearchSort {
#[serde(rename = "joinedAt:asc")]
Asc,
#[serde(rename = "joinedAt:desc")]
Desc,
}
impl ToString for GroupSearchSort {
fn to_string(&self) -> String {
match self {
Self::Asc => String::from("joinedAt:asc"),
Self::Desc => String::from("joinedAt:desc"),
}
}
}
impl Default for GroupSearchSort {
fn default() -> GroupSearchSort {
Self::Asc
}
}

View File

@ -22,7 +22,7 @@ pub struct InfoPush {
pub priority: i32,
///
#[serde(rename = "tags")]
pub tags: Vec<String>,
pub tags: Vec<crate::models::tags::Tags>,
#[serde(rename = "data")]
pub data: Box<crate::models::InfoPushData>,
/// Unknown usage, MD5
@ -41,7 +41,7 @@ pub struct InfoPush {
impl InfoPush {
///
pub fn new(id: String, is_enabled: bool, release_status: crate::models::ReleaseStatus, priority: i32, tags: Vec<String>, data: crate::models::InfoPushData, hash: String, created_at: String, updated_at: String) -> InfoPush {
pub fn new(id: String, is_enabled: bool, release_status: crate::models::ReleaseStatus, priority: i32, tags: Vec<crate::models::tags::Tags>, data: crate::models::InfoPushData, hash: String, created_at: String, updated_at: String) -> InfoPush {
InfoPush {
id,
is_enabled,

View File

@ -35,9 +35,9 @@ pub struct Instance {
pub n_users: i32,
#[serde(rename = "name")]
pub name: String,
/// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.
#[serde(rename = "ownerId", skip_serializing_if = "Option::is_none")]
pub owner_id: Option<String>,
/// A groupId if the instance type is \"group\", null if instance type is public, or a userId otherwise
#[serde(rename = "ownerId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub owner_id: Option<Option<String>>,
#[serde(rename = "permanent")]
pub permanent: bool,
#[serde(rename = "photonRegion")]
@ -45,14 +45,14 @@ pub struct Instance {
#[serde(rename = "platforms")]
pub platforms: Box<crate::models::InstancePlatforms>,
#[serde(rename = "region")]
pub region: crate::models::Region,
pub region: crate::models::InstanceRegion,
#[serde(rename = "secureName")]
pub secure_name: String,
#[serde(rename = "shortName", skip_serializing_if = "Option::is_none")]
pub short_name: Option<String>,
#[serde(rename = "shortName", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub short_name: Option<Option<String>>,
/// The tags array on Instances usually contain the language tags of the people in the instance.
#[serde(rename = "tags")]
pub tags: Vec<String>,
pub tags: Vec<crate::models::tags::Tags>,
#[serde(rename = "type")]
pub r#type: crate::models::InstanceType,
/// WorldID be \"offline\" on User profiles if you are not friends with that user.
@ -67,11 +67,38 @@ pub struct Instance {
/// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.
#[serde(rename = "private", skip_serializing_if = "Option::is_none")]
pub private: Option<String>,
#[serde(rename = "queueEnabled")]
pub queue_enabled: bool,
#[serde(rename = "queueSize")]
pub queue_size: i32,
#[serde(rename = "recommendedCapacity")]
pub recommended_capacity: i32,
#[serde(rename = "roleRestricted", skip_serializing_if = "Option::is_none")]
pub role_restricted: Option<bool>,
#[serde(rename = "strict")]
pub strict: bool,
#[serde(rename = "userCount")]
pub user_count: i32,
#[serde(rename = "world")]
pub world: Box<crate::models::World>,
/// The users field is present on instances created by the requesting user.
#[serde(rename = "users", skip_serializing_if = "Option::is_none")]
pub users: Option<Vec<crate::models::LimitedUser>>,
#[serde(rename = "groupAccessType", skip_serializing_if = "Option::is_none")]
pub group_access_type: Option<crate::models::GroupAccessType>,
#[serde(rename = "hasCapacityForYou", skip_serializing_if = "Option::is_none")]
pub has_capacity_for_you: Option<bool>,
#[serde(rename = "nonce", skip_serializing_if = "Option::is_none")]
pub nonce: Option<String>,
#[serde(rename = "closedAt", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub closed_at: Option<Option<String>>,
#[serde(rename = "hardClose", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub hard_close: Option<Option<bool>>,
}
impl Instance {
/// * `hidden` field is only present if InstanceType is `hidden` aka \"Friends+\", and is instance creator. * `friends` field is only present if InstanceType is `friends` aka \"Friends\", and is instance creator. * `private` field is only present if InstanceType is `private` aka \"Invite\" or \"Invite+\", and is instance creator.
pub fn new(active: bool, can_request_invite: bool, capacity: i32, client_number: String, full: bool, id: String, instance_id: String, location: String, n_users: i32, name: String, permanent: bool, photon_region: crate::models::Region, platforms: crate::models::InstancePlatforms, region: crate::models::Region, secure_name: String, tags: Vec<String>, r#type: crate::models::InstanceType, world_id: String) -> Instance {
pub fn new(active: bool, can_request_invite: bool, capacity: i32, client_number: String, full: bool, id: String, instance_id: String, location: String, n_users: i32, name: String, permanent: bool, photon_region: crate::models::Region, platforms: crate::models::InstancePlatforms, region: crate::models::InstanceRegion, secure_name: String, tags: Vec<crate::models::tags::Tags>, r#type: crate::models::InstanceType, world_id: String, queue_enabled: bool, queue_size: i32, recommended_capacity: i32, strict: bool, user_count: i32, world: crate::models::World) -> Instance {
Instance {
active,
can_request_invite,
@ -96,6 +123,19 @@ impl Instance {
hidden: None,
friends: None,
private: None,
queue_enabled,
queue_size,
recommended_capacity,
role_restricted: None,
strict,
user_count,
world: Box::new(world),
users: None,
group_access_type: None,
has_capacity_for_you: None,
nonce: None,
closed_at: None,
hard_close: None,
}
}
}

View File

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

View File

@ -0,0 +1,77 @@
/*
* VRChat API Documentation
*
*
* Contact: vrchatapi.lpv0t@aries.fyi
* Generated by: https://openapi-generator.tech
*/
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct LimitedGroup {
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "shortCode", skip_serializing_if = "Option::is_none")]
pub short_code: Option<String>,
#[serde(rename = "discriminator", skip_serializing_if = "Option::is_none")]
pub discriminator: Option<String>,
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "iconUrl", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub icon_url: Option<Option<String>>,
#[serde(rename = "bannerUrl", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub banner_url: Option<Option<String>>,
/// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.
#[serde(rename = "ownerId", skip_serializing_if = "Option::is_none")]
pub owner_id: Option<String>,
#[serde(rename = "rules", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub rules: Option<Option<String>>,
#[serde(rename = "iconId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub icon_id: Option<Option<String>>,
#[serde(rename = "bannerId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub banner_id: Option<Option<String>>,
#[serde(rename = "memberCount", skip_serializing_if = "Option::is_none")]
pub member_count: Option<i32>,
///
#[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<String>>,
#[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
#[serde(rename = "membershipStatus", skip_serializing_if = "Option::is_none")]
pub membership_status: Option<crate::models::GroupMemberStatus>,
#[serde(rename = "isSearchable", skip_serializing_if = "Option::is_none")]
pub is_searchable: Option<bool>,
///
#[serde(rename = "galleries", skip_serializing_if = "Option::is_none")]
pub galleries: Option<Vec<crate::models::GroupGallery>>,
}
impl LimitedGroup {
pub fn new() -> LimitedGroup {
LimitedGroup {
id: None,
name: None,
short_code: None,
discriminator: None,
description: None,
icon_url: None,
banner_url: None,
owner_id: None,
rules: None,
icon_id: None,
banner_id: None,
member_count: None,
tags: None,
created_at: None,
membership_status: None,
is_searchable: None,
galleries: None,
}
}
}

View File

@ -14,12 +14,17 @@
pub struct LimitedUser {
#[serde(rename = "bio", skip_serializing_if = "Option::is_none")]
pub bio: Option<String>,
///
#[serde(rename = "bioLinks", skip_serializing_if = "Option::is_none")]
pub bio_links: Option<Vec<String>>,
/// When profilePicOverride is not empty, use it instead.
#[serde(rename = "currentAvatarImageUrl")]
pub current_avatar_image_url: String,
#[serde(rename = "currentAvatarImageUrl", skip_serializing_if = "Option::is_none")]
pub current_avatar_image_url: Option<String>,
/// When profilePicOverride is not empty, use it instead.
#[serde(rename = "currentAvatarThumbnailImageUrl")]
pub current_avatar_thumbnail_image_url: String,
#[serde(rename = "currentAvatarThumbnailImageUrl", skip_serializing_if = "Option::is_none")]
pub current_avatar_thumbnail_image_url: Option<String>,
#[serde(rename = "currentAvatarTags", skip_serializing_if = "Option::is_none")]
pub current_avatar_tags: Option<Vec<String>>,
#[serde(rename = "developerType")]
pub developer_type: crate::models::DeveloperType,
#[serde(rename = "displayName")]
@ -34,17 +39,19 @@ pub struct LimitedUser {
/// This can be `standalonewindows` or `android`, but can also pretty much be any random Unity verison such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`.
#[serde(rename = "last_platform")]
pub last_platform: String,
#[serde(rename = "profilePicOverride")]
pub profile_pic_override: String,
#[serde(rename = "profilePicOverride", skip_serializing_if = "Option::is_none")]
pub profile_pic_override: Option<String>,
#[serde(rename = "pronouns", skip_serializing_if = "Option::is_none")]
pub pronouns: Option<String>,
#[serde(rename = "status")]
pub status: crate::models::UserStatus,
#[serde(rename = "statusDescription")]
pub status_description: String,
/// <- Always empty.
#[serde(rename = "tags")]
pub tags: Vec<String>,
#[serde(rename = "userIcon")]
pub user_icon: String,
pub tags: Vec<crate::models::tags::Tags>,
#[serde(rename = "userIcon", skip_serializing_if = "Option::is_none")]
pub user_icon: Option<String>,
/// -| **DEPRECATED:** VRChat API no longer return usernames of other users. [See issue by Tupper for more information](https://github.com/pypy-vrc/VRCX/issues/429).
#[serde(rename = "username", skip_serializing_if = "Option::is_none")]
pub username: Option<String>,
@ -56,22 +63,25 @@ pub struct LimitedUser {
impl LimitedUser {
///
pub fn new(current_avatar_image_url: String, current_avatar_thumbnail_image_url: String, developer_type: crate::models::DeveloperType, display_name: String, id: String, is_friend: bool, last_platform: String, profile_pic_override: String, status: crate::models::UserStatus, status_description: String, tags: Vec<String>, user_icon: String) -> LimitedUser {
pub fn new(developer_type: crate::models::DeveloperType, display_name: String, id: String, is_friend: bool, last_platform: String, status: crate::models::UserStatus, status_description: String, tags: Vec<crate::models::tags::Tags>) -> LimitedUser {
LimitedUser {
bio: None,
current_avatar_image_url,
current_avatar_thumbnail_image_url,
bio_links: None,
current_avatar_image_url: None,
current_avatar_thumbnail_image_url: None,
current_avatar_tags: None,
developer_type,
display_name,
fallback_avatar: None,
id,
is_friend,
last_platform,
profile_pic_override,
profile_pic_override: None,
pronouns: None,
status,
status_description,
tags,
user_icon,
user_icon: None,
username: None,
location: None,
friend_key: None,

View File

@ -0,0 +1,78 @@
/*
* VRChat API Documentation
*
*
* Contact: vrchatapi.lpv0t@aries.fyi
* Generated by: https://openapi-generator.tech
*/
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct LimitedUserGroups {
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "shortCode", skip_serializing_if = "Option::is_none")]
pub short_code: Option<String>,
#[serde(rename = "discriminator", skip_serializing_if = "Option::is_none")]
pub discriminator: Option<String>,
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "iconId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub icon_id: Option<Option<String>>,
#[serde(rename = "iconUrl", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub icon_url: Option<Option<String>>,
#[serde(rename = "bannerId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub banner_id: Option<Option<String>>,
#[serde(rename = "bannerUrl", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub banner_url: Option<Option<String>>,
#[serde(rename = "privacy", skip_serializing_if = "Option::is_none")]
pub privacy: Option<String>,
#[serde(rename = "lastPostCreatedAt", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub last_post_created_at: Option<Option<String>>,
/// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.
#[serde(rename = "ownerId", skip_serializing_if = "Option::is_none")]
pub owner_id: Option<String>,
#[serde(rename = "memberCount", skip_serializing_if = "Option::is_none")]
pub member_count: Option<i32>,
#[serde(rename = "groupId", skip_serializing_if = "Option::is_none")]
pub group_id: Option<String>,
#[serde(rename = "memberVisibility", skip_serializing_if = "Option::is_none")]
pub member_visibility: Option<String>,
#[serde(rename = "isRepresenting", skip_serializing_if = "Option::is_none")]
pub is_representing: Option<bool>,
#[serde(rename = "mutualGroup", skip_serializing_if = "Option::is_none")]
pub mutual_group: Option<bool>,
#[serde(rename = "lastPostReadAt", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub last_post_read_at: Option<Option<String>>,
}
impl LimitedUserGroups {
pub fn new() -> LimitedUserGroups {
LimitedUserGroups {
id: None,
name: None,
short_code: None,
discriminator: None,
description: None,
icon_id: None,
icon_url: None,
banner_id: None,
banner_url: None,
privacy: None,
last_post_created_at: None,
owner_id: None,
member_count: None,
group_id: None,
member_visibility: None,
is_representing: None,
mutual_group: None,
last_post_read_at: None,
}
}
}

View File

@ -19,10 +19,14 @@ pub struct LimitedWorld {
pub author_name: String,
#[serde(rename = "capacity")]
pub capacity: i32,
#[serde(rename = "recommendedCapacity", skip_serializing_if = "Option::is_none")]
pub recommended_capacity: Option<i32>,
#[serde(rename = "created_at")]
pub created_at: String,
#[serde(rename = "favorites")]
pub favorites: i32,
#[serde(rename = "visits", skip_serializing_if = "Option::is_none")]
pub visits: Option<i32>,
#[serde(rename = "heat")]
pub heat: i32,
/// WorldID be \"offline\" on User profiles if you are not friends with that user.
@ -40,13 +44,15 @@ pub struct LimitedWorld {
pub organization: String,
#[serde(rename = "popularity")]
pub popularity: i32,
#[serde(rename = "previewYoutubeId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub preview_youtube_id: Option<Option<String>>,
#[serde(rename = "publicationDate")]
pub publication_date: String,
#[serde(rename = "releaseStatus")]
pub release_status: crate::models::ReleaseStatus,
///
#[serde(rename = "tags")]
pub tags: Vec<String>,
pub tags: Vec<crate::models::tags::Tags>,
#[serde(rename = "thumbnailImageUrl")]
pub thumbnail_image_url: String,
///
@ -54,17 +60,21 @@ pub struct LimitedWorld {
pub unity_packages: Vec<crate::models::LimitedUnityPackage>,
#[serde(rename = "updated_at")]
pub updated_at: String,
#[serde(rename = "udonProducts", skip_serializing_if = "Option::is_none")]
pub udon_products: Option<Vec<String>>,
}
impl LimitedWorld {
///
pub fn new(author_id: String, author_name: String, capacity: i32, created_at: String, favorites: i32, heat: i32, id: String, image_url: String, labs_publication_date: String, name: String, occupants: i32, organization: String, popularity: i32, publication_date: String, release_status: crate::models::ReleaseStatus, tags: Vec<String>, thumbnail_image_url: String, unity_packages: Vec<crate::models::LimitedUnityPackage>, updated_at: String) -> LimitedWorld {
pub fn new(author_id: String, author_name: String, capacity: i32, created_at: String, favorites: i32, heat: i32, id: String, image_url: String, labs_publication_date: String, name: String, occupants: i32, organization: String, popularity: i32, publication_date: String, release_status: crate::models::ReleaseStatus, tags: Vec<crate::models::tags::Tags>, thumbnail_image_url: String, unity_packages: Vec<crate::models::LimitedUnityPackage>, updated_at: String) -> LimitedWorld {
LimitedWorld {
author_id,
author_name,
capacity,
recommended_capacity: None,
created_at,
favorites,
visits: None,
heat,
id,
image_url,
@ -73,12 +83,14 @@ impl LimitedWorld {
occupants,
organization,
popularity,
preview_youtube_id: None,
publication_date,
release_status,
tags,
thumbnail_image_url,
unity_packages,
updated_at,
udon_products: None,
}
}
}

View File

@ -18,6 +18,8 @@ pub mod avatar;
pub use self::avatar::Avatar;
pub mod avatar_unity_package_url_object;
pub use self::avatar_unity_package_url_object::AvatarUnityPackageUrlObject;
pub mod badge;
pub use self::badge::Badge;
pub mod ban_group_member_request;
pub use self::ban_group_member_request::BanGroupMemberRequest;
pub mod create_avatar_request;
@ -32,14 +34,18 @@ pub mod create_group_gallery_request;
pub use self::create_group_gallery_request::CreateGroupGalleryRequest;
pub mod create_group_invite_request;
pub use self::create_group_invite_request::CreateGroupInviteRequest;
pub mod create_group_post_request;
pub use self::create_group_post_request::CreateGroupPostRequest;
pub mod create_group_request;
pub use self::create_group_request::CreateGroupRequest;
pub mod create_group_role_request;
pub use self::create_group_role_request::CreateGroupRoleRequest;
pub mod create_instance_request;
pub use self::create_instance_request::CreateInstanceRequest;
pub mod create_world_request;
pub use self::create_world_request::CreateWorldRequest;
pub mod current_user;
pub use self::current_user::CurrentUser;
pub use self::current_user::{EitherUserOrTwoFactor, CurrentUser};
pub mod current_user_presence;
pub use self::current_user_presence::CurrentUserPresence;
pub mod deployment_group;
@ -76,6 +82,8 @@ pub mod friend_status;
pub use self::friend_status::FriendStatus;
pub mod group;
pub use self::group::Group;
pub mod group_access_type;
pub use self::group_access_type::GroupAccessType;
pub mod group_announcement;
pub use self::group_announcement::GroupAnnouncement;
pub mod group_audit_log_entry;
@ -84,6 +92,10 @@ pub mod group_gallery;
pub use self::group_gallery::GroupGallery;
pub mod group_gallery_image;
pub use self::group_gallery_image::GroupGalleryImage;
pub mod group_instance;
pub use self::group_instance::GroupInstance;
pub mod group_join_request_action;
pub use self::group_join_request_action::GroupJoinRequestAction;
pub mod group_join_state;
pub use self::group_join_state::GroupJoinState;
pub mod group_limited_member;
@ -98,12 +110,18 @@ pub mod group_my_member;
pub use self::group_my_member::GroupMyMember;
pub mod group_permission;
pub use self::group_permission::GroupPermission;
pub mod group_post;
pub use self::group_post::GroupPost;
pub mod group_post_visibility;
pub use self::group_post_visibility::GroupPostVisibility;
pub mod group_privacy;
pub use self::group_privacy::GroupPrivacy;
pub mod group_role;
pub use self::group_role::GroupRole;
pub mod group_role_template;
pub use self::group_role_template::GroupRoleTemplate;
pub mod group_search_sort;
pub use self::group_search_sort::GroupSearchSort;
pub mod group_user_visibility;
pub use self::group_user_visibility::GroupUserVisibility;
pub mod info_push;
@ -120,6 +138,8 @@ pub mod instance;
pub use self::instance::Instance;
pub mod instance_platforms;
pub use self::instance_platforms::InstancePlatforms;
pub mod instance_region;
pub use self::instance_region::InstanceRegion;
pub mod instance_short_name_response;
pub use self::instance_short_name_response::InstanceShortNameResponse;
pub mod instance_type;
@ -140,10 +160,14 @@ pub mod license_group;
pub use self::license_group::LicenseGroup;
pub mod license_type;
pub use self::license_type::LicenseType;
pub mod limited_group;
pub use self::limited_group::LimitedGroup;
pub mod limited_unity_package;
pub use self::limited_unity_package::LimitedUnityPackage;
pub mod limited_user;
pub use self::limited_user::LimitedUser;
pub mod limited_user_groups;
pub use self::limited_user_groups::LimitedUserGroups;
pub mod limited_world;
pub use self::limited_world::LimitedWorld;
pub mod mime_type;
@ -152,6 +176,16 @@ pub mod moderate_user_request;
pub use self::moderate_user_request::ModerateUserRequest;
pub mod notification;
pub use self::notification::Notification;
pub mod notification_detail_invite;
pub use self::notification_detail_invite::NotificationDetailInvite;
pub mod notification_detail_invite_response;
pub use self::notification_detail_invite_response::NotificationDetailInviteResponse;
pub mod notification_detail_request_invite;
pub use self::notification_detail_request_invite::NotificationDetailRequestInvite;
pub mod notification_detail_request_invite_response;
pub use self::notification_detail_request_invite_response::NotificationDetailRequestInviteResponse;
pub mod notification_detail_vote_to_kick;
pub use self::notification_detail_vote_to_kick::NotificationDetailVoteToKick;
pub mod notification_type;
pub use self::notification_type::NotificationType;
pub mod order_option;
@ -170,6 +204,8 @@ pub mod region;
pub use self::region::Region;
pub mod release_status;
pub use self::release_status::ReleaseStatus;
pub mod represented_group;
pub use self::represented_group::RepresentedGroup;
pub mod request_invite_request;
pub use self::request_invite_request::RequestInviteRequest;
pub mod respond_group_join_request;
@ -242,3 +278,4 @@ pub mod world_metadata;
pub use self::world_metadata::WorldMetadata;
pub mod world_publish_status;
pub use self::world_publish_status::WorldPublishStatus;
pub mod tags;

Some files were not shown because too many files have changed in this diff Show More