diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4905676..b4e66ad 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -21,10 +21,10 @@ jobs: key: ${{ runner.os }}-node-v16-${{ hashFiles('**/generate.sh') }} restore-keys: | ${{ runner.os }}-node-v16 -# - name: Install OpenAPI Generator CLI -# run: npm install @openapitools/openapi-generator-cli -# - name: Set OpenAPI Generator version -# run: ./node_modules/\@openapitools/openapi-generator-cli/main.js version-manager set 5.3.0 + - name: Install OpenAPI Generator CLI + run: npm install @openapitools/openapi-generator-cli + - name: Set OpenAPI Generator version + run: ./node_modules/\@openapitools/openapi-generator-cli/main.js version-manager set 6.2.1 - name: Set up JDK 13 uses: actions/setup-java@v2 with: diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 3a73aff..2705d4c 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,21 +1,29 @@ .travis.yml Cargo.toml docs/AddFavoriteRequest.md +docs/AddGroupGalleryImageRequest.md docs/ApiConfig.md -docs/ApiEventConfig.md +docs/ApiConfigAnnouncement.md +docs/ApiConfigDownloadUrlList.md +docs/ApiConfigEvents.md docs/ApiHealth.md docs/AuthenticationApi.md docs/Avatar.md docs/AvatarUnityPackageUrlObject.md docs/AvatarsApi.md +docs/BanGroupMemberRequest.md docs/CreateAvatarRequest.md docs/CreateFileRequest.md docs/CreateFileVersionRequest.md +docs/CreateGroupAnnouncementRequest.md +docs/CreateGroupGalleryRequest.md +docs/CreateGroupInviteRequest.md +docs/CreateGroupRequest.md +docs/CreateGroupRoleRequest.md docs/CreateWorldRequest.md docs/CurrentUser.md docs/DeploymentGroup.md docs/DeveloperType.md -docs/DownloadUrlList.md docs/DynamicContentRow.md docs/EconomyApi.md docs/Error.md @@ -34,6 +42,23 @@ docs/FilesApi.md docs/FinishFileDataUploadRequest.md docs/FriendStatus.md docs/FriendsApi.md +docs/Group.md +docs/GroupAnnouncement.md +docs/GroupAuditLogEntry.md +docs/GroupGallery.md +docs/GroupGalleryImage.md +docs/GroupJoinState.md +docs/GroupLimitedMember.md +docs/GroupMember.md +docs/GroupMemberLimitedUser.md +docs/GroupMemberStatus.md +docs/GroupMyMember.md +docs/GroupPermission.md +docs/GroupPrivacy.md +docs/GroupRole.md +docs/GroupRoleTemplate.md +docs/GroupUserVisibility.md +docs/GroupsApi.md docs/InfoPush.md docs/InfoPushData.md docs/InfoPushDataArticle.md @@ -61,18 +86,21 @@ docs/ModerateUserRequest.md docs/Notification.md docs/NotificationType.md docs/NotificationsApi.md +docs/OrderOption.md +docs/PaginatedGroupAuditLogEntryList.md docs/PastDisplayName.md docs/Permission.md docs/PermissionsApi.md docs/PlayerModeration.md docs/PlayerModerationType.md docs/PlayermoderationApi.md -docs/PublicAnnouncement.md docs/Region.md docs/ReleaseStatus.md docs/RequestInviteRequest.md +docs/RespondGroupJoinRequest.md docs/Response.md docs/SentNotification.md +docs/SortOption.md docs/Subscription.md docs/SubscriptionPeriod.md docs/Success.md @@ -86,6 +114,10 @@ docs/TwoFactorAuthCode.md docs/UnityPackage.md docs/UpdateAvatarRequest.md docs/UpdateFavoriteGroupRequest.md +docs/UpdateGroupGalleryRequest.md +docs/UpdateGroupMemberRequest.md +docs/UpdateGroupRequest.md +docs/UpdateGroupRoleRequest.md docs/UpdateInviteMessageRequest.md docs/UpdateUserRequest.md docs/UpdateWorldRequest.md @@ -109,6 +141,7 @@ src/apis/economy_api.rs src/apis/favorites_api.rs src/apis/files_api.rs src/apis/friends_api.rs +src/apis/groups_api.rs src/apis/instances_api.rs src/apis/invite_api.rs src/apis/mod.rs @@ -120,19 +153,27 @@ src/apis/users_api.rs src/apis/worlds_api.rs src/lib.rs src/models/add_favorite_request.rs +src/models/add_group_gallery_image_request.rs src/models/api_config.rs -src/models/api_event_config.rs +src/models/api_config_announcement.rs +src/models/api_config_download_url_list.rs +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/ban_group_member_request.rs src/models/create_avatar_request.rs src/models/create_file_request.rs 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_request.rs +src/models/create_group_role_request.rs src/models/create_world_request.rs src/models/current_user.rs src/models/deployment_group.rs src/models/developer_type.rs -src/models/download_url_list.rs src/models/dynamic_content_row.rs src/models/error.rs src/models/favorite.rs @@ -147,6 +188,22 @@ src/models/file_version.rs src/models/file_version_upload_status.rs src/models/finish_file_data_upload_request.rs src/models/friend_status.rs +src/models/group.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_join_state.rs +src/models/group_limited_member.rs +src/models/group_member.rs +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_privacy.rs +src/models/group_role.rs +src/models/group_role_template.rs +src/models/group_user_visibility.rs src/models/info_push.rs src/models/info_push_data.rs src/models/info_push_data_article.rs @@ -172,16 +229,19 @@ src/models/mod.rs src/models/moderate_user_request.rs src/models/notification.rs src/models/notification_type.rs +src/models/order_option.rs +src/models/paginated_group_audit_log_entry_list.rs src/models/past_display_name.rs src/models/permission.rs src/models/player_moderation.rs src/models/player_moderation_type.rs -src/models/public_announcement.rs src/models/region.rs src/models/release_status.rs src/models/request_invite_request.rs +src/models/respond_group_join_request.rs src/models/response.rs src/models/sent_notification.rs +src/models/sort_option.rs src/models/subscription.rs src/models/subscription_period.rs src/models/success.rs @@ -194,6 +254,10 @@ src/models/two_factor_auth_code.rs src/models/unity_package.rs src/models/update_avatar_request.rs src/models/update_favorite_group_request.rs +src/models/update_group_gallery_request.rs +src/models/update_group_member_request.rs +src/models/update_group_request.rs +src/models/update_group_role_request.rs src/models/update_invite_message_request.rs src/models/update_user_request.rs src/models/update_world_request.rs diff --git a/docs/AddGroupGalleryImageRequest.md b/docs/AddGroupGalleryImageRequest.md new file mode 100644 index 0000000..8775975 --- /dev/null +++ b/docs/AddGroupGalleryImageRequest.md @@ -0,0 +1,11 @@ +# AddGroupGalleryImageRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file_id** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApiConfig.md b/docs/ApiConfig.md index 0197c85..98d434e 100644 --- a/docs/ApiConfig.md +++ b/docs/ApiConfig.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **voice_enable_degradation** | **bool** | Unknown, probably voice optimization testing | [default to false] **voice_enable_receiver_limiting** | **bool** | Unknown, probably voice optimization testing | [default to true] **address** | **String** | VRChat's office address | -**announcements** | [**Vec**](Public_Announcement.md) | Public Announcements | +**announcements** | [**Vec**](APIConfigAnnouncement.md) | Public Announcements | **api_key** | **String** | apiKey to be used for all other requests | **app_name** | **String** | Game name | [default to VrChat] **build_version_tag** | **String** | Build tag of the API server | @@ -43,9 +43,9 @@ Name | Type | Description | Notes **disable_udon** | **bool** | Toggles if Udon should be universally disabled in-game. | [default to false] **disable_upgrade_account** | **bool** | Toggles if account upgrading \"linking with Steam/Oculus\" should be disabled. | [default to false] **download_link_windows** | **String** | Download link for game on the Oculus Rift website. | -**download_urls** | [**crate::models::DownloadUrlList**](DownloadURLList.md) | | +**download_urls** | [**crate::models::ApiConfigDownloadUrlList**](APIConfigDownloadURLList.md) | | **dynamic_world_rows** | [**Vec**](DynamicContentRow.md) | Array of DynamicWorldRow objects, used by the game to display the list of world rows | -**events** | [**crate::models::ApiEventConfig**](APIEventConfig.md) | | +**events** | [**crate::models::ApiConfigEvents**](APIConfigEvents.md) | | **gear_demo_room_id** | **String** | Unknown | **home_world_id** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | **homepage_redirect_target** | **String** | Redirect target if you try to open the base API domain in your browser | [default to https://hello.vrchat.com] diff --git a/docs/PublicAnnouncement.md b/docs/ApiConfigAnnouncement.md similarity index 93% rename from docs/PublicAnnouncement.md rename to docs/ApiConfigAnnouncement.md index cc6590b..4b7f134 100644 --- a/docs/PublicAnnouncement.md +++ b/docs/ApiConfigAnnouncement.md @@ -1,4 +1,4 @@ -# PublicAnnouncement +# ApiConfigAnnouncement ## Properties diff --git a/docs/DownloadUrlList.md b/docs/ApiConfigDownloadUrlList.md similarity index 94% rename from docs/DownloadUrlList.md rename to docs/ApiConfigDownloadUrlList.md index d3c1e78..1b2236a 100644 --- a/docs/DownloadUrlList.md +++ b/docs/ApiConfigDownloadUrlList.md @@ -1,4 +1,4 @@ -# DownloadUrlList +# ApiConfigDownloadUrlList ## Properties diff --git a/docs/ApiEventConfig.md b/docs/ApiConfigEvents.md similarity index 97% rename from docs/ApiEventConfig.md rename to docs/ApiConfigEvents.md index 60fc2c1..33ac223 100644 --- a/docs/ApiEventConfig.md +++ b/docs/ApiConfigEvents.md @@ -1,4 +1,4 @@ -# ApiEventConfig +# ApiConfigEvents ## Properties diff --git a/docs/AuthenticationApi.md b/docs/AuthenticationApi.md index 1a6c241..c32dafa 100644 --- a/docs/AuthenticationApi.md +++ b/docs/AuthenticationApi.md @@ -59,7 +59,7 @@ Deletes the account with given ID. Normal users only have permission to delete t Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**user_id** | **String** | | [required] | +**user_id** | **String** | Must be a valid user ID. | [required] | ### Return type diff --git a/docs/AvatarsApi.md b/docs/AvatarsApi.md index 83c2fe4..c80ae1b 100644 --- a/docs/AvatarsApi.md +++ b/docs/AvatarsApi.md @@ -58,7 +58,7 @@ Delete an avatar. Notice an avatar is never fully \"deleted\", only its ReleaseS Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**avatar_id** | **String** | | [required] | +**avatar_id** | **String** | Must be a valid avatar ID. | [required] | ### Return type @@ -88,7 +88,7 @@ Get information about a specific Avatar. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**avatar_id** | **String** | | [required] | +**avatar_id** | **String** | Must be a valid avatar ID. | [required] | ### Return type @@ -119,14 +119,14 @@ Search and list favorited avatars by query filters. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **featured** | Option<**bool**> | Filters on featured results. | | -**sort** | Option<**String**> | | |[default to popularity] +**sort** | Option<[**SortOption**](.md)> | The sort order of the results. | | **n** | Option<**i32**> | The number of objects to return. | |[default to 60] -**order** | Option<**String**> | | |[default to descending] +**order** | Option<[**OrderOption**](.md)> | Result ordering | | **offset** | Option<**i32**> | A zero-based offset from the default object sorting from where search results start. | | **search** | Option<**String**> | Filters by world name. | | **tag** | Option<**String**> | Tags to include (comma-separated). Any of the tags needs to be present. | | **notag** | Option<**String**> | Tags to exclude (comma-separated). | | -**release_status** | Option<**String**> | Filter by ReleaseStatus. | |[default to public] +**release_status** | Option<[**ReleaseStatus**](.md)> | Filter by ReleaseStatus. | | **max_unity_version** | Option<**String**> | The maximum Unity version supported by the asset. | | **min_unity_version** | Option<**String**> | The minimum Unity version supported by the asset. | | **platform** | Option<**String**> | The platform the asset supports. | | @@ -160,7 +160,7 @@ Get the current avatar for the user. This will return an error for any other use Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**user_id** | **String** | | [required] | +**user_id** | **String** | Must be a valid user ID. | [required] | ### Return type @@ -191,15 +191,15 @@ Search and list avatars by query filters. You can only search your own or featur Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **featured** | Option<**bool**> | Filters on featured results. | | -**sort** | Option<**String**> | | |[default to popularity] +**sort** | Option<[**SortOption**](.md)> | The sort order of the results. | | **user** | Option<**String**> | Set to `me` for searching own avatars. | | **user_id** | Option<**String**> | Filter by UserID. | | **n** | Option<**i32**> | The number of objects to return. | |[default to 60] -**order** | Option<**String**> | | |[default to descending] +**order** | Option<[**OrderOption**](.md)> | Result ordering | | **offset** | Option<**i32**> | A zero-based offset from the default object sorting from where search results start. | | **tag** | Option<**String**> | Tags to include (comma-separated). Any of the tags needs to be present. | | **notag** | Option<**String**> | Tags to exclude (comma-separated). | | -**release_status** | Option<**String**> | Filter by ReleaseStatus. | |[default to public] +**release_status** | Option<[**ReleaseStatus**](.md)> | Filter by ReleaseStatus. | | **max_unity_version** | Option<**String**> | The maximum Unity version supported by the asset. | | **min_unity_version** | Option<**String**> | The minimum Unity version supported by the asset. | | **platform** | Option<**String**> | The platform the asset supports. | | @@ -232,7 +232,7 @@ Switches into that avatar. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**avatar_id** | **String** | | [required] | +**avatar_id** | **String** | Must be a valid avatar ID. | [required] | ### Return type @@ -262,7 +262,7 @@ Switches into that avatar as your fallback avatar. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**avatar_id** | **String** | | [required] | +**avatar_id** | **String** | Must be a valid avatar ID. | [required] | ### Return type @@ -292,7 +292,7 @@ Update information about a specific avatar. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**avatar_id** | **String** | | [required] | +**avatar_id** | **String** | Must be a valid avatar ID. | [required] | **update_avatar_request** | Option<[**UpdateAvatarRequest**](UpdateAvatarRequest.md)> | | | ### Return type diff --git a/docs/BanGroupMemberRequest.md b/docs/BanGroupMemberRequest.md new file mode 100644 index 0000000..1e5b208 --- /dev/null +++ b/docs/BanGroupMemberRequest.md @@ -0,0 +1,11 @@ +# BanGroupMemberRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateGroupAnnouncementRequest.md b/docs/CreateGroupAnnouncementRequest.md new file mode 100644 index 0000000..2d13119 --- /dev/null +++ b/docs/CreateGroupAnnouncementRequest.md @@ -0,0 +1,14 @@ +# CreateGroupAnnouncementRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **String** | Announcement title | +**text** | Option<**String**> | Announcement text | [optional] +**image_id** | Option<**String**> | | [optional] +**send_notification** | Option<**bool**> | Send notification to group members. | [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) + + diff --git a/docs/CreateGroupGalleryRequest.md b/docs/CreateGroupGalleryRequest.md new file mode 100644 index 0000000..c42b71d --- /dev/null +++ b/docs/CreateGroupGalleryRequest.md @@ -0,0 +1,17 @@ +# CreateGroupGalleryRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Name of the gallery. | +**description** | Option<**String**> | Description of the gallery. | [optional] +**members_only** | Option<**bool**> | Whether the gallery is members only. | [optional][default to false] +**role_ids_to_view** | Option<**Vec**> | | [optional] +**role_ids_to_submit** | Option<**Vec**> | | [optional] +**role_ids_to_auto_approve** | Option<**Vec**> | | [optional] +**role_ids_to_manage** | Option<**Vec**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateGroupInviteRequest.md b/docs/CreateGroupInviteRequest.md new file mode 100644 index 0000000..f16413f --- /dev/null +++ b/docs/CreateGroupInviteRequest.md @@ -0,0 +1,12 @@ +# CreateGroupInviteRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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. | +**confirm_override_block** | Option<**bool**> | | [optional][default to true] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateGroupRequest.md b/docs/CreateGroupRequest.md new file mode 100644 index 0000000..d58bb4b --- /dev/null +++ b/docs/CreateGroupRequest.md @@ -0,0 +1,18 @@ +# CreateGroupRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | +**short_code** | **String** | | +**description** | Option<**String**> | | [optional] +**join_state** | Option<[**crate::models::GroupJoinState**](GroupJoinState.md)> | | [optional] +**icon_id** | Option<**String**> | | [optional] +**banner_id** | Option<**String**> | | [optional] +**privacy** | Option<[**crate::models::GroupPrivacy**](GroupPrivacy.md)> | | [optional] +**role_template** | [**crate::models::GroupRoleTemplate**](GroupRoleTemplate.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateGroupRoleRequest.md b/docs/CreateGroupRoleRequest.md new file mode 100644 index 0000000..c0c9502 --- /dev/null +++ b/docs/CreateGroupRoleRequest.md @@ -0,0 +1,15 @@ +# CreateGroupRoleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**String**> | | [optional] +**name** | Option<**String**> | | [optional] +**description** | Option<**String**> | | [optional] +**is_self_assignable** | Option<**bool**> | | [optional][default to false] +**permissions** | Option<**Vec**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EconomyApi.md b/docs/EconomyApi.md index 80334d4..c939aa2 100644 --- a/docs/EconomyApi.md +++ b/docs/EconomyApi.md @@ -51,7 +51,7 @@ Get a single License Group by given ID. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**license_group_id** | **String** | | [required] | +**license_group_id** | **String** | Must be a valid license group ID. | [required] | ### Return type @@ -81,7 +81,7 @@ Get a single Steam transactions by ID. This returns the exact same information a Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**transaction_id** | **String** | | [required] | +**transaction_id** | **String** | Must be a valid transaction ID. | [required] | ### Return type diff --git a/docs/FavoritesApi.md b/docs/FavoritesApi.md index 99db2b7..513f73d 100644 --- a/docs/FavoritesApi.md +++ b/docs/FavoritesApi.md @@ -58,8 +58,8 @@ Clear ALL contents of a specific favorite group. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **favorite_group_type** | **String** | The type of group to fetch, must be a valid FavoriteType. | [required] | -**favorite_group_name** | **String** | | [required] | -**user_id** | **String** | | [required] | +**favorite_group_name** | **String** | The name of the group to fetch, must be a name of a FavoriteGroup. | [required] | +**user_id** | **String** | Must be a valid user ID. | [required] | ### Return type @@ -89,7 +89,7 @@ Return information about a specific Favorite. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**favorite_id** | **String** | | [required] | +**favorite_id** | **String** | Must be a valid favorite ID. | [required] | ### Return type @@ -120,8 +120,8 @@ Fetch information about a specific favorite group. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **favorite_group_type** | **String** | The type of group to fetch, must be a valid FavoriteType. | [required] | -**favorite_group_name** | **String** | | [required] | -**user_id** | **String** | | [required] | +**favorite_group_name** | **String** | The name of the group to fetch, must be a name of a FavoriteGroup. | [required] | +**user_id** | **String** | Must be a valid user ID. | [required] | ### Return type @@ -216,7 +216,7 @@ Remove a favorite from your favorites list. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**favorite_id** | **String** | | [required] | +**favorite_id** | **String** | Must be a valid favorite ID. | [required] | ### Return type @@ -247,8 +247,8 @@ Update information about a specific favorite group. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **favorite_group_type** | **String** | The type of group to fetch, must be a valid FavoriteType. | [required] | -**favorite_group_name** | **String** | | [required] | -**user_id** | **String** | | [required] | +**favorite_group_name** | **String** | The name of the group to fetch, must be a name of a FavoriteGroup. | [required] | +**user_id** | **String** | Must be a valid user ID. | [required] | **update_favorite_group_request** | Option<[**UpdateFavoriteGroupRequest**](UpdateFavoriteGroupRequest.md)> | | | ### Return type diff --git a/docs/FilesApi.md b/docs/FilesApi.md index d2e2308..17f7e1a 100644 --- a/docs/FilesApi.md +++ b/docs/FilesApi.md @@ -59,7 +59,7 @@ Creates a new FileVersion. Once a Version has been created, proceed to the `/fil Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**file_id** | **String** | | [required] | +**file_id** | **String** | Must be a valid file ID. | [required] | **create_file_version_request** | Option<[**CreateFileVersionRequest**](CreateFileVersionRequest.md)> | | | ### Return type @@ -90,7 +90,7 @@ Deletes a File object. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**file_id** | **String** | | [required] | +**file_id** | **String** | Must be a valid file ID. | [required] | ### Return type @@ -120,8 +120,8 @@ Delete a specific version of a file. You can only delete the latest version. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**file_id** | **String** | | [required] | -**version_id** | **i32** | | [required] | +**file_id** | **String** | Must be a valid file ID. | [required] | +**version_id** | **i32** | Version ID of the asset. | [required] | ### Return type @@ -151,8 +151,8 @@ Downloads the file with the provided version number. **Version Note:** Version Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**file_id** | **String** | | [required] | -**version_id** | **i32** | | [required] | +**file_id** | **String** | Must be a valid file ID. | [required] | +**version_id** | **i32** | Version ID of the asset. | [required] | ### Return type @@ -182,9 +182,9 @@ Finish an upload of a FileData. This will mark it as \"complete\". After uploadi Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**file_id** | **String** | | [required] | -**version_id** | **i32** | | [required] | -**file_type** | **String** | | [required] | +**file_id** | **String** | Must be a valid file ID. | [required] | +**version_id** | **i32** | Version ID of the asset. | [required] | +**file_type** | **String** | Type of file. | [required] | **finish_file_data_upload_request** | Option<[**FinishFileDataUploadRequest**](FinishFileDataUploadRequest.md)> | Please see documentation on ETag's: [https://teppen.io/2018/06/23/aws_s3_etags/](https://teppen.io/2018/06/23/aws_s3_etags/) ETag's should NOT be present when uploading a `signature`. | | ### Return type @@ -215,7 +215,7 @@ Shows general information about the \"File\" object. Each File can have several Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**file_id** | **String** | | [required] | +**file_id** | **String** | Must be a valid file ID. | [required] | ### Return type @@ -245,9 +245,9 @@ Retrieves the upload status for file upload. Can currently only be accessed when Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**file_id** | **String** | | [required] | -**version_id** | **i32** | | [required] | -**file_type** | **String** | | [required] | +**file_id** | **String** | Must be a valid file ID. | [required] | +**version_id** | **i32** | Version ID of the asset. | [required] | +**file_type** | **String** | Type of file. | [required] | ### Return type @@ -310,10 +310,10 @@ Starts an upload of a specific FilePart. This endpoint will return an AWS URL wh Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**file_id** | **String** | | [required] | -**version_id** | **i32** | | [required] | -**file_type** | **String** | | [required] | -**part_number** | Option<**i32**> | | | +**file_id** | **String** | Must be a valid file ID. | [required] | +**version_id** | **i32** | Version ID of the asset. | [required] | +**file_type** | **String** | Type of file. | [required] | +**part_number** | Option<**i32**> | The part number to start uploading. If not provided, the first part will be started. | | ### Return type diff --git a/docs/FriendsApi.md b/docs/FriendsApi.md index 4744968..12f78d1 100644 --- a/docs/FriendsApi.md +++ b/docs/FriendsApi.md @@ -24,7 +24,7 @@ Deletes an outgoing pending friend request to another user. To delete an incomin Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**user_id** | **String** | | [required] | +**user_id** | **String** | Must be a valid user ID. | [required] | ### Return type @@ -54,7 +54,7 @@ Send a friend request to another user. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**user_id** | **String** | | [required] | +**user_id** | **String** | Must be a valid user ID. | [required] | ### Return type @@ -84,7 +84,7 @@ Retrieve if the user is currently a friend with a given user, if they have an ou Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**user_id** | **String** | | [required] | +**user_id** | **String** | Must be a valid user ID. | [required] | ### Return type @@ -146,7 +146,7 @@ Unfriend a user by ID. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**user_id** | **String** | | [required] | +**user_id** | **String** | Must be a valid user ID. | [required] | ### Return type diff --git a/docs/Group.md b/docs/Group.md new file mode 100644 index 0000000..81fd3a4 --- /dev/null +++ b/docs/Group.md @@ -0,0 +1,35 @@ +# Group + +## 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] +**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] +**rules** | Option<**String**> | | [optional] +**links** | Option<**Vec**> | | [optional] +**languages** | Option<**Vec**> | | [optional] +**icon_id** | Option<**String**> | | [optional] +**banner_id** | Option<**String**> | | [optional] +**member_count** | Option<**i32**> | | [optional] +**member_count_synced_at** | Option<**String**> | | [optional] +**is_verified** | Option<**bool**> | | [optional][default to false] +**join_state** | Option<[**crate::models::GroupJoinState**](GroupJoinState.md)> | | [optional] +**tags** | Option<**Vec**> | | [optional] +**galleries** | Option<[**Vec**](GroupGallery.md)> | | [optional] +**created_at** | Option<**String**> | | [optional] +**online_member_count** | Option<**i32**> | | [optional] +**membership_status** | Option<[**crate::models::GroupMemberStatus**](GroupMemberStatus.md)> | | [optional] +**my_member** | Option<[**crate::models::GroupMyMember**](GroupMyMember.md)> | | [optional] +**roles** | Option<[**Vec**](GroupRole.md)> | Only returned if ?includeRoles=true is specified. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupAnnouncement.md b/docs/GroupAnnouncement.md new file mode 100644 index 0000000..50fd8df --- /dev/null +++ b/docs/GroupAnnouncement.md @@ -0,0 +1,19 @@ +# GroupAnnouncement + +## 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] +**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) + + diff --git a/docs/GroupAuditLogEntry.md b/docs/GroupAuditLogEntry.md new file mode 100644 index 0000000..7f64dda --- /dev/null +++ b/docs/GroupAuditLogEntry.md @@ -0,0 +1,19 @@ +# GroupAuditLogEntry + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**String**> | | [optional] +**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] +**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] +**data** | Option<[**serde_json::Value**](.md)> | The data associated with the event. The format of this data is dependent on the event type. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupGallery.md b/docs/GroupGallery.md new file mode 100644 index 0000000..4ecadc2 --- /dev/null +++ b/docs/GroupGallery.md @@ -0,0 +1,20 @@ +# GroupGallery + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**String**> | | [optional] +**name** | Option<**String**> | Name of the gallery. | [optional] +**description** | Option<**String**> | Description of the gallery. | [optional] +**members_only** | Option<**bool**> | Whether the gallery is members only. | [optional][default to false] +**role_ids_to_view** | Option<**Vec**> | | [optional] +**role_ids_to_submit** | Option<**Vec**> | | [optional] +**role_ids_to_auto_approve** | Option<**Vec**> | | [optional] +**role_ids_to_manage** | Option<**Vec**> | | [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) + + diff --git a/docs/GroupGalleryImage.md b/docs/GroupGalleryImage.md new file mode 100644 index 0000000..1d94cc3 --- /dev/null +++ b/docs/GroupGalleryImage.md @@ -0,0 +1,20 @@ +# GroupGalleryImage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**String**> | | [optional] +**group_id** | Option<**String**> | | [optional] +**gallery_id** | Option<**String**> | | [optional] +**file_id** | Option<**String**> | | [optional] +**image_url** | Option<**String**> | | [optional] +**created_at** | Option<**String**> | | [optional] +**submitted_by_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] +**approved** | Option<**bool**> | | [optional][default to false] +**approved_by_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] +**approved_at** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupJoinState.md b/docs/GroupJoinState.md new file mode 100644 index 0000000..226fa60 --- /dev/null +++ b/docs/GroupJoinState.md @@ -0,0 +1,10 @@ +# GroupJoinState + +## 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) + + diff --git a/docs/GroupLimitedMember.md b/docs/GroupLimitedMember.md new file mode 100644 index 0000000..4d2bef5 --- /dev/null +++ b/docs/GroupLimitedMember.md @@ -0,0 +1,14 @@ +# GroupLimitedMember + +## Properties + +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] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupMember.md b/docs/GroupMember.md new file mode 100644 index 0000000..f2d1310 --- /dev/null +++ b/docs/GroupMember.md @@ -0,0 +1,23 @@ +# GroupMember + +## Properties + +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**> | 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**> | | [optional] +**joined_at** | Option<**String**> | | [optional] +**membership_status** | Option<**String**> | | [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] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupMemberLimitedUser.md b/docs/GroupMemberLimitedUser.md new file mode 100644 index 0000000..5e106e6 --- /dev/null +++ b/docs/GroupMemberLimitedUser.md @@ -0,0 +1,14 @@ +# GroupMemberLimitedUser + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] +**display_name** | Option<**String**> | | [optional] +**thumbnail_url** | Option<**String**> | | [optional] +**icon_url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupMemberStatus.md b/docs/GroupMemberStatus.md new file mode 100644 index 0000000..ad69083 --- /dev/null +++ b/docs/GroupMemberStatus.md @@ -0,0 +1,10 @@ +# GroupMemberStatus + +## 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) + + diff --git a/docs/GroupMyMember.md b/docs/GroupMyMember.md new file mode 100644 index 0000000..75c9ddf --- /dev/null +++ b/docs/GroupMyMember.md @@ -0,0 +1,23 @@ +# GroupMyMember + +## Properties + +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] +**role_ids** | Option<**Vec**> | | [optional] +**manager_notes** | Option<**String**> | | [optional] +**membership_status** | Option<**String**> | | [optional] +**is_subscribed_to_announcements** | Option<**bool**> | | [optional][default to true] +**visibility** | Option<**String**> | | [optional] +**is_representing** | Option<**bool**> | | [optional][default to false] +**joined_at** | Option<**String**> | | [optional] +**banned_at** | Option<**String**> | | [optional] +**has2_fa** | Option<**bool**> | | [optional][default to false] +**permissions** | Option<**Vec**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupPermission.md b/docs/GroupPermission.md new file mode 100644 index 0000000..6e2f2e5 --- /dev/null +++ b/docs/GroupPermission.md @@ -0,0 +1,15 @@ +# GroupPermission + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | Option<**String**> | The name of the permission. | [optional] +**display_name** | Option<**String**> | The display name of the permission. | [optional] +**help** | Option<**String**> | Human-readable description of the permission. | [optional] +**is_management_permission** | Option<**bool**> | Whether this permission is a \"management\" permission. | [optional][default to false] +**allowed_to_add** | Option<**bool**> | Whether the user is allowed to add this permission to a role. | [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) + + diff --git a/docs/GroupPrivacy.md b/docs/GroupPrivacy.md new file mode 100644 index 0000000..3bb7051 --- /dev/null +++ b/docs/GroupPrivacy.md @@ -0,0 +1,10 @@ +# GroupPrivacy + +## 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) + + diff --git a/docs/GroupRole.md b/docs/GroupRole.md new file mode 100644 index 0000000..b84c5c3 --- /dev/null +++ b/docs/GroupRole.md @@ -0,0 +1,22 @@ +# GroupRole + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**String**> | | [optional] +**group_id** | Option<**String**> | | [optional] +**name** | Option<**String**> | | [optional] +**description** | Option<**String**> | | [optional] +**is_self_assignable** | Option<**bool**> | | [optional][default to false] +**permissions** | Option<**Vec**> | | [optional] +**is_management_role** | Option<**bool**> | | [optional][default to false] +**requires_two_factor** | Option<**bool**> | | [optional][default to false] +**requires_purchase** | Option<**bool**> | | [optional][default to false] +**order** | Option<**i32**> | | [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) + + diff --git a/docs/GroupRoleTemplate.md b/docs/GroupRoleTemplate.md new file mode 100644 index 0000000..d8fcb5b --- /dev/null +++ b/docs/GroupRoleTemplate.md @@ -0,0 +1,10 @@ +# GroupRoleTemplate + +## 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) + + diff --git a/docs/GroupUserVisibility.md b/docs/GroupUserVisibility.md new file mode 100644 index 0000000..5e767d0 --- /dev/null +++ b/docs/GroupUserVisibility.md @@ -0,0 +1,10 @@ +# GroupUserVisibility + +## 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) + + diff --git a/docs/GroupsApi.md b/docs/GroupsApi.md new file mode 100644 index 0000000..4a8a83c --- /dev/null +++ b/docs/GroupsApi.md @@ -0,0 +1,1165 @@ +# \GroupsApi + +All URIs are relative to *https://api.vrchat.cloud/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 +[**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 +[**create_group_announcement**](GroupsApi.md#create_group_announcement) | **POST** /groups/{groupId}/announcement | Create Group Announcement +[**create_group_gallery**](GroupsApi.md#create_group_gallery) | **POST** /groups/{groupId}/galleries | Create Group Gallery +[**create_group_invite**](GroupsApi.md#create_group_invite) | **POST** /groups/{groupId}/invites | Invite User to Group +[**create_group_role**](GroupsApi.md#create_group_role) | **POST** /groups/{groupId}/roles | Create GroupRole +[**delete_group**](GroupsApi.md#delete_group) | **DELETE** /groups/{groupId} | Delete Group +[**delete_group_announcement**](GroupsApi.md#delete_group_announcement) | **DELETE** /groups/{groupId}/announcement | Delete Group Announcement +[**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_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_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_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 +[**kick_group_member**](GroupsApi.md#kick_group_member) | **DELETE** /groups/{groupId}/members/{userId} | Kick Group Member +[**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 +[**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_role**](GroupsApi.md#update_group_role) | **PUT** /groups/{groupId}/roles/{groupRoleId} | Update Group Role + + + +## add_group_gallery_image + +> crate::models::GroupGalleryImage add_group_gallery_image(group_id, group_gallery_id, add_group_gallery_image_request) +Add Group Gallery Image + +Adds an image to a Group gallery. + +### Parameters + + +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)> | | | + +### Return type + +[**crate::models::GroupGalleryImage**](GroupGalleryImage.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## add_group_member_role + +> Vec add_group_member_role(group_id, user_id, group_role_id) +Add Role to GroupMember + +Adds a Role to a Group Member + +### Parameters + + +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] | +**group_role_id** | **String** | Must be a valid group role ID. | [required] | + +### Return type + +**Vec** + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## ban_group_member + +> crate::models::GroupMember ban_group_member(group_id, ban_group_member_request) +Ban Group Member + +Bans a user from a Group. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**group_id** | **String** | Must be a valid group ID. | [required] | +**ban_group_member_request** | Option<[**BanGroupMemberRequest**](BanGroupMemberRequest.md)> | | | + +### Return type + +[**crate::models::GroupMember**](GroupMember.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## cancel_group_request + +> cancel_group_request(group_id) +Cancel Group Join Request + +Cancels a request sent to join the group. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**group_id** | **String** | Must be a valid group ID. | [required] | + +### Return type + + (empty response body) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## create_group + +> crate::models::Group create_group(create_group_request) +Create Group + +Creates a Group and returns a Group object. **Requires VRC+ Subscription.** + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**create_group_request** | Option<[**CreateGroupRequest**](CreateGroupRequest.md)> | | | + +### Return type + +[**crate::models::Group**](Group.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## create_group_announcement + +> crate::models::GroupAnnouncement create_group_announcement(group_id, create_group_announcement_request) +Create Group Announcement + +Creates an Announcement for a Group. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**group_id** | **String** | Must be a valid group ID. | [required] | +**create_group_announcement_request** | Option<[**CreateGroupAnnouncementRequest**](CreateGroupAnnouncementRequest.md)> | | | + +### Return type + +[**crate::models::GroupAnnouncement**](GroupAnnouncement.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## create_group_gallery + +> crate::models::GroupGallery create_group_gallery(group_id, create_group_gallery_request) +Create Group Gallery + +Creates a gallery for a Group. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**group_id** | **String** | Must be a valid group ID. | [required] | +**create_group_gallery_request** | Option<[**CreateGroupGalleryRequest**](CreateGroupGalleryRequest.md)> | | | + +### Return type + +[**crate::models::GroupGallery**](GroupGallery.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## create_group_invite + +> create_group_invite(group_id, create_group_invite_request) +Invite User to Group + +Sends an invite to a user to join the group. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**group_id** | **String** | Must be a valid group ID. | [required] | +**create_group_invite_request** | Option<[**CreateGroupInviteRequest**](CreateGroupInviteRequest.md)> | | | + +### Return type + + (empty response body) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## create_group_role + +> crate::models::GroupRole create_group_role(group_id, create_group_role_request) +Create GroupRole + +Create a Group role. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**group_id** | **String** | Must be a valid group ID. | [required] | +**create_group_role_request** | Option<[**CreateGroupRoleRequest**](CreateGroupRoleRequest.md)> | | | + +### Return type + +[**crate::models::GroupRole**](GroupRole.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## delete_group + +> crate::models::Success delete_group(group_id) +Delete Group + +Deletes a Group. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**group_id** | **String** | Must be a valid group ID. | [required] | + +### Return type + +[**crate::models::Success**](Success.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## delete_group_announcement + +> crate::models::Success delete_group_announcement(group_id) +Delete Group Announcement + +Deletes the announcement for a Group. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**group_id** | **String** | Must be a valid group ID. | [required] | + +### Return type + +[**crate::models::Success**](Success.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## delete_group_gallery + +> crate::models::Success delete_group_gallery(group_id, group_gallery_id) +Delete Group Gallery + +Deletes a gallery for a Group. + +### Parameters + + +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] | + +### Return type + +[**crate::models::Success**](Success.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## delete_group_gallery_image + +> crate::models::Success delete_group_gallery_image(group_id, group_gallery_id, group_gallery_image_id) +Delete Group Gallery Image + +Deletes an image from a Group gallery. + +### Parameters + + +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] | +**group_gallery_image_id** | **String** | Must be a valid group gallery image ID. | [required] | + +### Return type + +[**crate::models::Success**](Success.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## delete_group_invite + +> delete_group_invite(group_id, user_id) +Delete User Invite + +Deletes an Group invite sent to a User + +### Parameters + + +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] | + +### Return type + + (empty response body) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## delete_group_role + +> Vec delete_group_role(group_id, group_role_id) +Delete Group Role + +Deletes a Group Role by ID and returns the remaining roles. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**group_id** | **String** | Must be a valid group ID. | [required] | +**group_role_id** | **String** | Must be a valid group role ID. | [required] | + +### Return type + +[**Vec**](GroupRole.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_group + +> crate::models::Group get_group(group_id, include_roles) +Get Group by ID + +Returns a single Group by ID. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**group_id** | **String** | Must be a valid group ID. | [required] | +**include_roles** | Option<**bool**> | Include roles for the Group object. Defaults to false. | | + +### Return type + +[**crate::models::Group**](Group.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_group_announcements + +> crate::models::GroupAnnouncement get_group_announcements(group_id) +Get Group Announcement + +Returns the announcement for a Group. If no announcement has been made, then it returns **empty object**. If an announcement exists, then it will always return all fields except `imageId` and `imageUrl` which may be null. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**group_id** | **String** | Must be a valid group ID. | [required] | + +### Return type + +[**crate::models::GroupAnnouncement**](GroupAnnouncement.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_group_audit_logs + +> crate::models::PaginatedGroupAuditLogEntryList get_group_audit_logs(group_id, n, offset, start_date, end_date) +Get Group Audit Logs + +Returns a list of audit logs for 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. | | +**start_date** | Option<**String**> | The start date of the search range. | | +**end_date** | Option<**String**> | The end date of the search range. | | + +### Return type + +[**crate::models::PaginatedGroupAuditLogEntryList**](PaginatedGroupAuditLogEntryList.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_group_bans + +> Vec get_group_bans(group_id, n, offset) +Get Group Bans + +Returns a list of banned users for 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. | | + +### Return type + +[**Vec**](GroupMember.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_group_gallery_images + +> Vec get_group_gallery_images(group_id, group_gallery_id, n, offset, approved) +Get Group Gallery Images + +Returns a list of images for a Group gallery. + +### Parameters + + +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] | +**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. | | +**approved** | Option<**bool**> | If specified, only returns images that have been approved or not approved. | | + +### Return type + +[**Vec**](GroupGalleryImage.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_group_invites + +> Vec get_group_invites(group_id) +Get Group Invites Sent + +Returns a list of members that have been invited to the Group. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**group_id** | **String** | Must be a valid group ID. | [required] | + +### Return type + +[**Vec**](GroupMember.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_group_member + +> crate::models::GroupLimitedMember get_group_member(group_id, user_id) +Get Group Member + +Returns a LimitedGroup Member. + +### Parameters + + +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] | + +### Return type + +[**crate::models::GroupLimitedMember**](GroupLimitedMember.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_group_members + +> Vec get_group_members(group_id, n, offset) +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. + +### 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. | | + +### Return type + +[**Vec**](GroupMember.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_group_permissions + +> Vec get_group_permissions(group_id) +List Group Permissions + +Returns a List of all possible/available permissions for a Group. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**group_id** | **String** | Must be a valid group ID. | [required] | + +### Return type + +[**Vec**](GroupPermission.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_group_requests + +> Vec get_group_requests(group_id) +Get Group Join Requests + +Returns a list of members that have requested to join the Group. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**group_id** | **String** | Must be a valid group ID. | [required] | + +### Return type + +[**Vec**](GroupMember.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_group_roles + +> Vec get_group_roles(group_id) +Get Group Roles + +Returns a Group Role by ID. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**group_id** | **String** | Must be a valid group ID. | [required] | + +### Return type + +[**Vec**](GroupRole.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## join_group + +> crate::models::Group join_group(group_id) +Join Group + +Join a Group by ID and returns the joined Group. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**group_id** | **String** | Must be a valid group ID. | [required] | + +### Return type + +[**crate::models::Group**](Group.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## kick_group_member + +> kick_group_member(group_id, user_id) +Kick Group Member + +Kicks a Group Member from the Group. The current user must have the \"Remove Group Members\" permission. + +### Parameters + + +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] | + +### Return type + + (empty response body) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## leave_group + +> leave_group(group_id) +Leave Group + +Leave a group by ID. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**group_id** | **String** | Must be a valid group ID. | [required] | + +### Return type + + (empty response body) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## remove_group_member_role + +> Vec remove_group_member_role(group_id, user_id, group_role_id) +Remove Role from GroupMember + +Removes a Role from a Group Member + +### Parameters + + +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] | +**group_role_id** | **String** | Must be a valid group role ID. | [required] | + +### Return type + +**Vec** + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## respond_group_join_request + +> respond_group_join_request(group_id, user_id, respond_group_join_request) +Respond Group Join request + +Responds to a Group Join Request with Accept/Deny + +### Parameters + + +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)> | | | + +### Return type + + (empty response body) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## unban_group_member + +> crate::models::GroupMember unban_group_member(group_id, user_id) +Unban Group Member + +Unbans a user from a Group. + +### Parameters + + +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] | + +### Return type + +[**crate::models::GroupMember**](GroupMember.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## update_group + +> crate::models::Group update_group(group_id, update_group_request) +Update Group + +Updates a Group and returns it. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**group_id** | **String** | Must be a valid group ID. | [required] | +**update_group_request** | Option<[**UpdateGroupRequest**](UpdateGroupRequest.md)> | | | + +### Return type + +[**crate::models::Group**](Group.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## update_group_gallery + +> crate::models::GroupGallery update_group_gallery(group_id, group_gallery_id, update_group_gallery_request) +Update Group Gallery + +Updates a gallery for a Group. + +### Parameters + + +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] | +**update_group_gallery_request** | Option<[**UpdateGroupGalleryRequest**](UpdateGroupGalleryRequest.md)> | | | + +### Return type + +[**crate::models::GroupGallery**](GroupGallery.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## update_group_member + +> crate::models::GroupLimitedMember update_group_member(group_id, user_id, update_group_member_request) +Update Group Member + +Updates a Group Member + +### Parameters + + +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] | +**update_group_member_request** | Option<[**UpdateGroupMemberRequest**](UpdateGroupMemberRequest.md)> | | | + +### Return type + +[**crate::models::GroupLimitedMember**](GroupLimitedMember.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## update_group_role + +> Vec update_group_role(group_id, group_role_id, update_group_role_request) +Update Group Role + +Updates a group role by ID. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**group_id** | **String** | Must be a valid group ID. | [required] | +**group_role_id** | **String** | Must be a valid group role ID. | [required] | +**update_group_role_request** | Option<[**UpdateGroupRoleRequest**](UpdateGroupRoleRequest.md)> | | | + +### Return type + +[**Vec**](GroupRole.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/InstancesApi.md b/docs/InstancesApi.md index bf3e32e..44321e4 100644 --- a/docs/InstancesApi.md +++ b/docs/InstancesApi.md @@ -23,8 +23,8 @@ Returns an instance. Please read [Instances Tutorial](https://vrchatapi.github.i Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**world_id** | **String** | | [required] | -**instance_id** | **String** | | [required] | +**world_id** | **String** | Must be a valid world ID. | [required] | +**instance_id** | **String** | Must be a valid instance ID. | [required] | ### Return type @@ -54,7 +54,7 @@ Returns an instance. Please read [Instances Tutorial](https://vrchatapi.github.i Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**short_name** | **String** | | [required] | +**short_name** | **String** | Must be a valid instance short name. | [required] | ### Return type @@ -84,8 +84,8 @@ Returns an instance short name. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**world_id** | **String** | | [required] | -**instance_id** | **String** | | [required] | +**world_id** | **String** | Must be a valid world ID. | [required] | +**instance_id** | **String** | Must be a valid instance ID. | [required] | ### Return type @@ -115,8 +115,8 @@ Sends an invite to the instance to yourself. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**world_id** | **String** | | [required] | -**instance_id** | **String** | | [required] | +**world_id** | **String** | Must be a valid world ID. | [required] | +**instance_id** | **String** | Must be a valid instance ID. | [required] | ### Return type diff --git a/docs/InviteApi.md b/docs/InviteApi.md index 6ec387c..921a13a 100644 --- a/docs/InviteApi.md +++ b/docs/InviteApi.md @@ -27,9 +27,9 @@ Returns a single Invite Message. This returns the exact same information but les Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**user_id** | **String** | | [required] | -**message_type** | **String** | | [required] | -**slot** | **i32** | | [required] | +**user_id** | **String** | Must be a valid user ID. | [required] | +**message_type** | [**InviteMessageType**](.md) | The type of message to fetch, must be a valid InviteMessageType. | [required] | +**slot** | **i32** | The message slot to fetch of a given message type. | [required] | ### Return type @@ -59,8 +59,8 @@ Returns a list of all the users Invite Messages. Admin Credentials are required Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**user_id** | **String** | | [required] | -**message_type** | **String** | | [required] | +**user_id** | **String** | Must be a valid user ID. | [required] | +**message_type** | [**InviteMessageType**](.md) | The type of message to fetch, must be a valid InviteMessageType. | [required] | ### Return type @@ -90,8 +90,8 @@ Sends self an invite to an instance Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**world_id** | **String** | | [required] | -**instance_id** | **String** | | [required] | +**world_id** | **String** | Must be a valid world ID. | [required] | +**instance_id** | **String** | Must be a valid instance ID. | [required] | ### Return type @@ -121,7 +121,7 @@ Sends an invite to a user. Returns the Notification of type `invite` that was se Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**user_id** | **String** | | [required] | +**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. | | ### Return type @@ -152,7 +152,7 @@ Requests an invite from a user. Returns the Notification of type `requestInvite` Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**user_id** | **String** | | [required] | +**user_id** | **String** | Must be a valid user ID. | [required] | **request_invite_request** | Option<[**RequestInviteRequest**](RequestInviteRequest.md)> | Slot number of the Request Message to use when request an invite. | | ### Return type @@ -183,9 +183,9 @@ Resets a single Invite Message back to its original message, and then returns a Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**user_id** | **String** | | [required] | -**message_type** | **String** | | [required] | -**slot** | **i32** | | [required] | +**user_id** | **String** | Must be a valid user ID. | [required] | +**message_type** | [**InviteMessageType**](.md) | The type of message to fetch, must be a valid InviteMessageType. | [required] | +**slot** | **i32** | The message slot to fetch of a given message type. | [required] | ### Return type @@ -215,7 +215,7 @@ Respond to an invite request by sending a world invite to the requesting user. ` Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**notification_id** | **String** | | [required] | +**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. | | ### Return type @@ -246,9 +246,9 @@ Updates a single Invite Message and then returns a list of all of them. Admin Cr Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**user_id** | **String** | | [required] | -**message_type** | **String** | | [required] | -**slot** | **i32** | | [required] | +**user_id** | **String** | Must be a valid user ID. | [required] | +**message_type** | [**InviteMessageType**](.md) | The type of message to fetch, must be a valid InviteMessageType. | [required] | +**slot** | **i32** | The message slot to fetch of a given message type. | [required] | **update_invite_message_request** | Option<[**UpdateInviteMessageRequest**](UpdateInviteMessageRequest.md)> | Message of what to set the invite message to. | | ### Return type diff --git a/docs/Notification.md b/docs/Notification.md index 44a5a61..f0cec1c 100644 --- a/docs/Notification.md +++ b/docs/Notification.md @@ -5,10 +5,11 @@ 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** | **String** | **NOTICE:** This is not a JSON object when received from the REST API, but it is when received from the Websocket API. When received from the REST API, this is a json **encoded** object, meaning you have to json-de-encode to get the NotificationDetail object depending on the NotificationType. | [default to {}] **id** | **String** | | **message** | **String** | | -**seen** | **bool** | | [default to false] +**seen** | Option<**bool**> | Not included in notification objects received from the Websocket API | [optional][default to false] +**receiver_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] **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) | | diff --git a/docs/NotificationsApi.md b/docs/NotificationsApi.md index a8c8d02..58bc591 100644 --- a/docs/NotificationsApi.md +++ b/docs/NotificationsApi.md @@ -24,7 +24,7 @@ Accept a friend request by notification `frq_` ID. Friend requests can be found Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**notification_id** | **String** | | [required] | +**notification_id** | **String** | Must be a valid notification ID. | [required] | ### Return type @@ -81,7 +81,7 @@ Delete a notification. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**notification_id** | **String** | | [required] | +**notification_id** | **String** | Must be a valid notification ID. | [required] | ### Return type @@ -146,7 +146,7 @@ Mark a notification as seen. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**notification_id** | **String** | | [required] | +**notification_id** | **String** | Must be a valid notification ID. | [required] | ### Return type diff --git a/docs/OrderOption.md b/docs/OrderOption.md new file mode 100644 index 0000000..047b417 --- /dev/null +++ b/docs/OrderOption.md @@ -0,0 +1,10 @@ +# OrderOption + +## 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) + + diff --git a/docs/PaginatedGroupAuditLogEntryList.md b/docs/PaginatedGroupAuditLogEntryList.md new file mode 100644 index 0000000..9ad3bab --- /dev/null +++ b/docs/PaginatedGroupAuditLogEntryList.md @@ -0,0 +1,13 @@ +# PaginatedGroupAuditLogEntryList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | Option<[**Vec**](GroupAuditLogEntry.md)> | | [optional] +**total_count** | Option<**i32**> | The total number of results that the query would return if there were no pagination. | [optional] +**has_next** | Option<**bool**> | Whether there are more results after this page. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PermissionsApi.md b/docs/PermissionsApi.md index 6cf6564..8897ecf 100644 --- a/docs/PermissionsApi.md +++ b/docs/PermissionsApi.md @@ -48,7 +48,7 @@ Returns a single permission. This endpoint is pretty useless, as it returns the Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**permission_id** | **String** | | [required] | +**permission_id** | **String** | Must be a valid permission ID. | [required] | ### Return type diff --git a/docs/PlayermoderationApi.md b/docs/PlayermoderationApi.md index 9aa96e7..bc4ae24 100644 --- a/docs/PlayermoderationApi.md +++ b/docs/PlayermoderationApi.md @@ -52,7 +52,7 @@ Deletes a specific player moderation based on it's `pmod_` ID. The website uses Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**player_moderation_id** | **String** | | [required] | +**player_moderation_id** | **String** | Must be a valid `pmod_` ID. | [required] | ### Return type @@ -82,7 +82,7 @@ Returns a single Player Moderation. This returns the exact same amount of inform Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**player_moderation_id** | **String** | | [required] | +**player_moderation_id** | **String** | Must be a valid `pmod_` ID. | [required] | ### Return type diff --git a/docs/RespondGroupJoinRequest.md b/docs/RespondGroupJoinRequest.md new file mode 100644 index 0000000..972cd02 --- /dev/null +++ b/docs/RespondGroupJoinRequest.md @@ -0,0 +1,11 @@ +# RespondGroupJoinRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**action** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SortOption.md b/docs/SortOption.md new file mode 100644 index 0000000..8521b38 --- /dev/null +++ b/docs/SortOption.md @@ -0,0 +1,10 @@ +# SortOption + +## 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) + + diff --git a/docs/UpdateGroupGalleryRequest.md b/docs/UpdateGroupGalleryRequest.md new file mode 100644 index 0000000..118aa08 --- /dev/null +++ b/docs/UpdateGroupGalleryRequest.md @@ -0,0 +1,17 @@ +# UpdateGroupGalleryRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | Option<**String**> | Name of the gallery. | [optional] +**description** | Option<**String**> | Description of the gallery. | [optional] +**members_only** | Option<**bool**> | Whether the gallery is members only. | [optional][default to false] +**role_ids_to_view** | Option<**Vec**> | | [optional] +**role_ids_to_submit** | Option<**Vec**> | | [optional] +**role_ids_to_auto_approve** | Option<**Vec**> | | [optional] +**role_ids_to_manage** | Option<**Vec**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateGroupMemberRequest.md b/docs/UpdateGroupMemberRequest.md new file mode 100644 index 0000000..9d97983 --- /dev/null +++ b/docs/UpdateGroupMemberRequest.md @@ -0,0 +1,13 @@ +# UpdateGroupMemberRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**visibility** | Option<[**crate::models::GroupUserVisibility**](GroupUserVisibility.md)> | | [optional] +**is_subscribed_to_announcements** | Option<**bool**> | | [optional] +**manager_notes** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateGroupRequest.md b/docs/UpdateGroupRequest.md new file mode 100644 index 0000000..498b3d3 --- /dev/null +++ b/docs/UpdateGroupRequest.md @@ -0,0 +1,20 @@ +# UpdateGroupRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | Option<**String**> | | [optional] +**short_code** | Option<**String**> | | [optional] +**description** | Option<**String**> | | [optional] +**join_state** | Option<[**crate::models::GroupJoinState**](GroupJoinState.md)> | | [optional] +**icon_id** | Option<**String**> | | [optional] +**banner_id** | Option<**String**> | | [optional] +**languages** | Option<**Vec**> | 3 letter language code | [optional] +**links** | Option<**Vec**> | | [optional] +**rules** | Option<**String**> | | [optional] +**tags** | Option<**Vec**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateGroupRoleRequest.md b/docs/UpdateGroupRoleRequest.md new file mode 100644 index 0000000..82b33c7 --- /dev/null +++ b/docs/UpdateGroupRoleRequest.md @@ -0,0 +1,15 @@ +# UpdateGroupRoleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | Option<**String**> | | [optional] +**description** | Option<**String**> | | [optional] +**is_self_assignable** | Option<**bool**> | | [optional][default to false] +**permissions** | Option<**Vec**> | | [optional] +**order** | Option<**i32**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UsersApi.md b/docs/UsersApi.md index 237a5bf..3d0740f 100644 --- a/docs/UsersApi.md +++ b/docs/UsersApi.md @@ -6,6 +6,8 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**get_user**](UsersApi.md#get_user) | **GET** /users/{userId} | Get User by ID [**get_user_by_name**](UsersApi.md#get_user_by_name) | **GET** /users/{username}/name | Get User by Username +[**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 [**search_users**](UsersApi.md#search_users) | **GET** /users | Search All Users [**update_user**](UsersApi.md#update_user) | **PUT** /users/{userId} | Update User Info @@ -23,7 +25,7 @@ Get public user information about a specific user using their ID. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**user_id** | **String** | | [required] | +**user_id** | **String** | Must be a valid user ID. | [required] | ### Return type @@ -53,7 +55,7 @@ Get User by Username Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**username** | **String** | | [required] | +**username** | **String** | Username of the user | [required] | ### Return type @@ -71,6 +73,66 @@ 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_user_group_requests + +> Vec get_user_group_requests(user_id) +Get User Group Requests + +Returns a list of Groups the user has requested to be invited into. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **String** | Must be a valid user ID. | [required] | + +### Return type + +[**Vec**](Group.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_user_groups + +> Vec get_user_groups(user_id) +Get User Groups + +Get user's public groups + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **String** | Must be a valid user ID. | [required] | + +### Return type + +[**Vec**](Group.md) + +### Authorization + +[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + ## search_users > Vec search_users(search, developer_type, n, offset) @@ -116,7 +178,7 @@ Update a users information such as the email and birthday. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**user_id** | **String** | | [required] | +**user_id** | **String** | Must be a valid user ID. | [required] | **update_user_request** | Option<[**UpdateUserRequest**](UpdateUserRequest.md)> | | | ### Return type diff --git a/docs/WorldsApi.md b/docs/WorldsApi.md index 52869c5..6b742fd 100644 --- a/docs/WorldsApi.md +++ b/docs/WorldsApi.md @@ -62,7 +62,7 @@ Delete a world. Notice a world is never fully \"deleted\", only its ReleaseStatu Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**world_id** | **String** | | [required] | +**world_id** | **String** | Must be a valid world ID. | [required] | ### Return type @@ -93,14 +93,14 @@ Search and list currently Active worlds by query filters. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **featured** | Option<**bool**> | Filters on featured results. | | -**sort** | Option<**String**> | | |[default to popularity] +**sort** | Option<[**SortOption**](.md)> | The sort order of the results. | | **n** | Option<**i32**> | The number of objects to return. | |[default to 60] -**order** | Option<**String**> | | |[default to descending] +**order** | Option<[**OrderOption**](.md)> | Result ordering | | **offset** | Option<**i32**> | A zero-based offset from the default object sorting from where search results start. | | **search** | Option<**String**> | Filters by world name. | | **tag** | Option<**String**> | Tags to include (comma-separated). Any of the tags needs to be present. | | **notag** | Option<**String**> | Tags to exclude (comma-separated). | | -**release_status** | Option<**String**> | Filter by ReleaseStatus. | |[default to public] +**release_status** | Option<[**ReleaseStatus**](.md)> | Filter by ReleaseStatus. | | **max_unity_version** | Option<**String**> | The maximum Unity version supported by the asset. | | **min_unity_version** | Option<**String**> | The minimum Unity version supported by the asset. | | **platform** | Option<**String**> | The platform the asset supports. | | @@ -134,14 +134,14 @@ Search and list favorited worlds by query filters. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **featured** | Option<**bool**> | Filters on featured results. | | -**sort** | Option<**String**> | | |[default to popularity] +**sort** | Option<[**SortOption**](.md)> | The sort order of the results. | | **n** | Option<**i32**> | The number of objects to return. | |[default to 60] -**order** | Option<**String**> | | |[default to descending] +**order** | Option<[**OrderOption**](.md)> | Result ordering | | **offset** | Option<**i32**> | A zero-based offset from the default object sorting from where search results start. | | **search** | Option<**String**> | Filters by world name. | | **tag** | Option<**String**> | Tags to include (comma-separated). Any of the tags needs to be present. | | **notag** | Option<**String**> | Tags to exclude (comma-separated). | | -**release_status** | Option<**String**> | Filter by ReleaseStatus. | |[default to public] +**release_status** | Option<[**ReleaseStatus**](.md)> | Filter by ReleaseStatus. | | **max_unity_version** | Option<**String**> | The maximum Unity version supported by the asset. | | **min_unity_version** | Option<**String**> | The minimum Unity version supported by the asset. | | **platform** | Option<**String**> | The platform the asset supports. | | @@ -176,14 +176,14 @@ Search and list recently visited worlds by query filters. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **featured** | Option<**bool**> | Filters on featured results. | | -**sort** | Option<**String**> | | |[default to popularity] +**sort** | Option<[**SortOption**](.md)> | The sort order of the results. | | **n** | Option<**i32**> | The number of objects to return. | |[default to 60] -**order** | Option<**String**> | | |[default to descending] +**order** | Option<[**OrderOption**](.md)> | Result ordering | | **offset** | Option<**i32**> | A zero-based offset from the default object sorting from where search results start. | | **search** | Option<**String**> | Filters by world name. | | **tag** | Option<**String**> | Tags to include (comma-separated). Any of the tags needs to be present. | | **notag** | Option<**String**> | Tags to exclude (comma-separated). | | -**release_status** | Option<**String**> | Filter by ReleaseStatus. | |[default to public] +**release_status** | Option<[**ReleaseStatus**](.md)> | Filter by ReleaseStatus. | | **max_unity_version** | Option<**String**> | The maximum Unity version supported by the asset. | | **min_unity_version** | Option<**String**> | The minimum Unity version supported by the asset. | | **platform** | Option<**String**> | The platform the asset supports. | | @@ -217,7 +217,7 @@ Get information about a specific World. Works unauthenticated but when so will a Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**world_id** | **String** | | [required] | +**world_id** | **String** | Must be a valid world ID. | [required] | ### Return type @@ -247,8 +247,8 @@ Returns a worlds instance. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**world_id** | **String** | | [required] | -**instance_id** | **String** | | [required] | +**world_id** | **String** | Must be a valid world ID. | [required] | +**instance_id** | **String** | Must be a valid instance ID. | [required] | ### Return type @@ -278,7 +278,7 @@ Return a worlds custom metadata. This is currently believed to be unused. Metada Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**world_id** | **String** | | [required] | +**world_id** | **String** | Must be a valid world ID. | [required] | ### Return type @@ -308,7 +308,7 @@ Returns a worlds publish status. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**world_id** | **String** | | [required] | +**world_id** | **String** | Must be a valid world ID. | [required] | ### Return type @@ -338,7 +338,7 @@ Publish a world. You can only publish one world per week. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**world_id** | **String** | | [required] | +**world_id** | **String** | Must be a valid world ID. | [required] | ### Return type @@ -369,16 +369,16 @@ Search and list any worlds by query filters. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **featured** | Option<**bool**> | Filters on featured results. | | -**sort** | Option<**String**> | | |[default to popularity] +**sort** | Option<[**SortOption**](.md)> | The sort order of the results. | | **user** | Option<**String**> | Set to `me` for searching own worlds. | | **user_id** | Option<**String**> | Filter by UserID. | | **n** | Option<**i32**> | The number of objects to return. | |[default to 60] -**order** | Option<**String**> | | |[default to descending] +**order** | Option<[**OrderOption**](.md)> | Result ordering | | **offset** | Option<**i32**> | A zero-based offset from the default object sorting from where search results start. | | **search** | Option<**String**> | Filters by world name. | | **tag** | Option<**String**> | Tags to include (comma-separated). Any of the tags needs to be present. | | **notag** | Option<**String**> | Tags to exclude (comma-separated). | | -**release_status** | Option<**String**> | Filter by ReleaseStatus. | |[default to public] +**release_status** | Option<[**ReleaseStatus**](.md)> | Filter by ReleaseStatus. | | **max_unity_version** | Option<**String**> | The maximum Unity version supported by the asset. | | **min_unity_version** | Option<**String**> | The minimum Unity version supported by the asset. | | **platform** | Option<**String**> | The platform the asset supports. | | @@ -411,7 +411,7 @@ Unpublish a world. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**world_id** | **String** | | [required] | +**world_id** | **String** | Must be a valid world ID. | [required] | ### Return type @@ -441,7 +441,7 @@ Update information about a specific World. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**world_id** | **String** | | [required] | +**world_id** | **String** | Must be a valid world ID. | [required] | **update_world_request** | Option<[**UpdateWorldRequest**](UpdateWorldRequest.md)> | | | ### Return type diff --git a/generate.sh b/generate.sh index b81dd70..c60dd53 100755 --- a/generate.sh +++ b/generate.sh @@ -9,7 +9,7 @@ rm src/apis src/models docs -rf --git-user-id=vrchatapi \ --git-repo-id=vrchatapi-rust \ -o . \ --i https://raw.githubusercontent.com/vrchatapi/specification/gh-pages/openapi.yaml \ +-i ../specification/dist/openapi.yaml \ --http-user-agent="vrchatapi-rust" #--global-property debugOperations=true @@ -24,4 +24,31 @@ find src -type f -exec sed -i '/The version of the OpenAPI document/d' {} \; # Cookie storage sed -i 's/Client::new()/Client::builder().cookie_store(true).build().unwrap()/g' src/apis/configuration.rs +# https://github.com/OpenAPITools/openapi-generator/issues/14171 +# Replace Option/Option/g' src/apis/*.rs +# Replace Option/Option/g' src/apis/*.rs +# Replace Option/Option/g' src/apis/*.rs +# Replace message_type: InviteMessageType with message_type: crate::models::InviteMessageType in src/apis +sed -i 's/message_type: InviteMessageType/message_type: crate::models::InviteMessageType/g' src/apis/*.rs + +# -Missing Github Issue- +# Append patches/InviteMessageType-Display.rs to invite_message_type.rs +cat patches/InviteMessageType-Display.rs >> src/models/invite_message_type.rs +# Remove the ToString section and it's included function +# impl ToString for InviteMessageType { +# fn to_string(&self) -> String { +# match self { +# Self::Message => String::from("message"), +# Self::Response => String::from("response"), +# Self::Request => String::from("request"), +# Self::RequestResponse => String::from("requestResponse"), +# } +# } +# } +sed -z -i 's/impl ToString for InviteMessageType {\n[ a-zA-Z_\(\)&-\>{\n:=",]*}\n }\n}//g' src/models/invite_message_type.rs + + cargo build diff --git a/patches/InviteMessageType-Display.rs b/patches/InviteMessageType-Display.rs new file mode 100644 index 0000000..15fade2 --- /dev/null +++ b/patches/InviteMessageType-Display.rs @@ -0,0 +1,10 @@ +impl std::fmt::Display for InviteMessageType { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Message => write!(f, "message"), + Self::Response => write!(f, "response"), + Self::Request => write!(f, "request"), + Self::RequestResponse => write!(f, "requestResponse"), + } + } +} \ No newline at end of file diff --git a/src/apis/avatars_api.rs b/src/apis/avatars_api.rs index f372f1f..3d2b5c3 100644 --- a/src/apis/avatars_api.rs +++ b/src/apis/avatars_api.rs @@ -180,7 +180,7 @@ pub fn get_avatar(configuration: &configuration::Configuration, avatar_id: &str) } /// Search and list favorited avatars by query filters. -pub fn get_favorited_avatars(configuration: &configuration::Configuration, featured: Option, sort: Option<&str>, n: Option, order: Option<&str>, offset: Option, search: Option<&str>, tag: Option<&str>, notag: Option<&str>, release_status: Option<&str>, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>, user_id: Option<&str>) -> Result, Error> { +pub fn get_favorited_avatars(configuration: &configuration::Configuration, featured: Option, sort: Option, n: Option, order: Option, offset: Option, search: Option<&str>, tag: Option<&str>, notag: Option<&str>, release_status: Option, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>, user_id: Option<&str>) -> Result, Error> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; @@ -275,7 +275,7 @@ pub fn get_own_avatar(configuration: &configuration::Configuration, user_id: &st } /// 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, sort: Option<&str>, user: Option<&str>, user_id: Option<&str>, n: Option, order: Option<&str>, offset: Option, tag: Option<&str>, notag: Option<&str>, release_status: Option<&str>, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>) -> Result, Error> { +pub fn search_avatars(configuration: &configuration::Configuration, featured: Option, sort: Option, user: Option<&str>, user_id: Option<&str>, n: Option, order: Option, offset: Option, tag: Option<&str>, notag: Option<&str>, release_status: Option, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>) -> Result, Error> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; diff --git a/src/apis/groups_api.rs b/src/apis/groups_api.rs new file mode 100644 index 0000000..a605e7f --- /dev/null +++ b/src/apis/groups_api.rs @@ -0,0 +1,1401 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; + +use crate::apis::ResponseContent; +use super::{Error, configuration}; + + +/// struct for typed errors of method [`add_group_gallery_image`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AddGroupGalleryImageError { + Status401(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`add_group_member_role`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AddGroupMemberRoleError { + Status401(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`ban_group_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum BanGroupMemberError { + Status401(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`cancel_group_request`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CancelGroupRequestError { + Status400(), + Status403(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_group`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateGroupError { + Status401(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_group_announcement`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateGroupAnnouncementError { + Status401(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_group_gallery`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateGroupGalleryError { + Status401(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_group_invite`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateGroupInviteError { + Status400(), + Status401(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_group_role`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateGroupRoleError { + Status401(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_group`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteGroupError { + Status401(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_group_announcement`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteGroupAnnouncementError { + Status401(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_group_gallery`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteGroupGalleryError { + Status401(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_group_gallery_image`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteGroupGalleryImageError { + Status401(crate::models::Error), + Status403(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_group_invite`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteGroupInviteError { + Status401(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_group_role`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteGroupRoleError { + Status401(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_group`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGroupError { + Status401(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_group_announcements`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGroupAnnouncementsError { + Status401(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_group_audit_logs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGroupAuditLogsError { + Status401(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_group_bans`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGroupBansError { + Status401(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_group_gallery_images`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGroupGalleryImagesError { + Status401(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_group_invites`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGroupInvitesError { + Status401(crate::models::Error), + Status403(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_group_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGroupMemberError { + Status401(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_group_members`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGroupMembersError { + Status400(crate::models::Error), + Status401(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_group_permissions`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGroupPermissionsError { + Status400(crate::models::Error), + Status401(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_group_requests`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGroupRequestsError { + Status403(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_group_roles`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGroupRolesError { + Status401(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`join_group`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum JoinGroupError { + Status400(crate::models::Error), + Status401(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`kick_group_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum KickGroupMemberError { + Status401(crate::models::Error), + Status403(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`leave_group`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum LeaveGroupError { + Status403(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`remove_group_member_role`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RemoveGroupMemberRoleError { + Status401(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`respond_group_join_request`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RespondGroupJoinRequestError { + Status401(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`unban_group_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UnbanGroupMemberError { + Status401(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_group`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateGroupError { + Status401(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_group_gallery`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateGroupGalleryError { + Status401(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_group_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateGroupMemberError { + Status401(crate::models::Error), + Status404(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_group_role`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateGroupRoleError { + Status401(crate::models::Error), + UnknownValue(serde_json::Value), +} + + +/// Adds an image to a Group gallery. +pub fn add_group_gallery_image(configuration: &configuration::Configuration, group_id: &str, group_gallery_id: &str, add_group_gallery_image_request: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}/galleries/{groupGalleryId}/images", local_var_configuration.base_path, groupId=crate::apis::urlencode(group_id), groupGalleryId=crate::apis::urlencode(group_gallery_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(&add_group_gallery_image_request); + + let local_var_req = local_var_req_builder.build()?; + let mut local_var_resp = local_var_client.execute(local_var_req)?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text()?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Adds a Role to a Group Member +pub fn add_group_member_role(configuration: &configuration::Configuration, group_id: &str, user_id: &str, group_role_id: &str) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}/members/{userId}/roles/{groupRoleId}", local_var_configuration.base_path, groupId=crate::apis::urlencode(group_id), userId=crate::apis::urlencode(user_id), groupRoleId=crate::apis::urlencode(group_role_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 = 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)) + } +} + +/// Bans a user from a Group. +pub fn ban_group_member(configuration: &configuration::Configuration, group_id: &str, ban_group_member_request: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}/bans", local_var_configuration.base_path, groupId=crate::apis::urlencode(group_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(&ban_group_member_request); + + let local_var_req = local_var_req_builder.build()?; + let mut local_var_resp = local_var_client.execute(local_var_req)?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text()?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Cancels a request sent to join the group. +pub fn cancel_group_request(configuration: &configuration::Configuration, group_id: &str) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}/requests", local_var_configuration.base_path, groupId=crate::apis::urlencode(group_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 = 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)) + } +} + +/// Creates a Group and returns a Group object. **Requires VRC+ Subscription.** +pub fn create_group(configuration: &configuration::Configuration, create_group_request: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups", 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_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() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Creates an Announcement for a Group. +pub fn create_group_announcement(configuration: &configuration::Configuration, group_id: &str, create_group_announcement_request: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}/announcement", local_var_configuration.base_path, groupId=crate::apis::urlencode(group_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_group_announcement_request); + + let local_var_req = local_var_req_builder.build()?; + let mut local_var_resp = local_var_client.execute(local_var_req)?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text()?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Creates a gallery for a Group. +pub fn create_group_gallery(configuration: &configuration::Configuration, group_id: &str, create_group_gallery_request: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}/galleries", local_var_configuration.base_path, groupId=crate::apis::urlencode(group_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_group_gallery_request); + + let local_var_req = local_var_req_builder.build()?; + let mut local_var_resp = local_var_client.execute(local_var_req)?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text()?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Sends an invite to a user to join the group. +pub fn create_group_invite(configuration: &configuration::Configuration, group_id: &str, create_group_invite_request: Option) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}/invites", local_var_configuration.base_path, groupId=crate::apis::urlencode(group_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_group_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() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Create a Group role. +pub fn create_group_role(configuration: &configuration::Configuration, group_id: &str, create_group_role_request: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}/roles", local_var_configuration.base_path, groupId=crate::apis::urlencode(group_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_group_role_request); + + let local_var_req = local_var_req_builder.build()?; + let mut local_var_resp = local_var_client.execute(local_var_req)?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text()?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Deletes a Group. +pub fn delete_group(configuration: &configuration::Configuration, group_id: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}", local_var_configuration.base_path, groupId=crate::apis::urlencode(group_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 = 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)) + } +} + +/// Deletes the announcement for a Group. +pub fn delete_group_announcement(configuration: &configuration::Configuration, group_id: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}/announcement", local_var_configuration.base_path, groupId=crate::apis::urlencode(group_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 = 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)) + } +} + +/// Deletes a gallery for a Group. +pub fn delete_group_gallery(configuration: &configuration::Configuration, group_id: &str, group_gallery_id: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}/galleries/{groupGalleryId}", local_var_configuration.base_path, groupId=crate::apis::urlencode(group_id), groupGalleryId=crate::apis::urlencode(group_gallery_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 = 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)) + } +} + +/// Deletes an image from a Group gallery. +pub fn delete_group_gallery_image(configuration: &configuration::Configuration, group_id: &str, group_gallery_id: &str, group_gallery_image_id: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}/galleries/{groupGalleryId}/images/{groupGalleryImageId}", local_var_configuration.base_path, groupId=crate::apis::urlencode(group_id), groupGalleryId=crate::apis::urlencode(group_gallery_id), groupGalleryImageId=crate::apis::urlencode(group_gallery_image_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 = 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)) + } +} + +/// Deletes an Group invite sent to a User +pub fn delete_group_invite(configuration: &configuration::Configuration, group_id: &str, user_id: &str) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}/invites/{userId}", local_var_configuration.base_path, groupId=crate::apis::urlencode(group_id), 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() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Deletes a Group Role by ID and returns the remaining roles. +pub fn delete_group_role(configuration: &configuration::Configuration, group_id: &str, group_role_id: &str) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}/roles/{groupRoleId}", local_var_configuration.base_path, groupId=crate::apis::urlencode(group_id), groupRoleId=crate::apis::urlencode(group_role_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 = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Returns a single Group by ID. +pub fn get_group(configuration: &configuration::Configuration, group_id: &str, include_roles: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}", local_var_configuration.base_path, groupId=crate::apis::urlencode(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_str) = include_roles { + local_var_req_builder = local_var_req_builder.query(&[("includeRoles", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let mut local_var_resp = local_var_client.execute(local_var_req)?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text()?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Returns the announcement for a Group. If no announcement has been made, then it returns **empty object**. If an announcement exists, then it will always return all fields except `imageId` and `imageUrl` which may be null. +pub fn get_group_announcements(configuration: &configuration::Configuration, group_id: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}/announcement", local_var_configuration.base_path, groupId=crate::apis::urlencode(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 = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Returns a list of audit logs for a Group. +pub fn get_group_audit_logs(configuration: &configuration::Configuration, group_id: &str, n: Option, offset: Option, start_date: Option, end_date: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}/auditLogs", local_var_configuration.base_path, groupId=crate::apis::urlencode(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_str) = n { + local_var_req_builder = local_var_req_builder.query(&[("n", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = offset { + local_var_req_builder = local_var_req_builder.query(&[("offset", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_date { + local_var_req_builder = local_var_req_builder.query(&[("startDate", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_date { + local_var_req_builder = local_var_req_builder.query(&[("endDate", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let mut local_var_resp = local_var_client.execute(local_var_req)?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text()?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Returns a list of banned users for a Group. +pub fn get_group_bans(configuration: &configuration::Configuration, group_id: &str, n: Option, offset: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}/bans", local_var_configuration.base_path, groupId=crate::apis::urlencode(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_str) = n { + local_var_req_builder = local_var_req_builder.query(&[("n", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = offset { + local_var_req_builder = local_var_req_builder.query(&[("offset", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let mut local_var_resp = local_var_client.execute(local_var_req)?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text()?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Returns a list of images for a Group gallery. +pub fn get_group_gallery_images(configuration: &configuration::Configuration, group_id: &str, group_gallery_id: &str, n: Option, offset: Option, approved: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}/galleries/{groupGalleryId}", local_var_configuration.base_path, groupId=crate::apis::urlencode(group_id), groupGalleryId=crate::apis::urlencode(group_gallery_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_str) = n { + local_var_req_builder = local_var_req_builder.query(&[("n", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = offset { + local_var_req_builder = local_var_req_builder.query(&[("offset", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = approved { + local_var_req_builder = local_var_req_builder.query(&[("approved", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let mut local_var_resp = local_var_client.execute(local_var_req)?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text()?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Returns a list of members that have been invited to the Group. +pub fn get_group_invites(configuration: &configuration::Configuration, group_id: &str) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}/invites", local_var_configuration.base_path, groupId=crate::apis::urlencode(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 = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Returns a LimitedGroup Member. +pub fn get_group_member(configuration: &configuration::Configuration, group_id: &str, user_id: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}/members/{userId}", local_var_configuration.base_path, groupId=crate::apis::urlencode(group_id), 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 = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Returns a List of all **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. +pub fn get_group_members(configuration: &configuration::Configuration, group_id: &str, n: Option, offset: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}/members", local_var_configuration.base_path, groupId=crate::apis::urlencode(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_str) = n { + local_var_req_builder = local_var_req_builder.query(&[("n", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = offset { + local_var_req_builder = local_var_req_builder.query(&[("offset", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let mut local_var_resp = local_var_client.execute(local_var_req)?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text()?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Returns a List of all possible/available permissions for a Group. +pub fn get_group_permissions(configuration: &configuration::Configuration, group_id: &str) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}/permissions", local_var_configuration.base_path, groupId=crate::apis::urlencode(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 = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Returns a list of members that have requested to join the Group. +pub fn get_group_requests(configuration: &configuration::Configuration, group_id: &str) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}/requests", local_var_configuration.base_path, groupId=crate::apis::urlencode(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 = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Returns a Group Role by ID. +pub fn get_group_roles(configuration: &configuration::Configuration, group_id: &str) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}/roles", local_var_configuration.base_path, groupId=crate::apis::urlencode(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 = 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)) + } +} + +/// Join a Group by ID and returns the joined Group. +pub fn join_group(configuration: &configuration::Configuration, group_id: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}/join", local_var_configuration.base_path, groupId=crate::apis::urlencode(group_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 = 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)) + } +} + +/// Kicks a Group Member from the Group. The current user must have the \"Remove Group Members\" permission. +pub fn kick_group_member(configuration: &configuration::Configuration, group_id: &str, user_id: &str) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}/members/{userId}", local_var_configuration.base_path, groupId=crate::apis::urlencode(group_id), 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() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Leave a group by ID. +pub fn leave_group(configuration: &configuration::Configuration, group_id: &str) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}/leave", local_var_configuration.base_path, groupId=crate::apis::urlencode(group_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() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Removes a Role from a Group Member +pub fn remove_group_member_role(configuration: &configuration::Configuration, group_id: &str, user_id: &str, group_role_id: &str) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}/members/{userId}/roles/{groupRoleId}", local_var_configuration.base_path, groupId=crate::apis::urlencode(group_id), userId=crate::apis::urlencode(user_id), groupRoleId=crate::apis::urlencode(group_role_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 = 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)) + } +} + +/// Responds to a Group Join Request with Accept/Deny +pub fn respond_group_join_request(configuration: &configuration::Configuration, group_id: &str, user_id: &str, respond_group_join_request: Option) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}/requests/{userId}", local_var_configuration.base_path, groupId=crate::apis::urlencode(group_id), 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(&respond_group_join_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 = 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)) + } +} + +/// Unbans a user from a Group. +pub fn unban_group_member(configuration: &configuration::Configuration, group_id: &str, user_id: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}/bans/{userId}", local_var_configuration.base_path, groupId=crate::apis::urlencode(group_id), 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 = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Updates a Group and returns it. +pub fn update_group(configuration: &configuration::Configuration, group_id: &str, update_group_request: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}", local_var_configuration.base_path, groupId=crate::apis::urlencode(group_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_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() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Updates a gallery for a Group. +pub fn update_group_gallery(configuration: &configuration::Configuration, group_id: &str, group_gallery_id: &str, update_group_gallery_request: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}/galleries/{groupGalleryId}", local_var_configuration.base_path, groupId=crate::apis::urlencode(group_id), groupGalleryId=crate::apis::urlencode(group_gallery_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_group_gallery_request); + + let local_var_req = local_var_req_builder.build()?; + let mut local_var_resp = local_var_client.execute(local_var_req)?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text()?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Updates a Group Member +pub fn update_group_member(configuration: &configuration::Configuration, group_id: &str, user_id: &str, update_group_member_request: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}/members/{userId}", local_var_configuration.base_path, groupId=crate::apis::urlencode(group_id), 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_group_member_request); + + let local_var_req = local_var_req_builder.build()?; + let mut local_var_resp = local_var_client.execute(local_var_req)?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text()?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Updates a group role by ID. +pub fn update_group_role(configuration: &configuration::Configuration, group_id: &str, group_role_id: &str, update_group_role_request: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/groups/{groupId}/roles/{groupRoleId}", local_var_configuration.base_path, groupId=crate::apis::urlencode(group_id), groupRoleId=crate::apis::urlencode(group_role_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_group_role_request); + + let local_var_req = local_var_req_builder.build()?; + let mut local_var_resp = local_var_client.execute(local_var_req)?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text()?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/src/apis/invite_api.rs b/src/apis/invite_api.rs index 9531f54..30dc2f8 100644 --- a/src/apis/invite_api.rs +++ b/src/apis/invite_api.rs @@ -88,12 +88,12 @@ 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: &str, slot: i32) -> Result> { +pub fn get_invite_message(configuration: &configuration::Configuration, user_id: &str, message_type: crate::models::InviteMessageType, slot: i32) -> Result> { 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=crate::apis::urlencode(message_type), slot=slot); + 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 { @@ -116,12 +116,12 @@ pub fn get_invite_message(configuration: &configuration::Configuration, user_id: } /// 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: &str) -> Result, Error> { +pub fn get_invite_messages(configuration: &configuration::Configuration, user_id: &str, message_type: crate::models::InviteMessageType) -> Result, Error> { 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=crate::apis::urlencode(message_type)); + 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 { @@ -230,12 +230,12 @@ pub fn request_invite(configuration: &configuration::Configuration, user_id: &st } /// 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: &str, slot: i32) -> Result, Error> { +pub fn reset_invite_message(configuration: &configuration::Configuration, user_id: &str, message_type: crate::models::InviteMessageType, slot: i32) -> Result, Error> { 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=crate::apis::urlencode(message_type), slot=slot); + 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 { @@ -287,12 +287,12 @@ pub fn respond_invite(configuration: &configuration::Configuration, notification } /// 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: &str, slot: i32, update_invite_message_request: Option) -> Result, Error> { +pub fn update_invite_message(configuration: &configuration::Configuration, user_id: &str, message_type: crate::models::InviteMessageType, slot: i32, update_invite_message_request: Option) -> Result, Error> { 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=crate::apis::urlencode(message_type), slot=slot); + 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 { diff --git a/src/apis/mod.rs b/src/apis/mod.rs index 5bd3412..778a4c0 100644 --- a/src/apis/mod.rs +++ b/src/apis/mod.rs @@ -67,6 +67,7 @@ pub mod economy_api; pub mod favorites_api; pub mod files_api; pub mod friends_api; +pub mod groups_api; pub mod instances_api; pub mod invite_api; pub mod notifications_api; diff --git a/src/apis/users_api.rs b/src/apis/users_api.rs index e84a5da..eb47f33 100644 --- a/src/apis/users_api.rs +++ b/src/apis/users_api.rs @@ -29,6 +29,22 @@ pub enum GetUserByNameError { UnknownValue(serde_json::Value), } +/// struct for typed errors of method [`get_user_group_requests`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetUserGroupRequestsError { + Status401(crate::models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_user_groups`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetUserGroupsError { + Status401(crate::models::Error), + UnknownValue(serde_json::Value), +} + /// struct for typed errors of method [`search_users`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -42,6 +58,7 @@ pub enum SearchUsersError { #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum UpdateUserError { + Status401(crate::models::Error), UnknownValue(serde_json::Value), } @@ -102,6 +119,62 @@ pub fn get_user_by_name(configuration: &configuration::Configuration, username: } } +/// 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, Error> { + 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 = 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)) + } +} + +/// Get user's public groups +pub fn get_user_groups(configuration: &configuration::Configuration, user_id: &str) -> Result, Error> { + 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()); + } + + let local_var_req = local_var_req_builder.build()?; + let mut local_var_resp = local_var_client.execute(local_var_req)?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text()?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + /// Search and list any users by text query pub fn search_users(configuration: &configuration::Configuration, search: Option<&str>, developer_type: Option<&str>, n: Option, offset: Option) -> Result, Error> { let local_var_configuration = configuration; diff --git a/src/apis/worlds_api.rs b/src/apis/worlds_api.rs index eba4e03..3ab7ca8 100644 --- a/src/apis/worlds_api.rs +++ b/src/apis/worlds_api.rs @@ -184,7 +184,7 @@ pub fn delete_world(configuration: &configuration::Configuration, world_id: &str } /// Search and list currently Active worlds by query filters. -pub fn get_active_worlds(configuration: &configuration::Configuration, featured: Option, sort: Option<&str>, n: Option, order: Option<&str>, offset: Option, search: Option<&str>, tag: Option<&str>, notag: Option<&str>, release_status: Option<&str>, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>) -> Result, Error> { +pub fn get_active_worlds(configuration: &configuration::Configuration, featured: Option, sort: Option, n: Option, order: Option, offset: Option, search: Option<&str>, tag: Option<&str>, notag: Option<&str>, release_status: Option, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>) -> Result, Error> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; @@ -248,7 +248,7 @@ pub fn get_active_worlds(configuration: &configuration::Configuration, featured: } /// Search and list favorited worlds by query filters. -pub fn get_favorited_worlds(configuration: &configuration::Configuration, featured: Option, sort: Option<&str>, n: Option, order: Option<&str>, offset: Option, search: Option<&str>, tag: Option<&str>, notag: Option<&str>, release_status: Option<&str>, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>, user_id: Option<&str>) -> Result, Error> { +pub fn get_favorited_worlds(configuration: &configuration::Configuration, featured: Option, sort: Option, n: Option, order: Option, offset: Option, search: Option<&str>, tag: Option<&str>, notag: Option<&str>, release_status: Option, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>, user_id: Option<&str>) -> Result, Error> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; @@ -315,7 +315,7 @@ pub fn get_favorited_worlds(configuration: &configuration::Configuration, featur } /// Search and list recently visited worlds by query filters. -pub fn get_recent_worlds(configuration: &configuration::Configuration, featured: Option, sort: Option<&str>, n: Option, order: Option<&str>, offset: Option, search: Option<&str>, tag: Option<&str>, notag: Option<&str>, release_status: Option<&str>, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>, user_id: Option<&str>) -> Result, Error> { +pub fn get_recent_worlds(configuration: &configuration::Configuration, featured: Option, sort: Option, n: Option, order: Option, offset: Option, search: Option<&str>, tag: Option<&str>, notag: Option<&str>, release_status: Option, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>, user_id: Option<&str>) -> Result, Error> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; @@ -522,7 +522,7 @@ pub fn publish_world(configuration: &configuration::Configuration, world_id: &st } /// Search and list any worlds by query filters. -pub fn search_worlds(configuration: &configuration::Configuration, featured: Option, sort: Option<&str>, user: Option<&str>, user_id: Option<&str>, n: Option, order: Option<&str>, offset: Option, search: Option<&str>, tag: Option<&str>, notag: Option<&str>, release_status: Option<&str>, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>) -> Result, Error> { +pub fn search_worlds(configuration: &configuration::Configuration, featured: Option, sort: Option, user: Option<&str>, user_id: Option<&str>, n: Option, order: Option, offset: Option, search: Option<&str>, tag: Option<&str>, notag: Option<&str>, release_status: Option, max_unity_version: Option<&str>, min_unity_version: Option<&str>, platform: Option<&str>) -> Result, Error> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; diff --git a/src/models/add_group_gallery_image_request.rs b/src/models/add_group_gallery_image_request.rs new file mode 100644 index 0000000..1c51e39 --- /dev/null +++ b/src/models/add_group_gallery_image_request.rs @@ -0,0 +1,26 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct AddGroupGalleryImageRequest { + #[serde(rename = "fileId")] + pub file_id: String, +} + +impl AddGroupGalleryImageRequest { + pub fn new(file_id: String) -> AddGroupGalleryImageRequest { + AddGroupGalleryImageRequest { + file_id, + } + } +} + + diff --git a/src/models/api_config.rs b/src/models/api_config.rs index e60677d..50620e1 100644 --- a/src/models/api_config.rs +++ b/src/models/api_config.rs @@ -23,7 +23,7 @@ pub struct ApiConfig { pub address: String, /// Public Announcements #[serde(rename = "announcements")] - pub announcements: Vec, + pub announcements: Vec, /// apiKey to be used for all other requests #[serde(rename = "apiKey")] pub api_key: String, @@ -128,12 +128,12 @@ pub struct ApiConfig { #[serde(rename = "downloadLinkWindows")] pub download_link_windows: String, #[serde(rename = "downloadUrls")] - pub download_urls: Box, + pub download_urls: Box, /// Array of DynamicWorldRow objects, used by the game to display the list of world rows #[serde(rename = "dynamicWorldRows")] pub dynamic_world_rows: Vec, #[serde(rename = "events")] - pub events: Box, + pub events: Box, /// Unknown #[serde(rename = "gearDemoRoomId")] pub gear_demo_room_id: String, @@ -252,7 +252,7 @@ pub struct ApiConfig { impl ApiConfig { /// - pub fn new(voice_enable_degradation: bool, voice_enable_receiver_limiting: bool, address: String, announcements: Vec, api_key: String, app_name: String, build_version_tag: String, client_api_key: String, client_bps_ceiling: i32, client_disconnect_timeout: i32, client_reserved_player_bps: i32, client_sent_count_allowance: i32, contact_email: String, copyright_email: String, current_tos_version: i32, default_avatar: String, deployment_group: crate::models::DeploymentGroup, dev_app_version_standalone: String, dev_download_link_windows: String, dev_sdk_url: String, dev_sdk_version: String, dev_server_version_standalone: String, dis_countdown: String, disable_avatar_copying: bool, disable_avatar_gating: bool, disable_community_labs: bool, disable_community_labs_promotion: bool, disable_email: bool, disable_event_stream: bool, disable_feedback_gating: bool, disable_frontend_builds: bool, disable_hello: bool, disable_oculus_subs: bool, disable_registration: bool, disable_steam_networking: bool, disable_two_factor_auth: bool, disable_udon: bool, disable_upgrade_account: bool, download_link_windows: String, download_urls: crate::models::DownloadUrlList, dynamic_world_rows: Vec, events: crate::models::ApiEventConfig, gear_demo_room_id: String, home_world_id: String, homepage_redirect_target: String, hub_world_id: String, jobs_email: String, message_of_the_day: String, moderation_email: String, moderation_query_period: i32, not_allowed_to_select_avatar_in_private_world_message: String, plugin: String, release_app_version_standalone: String, release_sdk_url: String, release_sdk_version: String, release_server_version_standalone: String, sdk_developer_faq_url: String, sdk_discord_url: String, sdk_not_allowed_to_publish_message: String, sdk_unity_version: String, server_name: String, support_email: String, time_out_world_id: String, tutorial_world_id: String, update_rate_ms_maximum: i32, update_rate_ms_minimum: i32, update_rate_ms_normal: i32, update_rate_ms_udon_manual: i32, upload_analysis_percent: i32, url_list: Vec, use_reliable_udp_for_voice: bool, user_update_period: i32, user_verification_delay: i32, user_verification_retry: i32, user_verification_timeout: i32, vive_windows_url: String, white_listed_asset_urls: Vec, world_update_period: i32, player_url_resolver_hash: String, player_url_resolver_version: String) -> ApiConfig { + pub fn new(voice_enable_degradation: bool, voice_enable_receiver_limiting: bool, address: String, announcements: Vec, api_key: String, app_name: String, build_version_tag: String, client_api_key: String, client_bps_ceiling: i32, client_disconnect_timeout: i32, client_reserved_player_bps: i32, client_sent_count_allowance: i32, contact_email: String, copyright_email: String, current_tos_version: i32, default_avatar: String, deployment_group: crate::models::DeploymentGroup, dev_app_version_standalone: String, dev_download_link_windows: String, dev_sdk_url: String, dev_sdk_version: String, dev_server_version_standalone: String, dis_countdown: String, disable_avatar_copying: bool, disable_avatar_gating: bool, disable_community_labs: bool, disable_community_labs_promotion: bool, disable_email: bool, disable_event_stream: bool, disable_feedback_gating: bool, disable_frontend_builds: bool, disable_hello: bool, disable_oculus_subs: bool, disable_registration: bool, disable_steam_networking: bool, disable_two_factor_auth: bool, disable_udon: bool, disable_upgrade_account: bool, download_link_windows: String, download_urls: crate::models::ApiConfigDownloadUrlList, dynamic_world_rows: Vec, events: crate::models::ApiConfigEvents, gear_demo_room_id: String, home_world_id: String, homepage_redirect_target: String, hub_world_id: String, jobs_email: String, message_of_the_day: String, moderation_email: String, moderation_query_period: i32, not_allowed_to_select_avatar_in_private_world_message: String, plugin: String, release_app_version_standalone: String, release_sdk_url: String, release_sdk_version: String, release_server_version_standalone: String, sdk_developer_faq_url: String, sdk_discord_url: String, sdk_not_allowed_to_publish_message: String, sdk_unity_version: String, server_name: String, support_email: String, time_out_world_id: String, tutorial_world_id: String, update_rate_ms_maximum: i32, update_rate_ms_minimum: i32, update_rate_ms_normal: i32, update_rate_ms_udon_manual: i32, upload_analysis_percent: i32, url_list: Vec, use_reliable_udp_for_voice: bool, user_update_period: i32, user_verification_delay: i32, user_verification_retry: i32, user_verification_timeout: i32, vive_windows_url: String, white_listed_asset_urls: Vec, world_update_period: i32, player_url_resolver_hash: String, player_url_resolver_version: String) -> ApiConfig { ApiConfig { voice_enable_degradation, voice_enable_receiver_limiting, diff --git a/src/models/public_announcement.rs b/src/models/api_config_announcement.rs similarity index 66% rename from src/models/public_announcement.rs rename to src/models/api_config_announcement.rs index 3bb9f7a..a5acc58 100644 --- a/src/models/public_announcement.rs +++ b/src/models/api_config_announcement.rs @@ -6,12 +6,12 @@ * Generated by: https://openapi-generator.tech */ -/// PublicAnnouncement : Public Announcement +/// ApiConfigAnnouncement : Public Announcement #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct PublicAnnouncement { +pub struct ApiConfigAnnouncement { /// Announcement name #[serde(rename = "name")] pub name: String, @@ -20,10 +20,10 @@ pub struct PublicAnnouncement { pub text: String, } -impl PublicAnnouncement { +impl ApiConfigAnnouncement { /// Public Announcement - pub fn new(name: String, text: String) -> PublicAnnouncement { - PublicAnnouncement { + pub fn new(name: String, text: String) -> ApiConfigAnnouncement { + ApiConfigAnnouncement { name, text, } diff --git a/src/models/download_url_list.rs b/src/models/api_config_download_url_list.rs similarity index 76% rename from src/models/download_url_list.rs rename to src/models/api_config_download_url_list.rs index c2bdbfa..7fd173e 100644 --- a/src/models/download_url_list.rs +++ b/src/models/api_config_download_url_list.rs @@ -6,12 +6,12 @@ * Generated by: https://openapi-generator.tech */ -/// DownloadUrlList : Download links for various development assets. +/// ApiConfigDownloadUrlList : Download links for various development assets. #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct DownloadUrlList { +pub struct ApiConfigDownloadUrlList { /// Download link for legacy SDK2 #[serde(rename = "sdk2")] pub sdk2: String, @@ -23,10 +23,10 @@ pub struct DownloadUrlList { pub sdk3_worlds: String, } -impl DownloadUrlList { +impl ApiConfigDownloadUrlList { /// Download links for various development assets. - pub fn new(sdk2: String, sdk3_avatars: String, sdk3_worlds: String) -> DownloadUrlList { - DownloadUrlList { + pub fn new(sdk2: String, sdk3_avatars: String, sdk3_worlds: String) -> ApiConfigDownloadUrlList { + ApiConfigDownloadUrlList { sdk2, sdk3_avatars, sdk3_worlds, diff --git a/src/models/api_event_config.rs b/src/models/api_config_events.rs similarity index 93% rename from src/models/api_event_config.rs rename to src/models/api_config_events.rs index 2211111..18c042d 100644 --- a/src/models/api_event_config.rs +++ b/src/models/api_config_events.rs @@ -10,7 +10,7 @@ #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ApiEventConfig { +pub struct ApiConfigEvents { /// Unknown #[serde(rename = "distanceClose")] pub distance_close: i32, @@ -43,9 +43,9 @@ pub struct ApiEventConfig { pub view_segment_length: i32, } -impl ApiEventConfig { - pub fn new(distance_close: i32, distance_factor: i32, distance_far: i32, group_distance: i32, maximum_bunch_size: i32, not_visible_factor: i32, player_order_bucket_size: i32, player_order_factor: i32, slow_update_factor_threshold: i32, view_segment_length: i32) -> ApiEventConfig { - ApiEventConfig { +impl ApiConfigEvents { + pub fn new(distance_close: i32, distance_factor: i32, distance_far: i32, group_distance: i32, maximum_bunch_size: i32, not_visible_factor: i32, player_order_bucket_size: i32, player_order_factor: i32, slow_update_factor_threshold: i32, view_segment_length: i32) -> ApiConfigEvents { + ApiConfigEvents { distance_close, distance_factor, distance_far, diff --git a/src/models/ban_group_member_request.rs b/src/models/ban_group_member_request.rs new file mode 100644 index 0000000..a294405 --- /dev/null +++ b/src/models/ban_group_member_request.rs @@ -0,0 +1,27 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct BanGroupMemberRequest { + /// 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")] + pub user_id: String, +} + +impl BanGroupMemberRequest { + pub fn new(user_id: String) -> BanGroupMemberRequest { + BanGroupMemberRequest { + user_id, + } + } +} + + diff --git a/src/models/create_group_announcement_request.rs b/src/models/create_group_announcement_request.rs new file mode 100644 index 0000000..a637e6b --- /dev/null +++ b/src/models/create_group_announcement_request.rs @@ -0,0 +1,38 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct CreateGroupAnnouncementRequest { + /// Announcement title + #[serde(rename = "title")] + pub title: String, + /// Announcement text + #[serde(rename = "text", skip_serializing_if = "Option::is_none")] + pub text: Option, + #[serde(rename = "imageId", skip_serializing_if = "Option::is_none")] + pub image_id: Option, + /// Send notification to group members. + #[serde(rename = "sendNotification", skip_serializing_if = "Option::is_none")] + pub send_notification: Option, +} + +impl CreateGroupAnnouncementRequest { + pub fn new(title: String) -> CreateGroupAnnouncementRequest { + CreateGroupAnnouncementRequest { + title, + text: None, + image_id: None, + send_notification: None, + } + } +} + + diff --git a/src/models/create_group_gallery_request.rs b/src/models/create_group_gallery_request.rs new file mode 100644 index 0000000..6208183 --- /dev/null +++ b/src/models/create_group_gallery_request.rs @@ -0,0 +1,51 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct CreateGroupGalleryRequest { + /// Name of the gallery. + #[serde(rename = "name")] + pub name: String, + /// Description of the gallery. + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + /// Whether the gallery is members only. + #[serde(rename = "membersOnly", skip_serializing_if = "Option::is_none")] + pub members_only: Option, + /// + #[serde(rename = "roleIdsToView", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub role_ids_to_view: Option>>, + /// + #[serde(rename = "roleIdsToSubmit", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub role_ids_to_submit: Option>>, + /// + #[serde(rename = "roleIdsToAutoApprove", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub role_ids_to_auto_approve: Option>>, + /// + #[serde(rename = "roleIdsToManage", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub role_ids_to_manage: Option>>, +} + +impl CreateGroupGalleryRequest { + pub fn new(name: String) -> CreateGroupGalleryRequest { + CreateGroupGalleryRequest { + name, + description: None, + members_only: None, + role_ids_to_view: None, + role_ids_to_submit: None, + role_ids_to_auto_approve: None, + role_ids_to_manage: None, + } + } +} + + diff --git a/src/models/create_group_invite_request.rs b/src/models/create_group_invite_request.rs new file mode 100644 index 0000000..f76f6a5 --- /dev/null +++ b/src/models/create_group_invite_request.rs @@ -0,0 +1,30 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct CreateGroupInviteRequest { + /// 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")] + pub user_id: String, + #[serde(rename = "confirmOverrideBlock", skip_serializing_if = "Option::is_none")] + pub confirm_override_block: Option, +} + +impl CreateGroupInviteRequest { + pub fn new(user_id: String) -> CreateGroupInviteRequest { + CreateGroupInviteRequest { + user_id, + confirm_override_block: None, + } + } +} + + diff --git a/src/models/create_group_request.rs b/src/models/create_group_request.rs new file mode 100644 index 0000000..3cb3fe7 --- /dev/null +++ b/src/models/create_group_request.rs @@ -0,0 +1,47 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct CreateGroupRequest { + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "shortCode")] + pub short_code: String, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "joinState", skip_serializing_if = "Option::is_none")] + pub join_state: Option, + #[serde(rename = "iconId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub icon_id: Option>, + #[serde(rename = "bannerId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub banner_id: Option>, + #[serde(rename = "privacy", skip_serializing_if = "Option::is_none")] + pub privacy: Option, + #[serde(rename = "roleTemplate")] + pub role_template: crate::models::GroupRoleTemplate, +} + +impl CreateGroupRequest { + pub fn new(name: String, short_code: String, role_template: crate::models::GroupRoleTemplate) -> CreateGroupRequest { + CreateGroupRequest { + name, + short_code, + description: None, + join_state: None, + icon_id: None, + banner_id: None, + privacy: None, + role_template, + } + } +} + + diff --git a/src/models/create_group_role_request.rs b/src/models/create_group_role_request.rs new file mode 100644 index 0000000..c1b52d8 --- /dev/null +++ b/src/models/create_group_role_request.rs @@ -0,0 +1,38 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct CreateGroupRoleRequest { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "isSelfAssignable", skip_serializing_if = "Option::is_none")] + pub is_self_assignable: Option, + #[serde(rename = "permissions", skip_serializing_if = "Option::is_none")] + pub permissions: Option>, +} + +impl CreateGroupRoleRequest { + pub fn new() -> CreateGroupRoleRequest { + CreateGroupRoleRequest { + id: None, + name: None, + description: None, + is_self_assignable: None, + permissions: None, + } + } +} + + diff --git a/src/models/group.rs b/src/models/group.rs new file mode 100644 index 0000000..64afb89 --- /dev/null +++ b/src/models/group.rs @@ -0,0 +1,102 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct Group { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "shortCode", skip_serializing_if = "Option::is_none")] + pub short_code: Option, + #[serde(rename = "discriminator", skip_serializing_if = "Option::is_none")] + pub discriminator: Option, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "iconUrl", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub icon_url: Option>, + #[serde(rename = "bannerUrl", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub banner_url: Option>, + #[serde(rename = "privacy", skip_serializing_if = "Option::is_none")] + pub privacy: Option, + /// 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, + #[serde(rename = "rules", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub rules: Option>, + #[serde(rename = "links", skip_serializing_if = "Option::is_none")] + pub links: Option>, + #[serde(rename = "languages", skip_serializing_if = "Option::is_none")] + pub languages: Option>, + #[serde(rename = "iconId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub icon_id: Option>, + #[serde(rename = "bannerId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub banner_id: Option>, + #[serde(rename = "memberCount", skip_serializing_if = "Option::is_none")] + pub member_count: Option, + #[serde(rename = "memberCountSyncedAt", skip_serializing_if = "Option::is_none")] + pub member_count_synced_at: Option, + #[serde(rename = "isVerified", skip_serializing_if = "Option::is_none")] + pub is_verified: Option, + #[serde(rename = "joinState", skip_serializing_if = "Option::is_none")] + pub join_state: Option, + /// + #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] + pub tags: Option>, + /// + #[serde(rename = "galleries", skip_serializing_if = "Option::is_none")] + pub galleries: Option>, + #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")] + pub created_at: Option, + #[serde(rename = "onlineMemberCount", skip_serializing_if = "Option::is_none")] + pub online_member_count: Option, + #[serde(rename = "membershipStatus", skip_serializing_if = "Option::is_none")] + pub membership_status: Option, + #[serde(rename = "myMember", skip_serializing_if = "Option::is_none")] + pub my_member: Option>, + /// Only returned if ?includeRoles=true is specified. + #[serde(rename = "roles", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub roles: Option>>, +} + +impl Group { + pub fn new() -> Group { + Group { + id: None, + name: None, + short_code: None, + discriminator: None, + description: None, + icon_url: None, + banner_url: None, + privacy: None, + owner_id: None, + rules: None, + links: None, + languages: None, + icon_id: None, + banner_id: None, + member_count: None, + member_count_synced_at: None, + is_verified: None, + join_state: None, + tags: None, + galleries: None, + created_at: None, + online_member_count: None, + membership_status: None, + my_member: None, + roles: None, + } + } +} + + diff --git a/src/models/group_announcement.rs b/src/models/group_announcement.rs new file mode 100644 index 0000000..4f4f82a --- /dev/null +++ b/src/models/group_announcement.rs @@ -0,0 +1,51 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct GroupAnnouncement { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "groupId", skip_serializing_if = "Option::is_none")] + pub group_id: Option, + /// 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, + #[serde(rename = "title", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub title: Option>, + #[serde(rename = "text", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub text: Option>, + #[serde(rename = "imageId", skip_serializing_if = "Option::is_none")] + pub image_id: Option, + #[serde(rename = "imageUrl", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub image_url: Option>, + #[serde(rename = "createdAt", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub created_at: Option>, + #[serde(rename = "updatedAt", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub updated_at: Option>, +} + +impl GroupAnnouncement { + pub fn new() -> GroupAnnouncement { + GroupAnnouncement { + id: None, + group_id: None, + author_id: None, + title: None, + text: None, + image_id: None, + image_url: None, + created_at: None, + updated_at: None, + } + } +} + + diff --git a/src/models/group_audit_log_entry.rs b/src/models/group_audit_log_entry.rs new file mode 100644 index 0000000..d6baa11 --- /dev/null +++ b/src/models/group_audit_log_entry.rs @@ -0,0 +1,55 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct GroupAuditLogEntry { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] + pub created_at: Option, + #[serde(rename = "groupId", skip_serializing_if = "Option::is_none")] + pub group_id: Option, + /// 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, + #[serde(rename = "actorDisplayname", skip_serializing_if = "Option::is_none")] + pub actor_displayname: Option, + /// Typically GroupID or GroupRoleID, but could be other types of IDs. + #[serde(rename = "targetId", skip_serializing_if = "Option::is_none")] + pub target_id: Option, + /// 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`. + #[serde(rename = "eventType", skip_serializing_if = "Option::is_none")] + pub event_type: Option, + /// A human-readable description of the event. + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + /// The data associated with the event. The format of this data is dependent on the event type. + #[serde(rename = "data", skip_serializing_if = "Option::is_none")] + pub data: Option, +} + +impl GroupAuditLogEntry { + pub fn new() -> GroupAuditLogEntry { + GroupAuditLogEntry { + id: None, + created_at: None, + group_id: None, + actor_id: None, + actor_displayname: None, + target_id: None, + event_type: None, + description: None, + data: None, + } + } +} + + diff --git a/src/models/group_gallery.rs b/src/models/group_gallery.rs new file mode 100644 index 0000000..93ae612 --- /dev/null +++ b/src/models/group_gallery.rs @@ -0,0 +1,60 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct GroupGallery { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + /// Name of the gallery. + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + /// Description of the gallery. + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + /// Whether the gallery is members only. + #[serde(rename = "membersOnly", skip_serializing_if = "Option::is_none")] + pub members_only: Option, + /// + #[serde(rename = "roleIdsToView", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub role_ids_to_view: Option>>, + /// + #[serde(rename = "roleIdsToSubmit", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub role_ids_to_submit: Option>>, + /// + #[serde(rename = "roleIdsToAutoApprove", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub role_ids_to_auto_approve: Option>>, + /// + #[serde(rename = "roleIdsToManage", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub role_ids_to_manage: Option>>, + #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")] + pub created_at: Option, + #[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")] + pub updated_at: Option, +} + +impl GroupGallery { + pub fn new() -> GroupGallery { + GroupGallery { + id: None, + name: None, + description: None, + members_only: None, + role_ids_to_view: None, + role_ids_to_submit: None, + role_ids_to_auto_approve: None, + role_ids_to_manage: None, + created_at: None, + updated_at: None, + } + } +} + + diff --git a/src/models/group_gallery_image.rs b/src/models/group_gallery_image.rs new file mode 100644 index 0000000..e0b4189 --- /dev/null +++ b/src/models/group_gallery_image.rs @@ -0,0 +1,55 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct GroupGalleryImage { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "groupId", skip_serializing_if = "Option::is_none")] + pub group_id: Option, + #[serde(rename = "galleryId", skip_serializing_if = "Option::is_none")] + pub gallery_id: Option, + #[serde(rename = "fileId", skip_serializing_if = "Option::is_none")] + pub file_id: Option, + #[serde(rename = "imageUrl", skip_serializing_if = "Option::is_none")] + pub image_url: Option, + #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")] + pub created_at: Option, + /// 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 = "submittedByUserId", skip_serializing_if = "Option::is_none")] + pub submitted_by_user_id: Option, + #[serde(rename = "approved", skip_serializing_if = "Option::is_none")] + pub approved: Option, + /// 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 = "approvedByUserId", skip_serializing_if = "Option::is_none")] + pub approved_by_user_id: Option, + #[serde(rename = "approvedAt", skip_serializing_if = "Option::is_none")] + pub approved_at: Option, +} + +impl GroupGalleryImage { + pub fn new() -> GroupGalleryImage { + GroupGalleryImage { + id: None, + group_id: None, + gallery_id: None, + file_id: None, + image_url: None, + created_at: None, + submitted_by_user_id: None, + approved: None, + approved_by_user_id: None, + approved_at: None, + } + } +} + + diff --git a/src/models/group_join_state.rs b/src/models/group_join_state.rs new file mode 100644 index 0000000..dcab208 --- /dev/null +++ b/src/models/group_join_state.rs @@ -0,0 +1,43 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum GroupJoinState { + #[serde(rename = "closed")] + Closed, + #[serde(rename = "invite")] + Invite, + #[serde(rename = "request")] + Request, + #[serde(rename = "open")] + Open, + +} + +impl ToString for GroupJoinState { + fn to_string(&self) -> String { + match self { + Self::Closed => String::from("closed"), + Self::Invite => String::from("invite"), + Self::Request => String::from("request"), + Self::Open => String::from("open"), + } + } +} + +impl Default for GroupJoinState { + fn default() -> GroupJoinState { + Self::Closed + } +} + + + + diff --git a/src/models/group_limited_member.rs b/src/models/group_limited_member.rs new file mode 100644 index 0000000..75d51f9 --- /dev/null +++ b/src/models/group_limited_member.rs @@ -0,0 +1,36 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct GroupLimitedMember { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "groupId", skip_serializing_if = "Option::is_none")] + pub group_id: Option, + /// 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, + #[serde(rename = "isRepresenting", skip_serializing_if = "Option::is_none")] + pub is_representing: Option, +} + +impl GroupLimitedMember { + pub fn new() -> GroupLimitedMember { + GroupLimitedMember { + id: None, + group_id: None, + user_id: None, + is_representing: None, + } + } +} + + diff --git a/src/models/group_member.rs b/src/models/group_member.rs new file mode 100644 index 0000000..c9af24e --- /dev/null +++ b/src/models/group_member.rs @@ -0,0 +1,67 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct GroupMember { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "groupId", skip_serializing_if = "Option::is_none")] + pub group_id: Option, + /// 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, + /// 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, + #[serde(rename = "user", skip_serializing_if = "Option::is_none")] + pub user: Option>, + #[serde(rename = "roleIds", skip_serializing_if = "Option::is_none")] + pub role_ids: Option>, + #[serde(rename = "joinedAt", skip_serializing_if = "Option::is_none")] + pub joined_at: Option, + #[serde(rename = "membershipStatus", skip_serializing_if = "Option::is_none")] + pub membership_status: Option, + #[serde(rename = "visibility", skip_serializing_if = "Option::is_none")] + pub visibility: Option, + #[serde(rename = "isSubscribedToAnnouncements", skip_serializing_if = "Option::is_none")] + pub is_subscribed_to_announcements: Option, + /// 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>, + /// 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>, + /// 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>, +} + +impl GroupMember { + pub fn new() -> GroupMember { + GroupMember { + id: None, + group_id: None, + user_id: None, + is_representing: None, + user: None, + 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, + } + } +} + + diff --git a/src/models/group_member_limited_user.rs b/src/models/group_member_limited_user.rs new file mode 100644 index 0000000..48a4241 --- /dev/null +++ b/src/models/group_member_limited_user.rs @@ -0,0 +1,38 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + +/// GroupMemberLimitedUser : Only visible via the /groups/:groupId/members endpoint, **not** when fetching a specific user. + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct GroupMemberLimitedUser { + /// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "displayName", skip_serializing_if = "Option::is_none")] + pub display_name: Option, + #[serde(rename = "thumbnailUrl", skip_serializing_if = "Option::is_none")] + pub thumbnail_url: Option, + #[serde(rename = "iconUrl", skip_serializing_if = "Option::is_none")] + pub icon_url: Option, +} + +impl GroupMemberLimitedUser { + /// Only visible via the /groups/:groupId/members endpoint, **not** when fetching a specific user. + pub fn new() -> GroupMemberLimitedUser { + GroupMemberLimitedUser { + id: None, + display_name: None, + thumbnail_url: None, + icon_url: None, + } + } +} + + diff --git a/src/models/group_member_status.rs b/src/models/group_member_status.rs new file mode 100644 index 0000000..928f157 --- /dev/null +++ b/src/models/group_member_status.rs @@ -0,0 +1,43 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum GroupMemberStatus { + #[serde(rename = "inactive")] + Inactive, + #[serde(rename = "member")] + Member, + #[serde(rename = "requested")] + Requested, + #[serde(rename = "invited")] + Invited, + +} + +impl ToString for GroupMemberStatus { + fn to_string(&self) -> String { + match self { + Self::Inactive => String::from("inactive"), + Self::Member => String::from("member"), + Self::Requested => String::from("requested"), + Self::Invited => String::from("invited"), + } + } +} + +impl Default for GroupMemberStatus { + fn default() -> GroupMemberStatus { + Self::Inactive + } +} + + + + diff --git a/src/models/group_my_member.rs b/src/models/group_my_member.rs new file mode 100644 index 0000000..0f7aa8b --- /dev/null +++ b/src/models/group_my_member.rs @@ -0,0 +1,63 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct GroupMyMember { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "groupId", skip_serializing_if = "Option::is_none")] + pub group_id: Option, + /// 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, + #[serde(rename = "roleIds", skip_serializing_if = "Option::is_none")] + pub role_ids: Option>, + #[serde(rename = "managerNotes", skip_serializing_if = "Option::is_none")] + pub manager_notes: Option, + #[serde(rename = "membershipStatus", skip_serializing_if = "Option::is_none")] + pub membership_status: Option, + #[serde(rename = "isSubscribedToAnnouncements", skip_serializing_if = "Option::is_none")] + pub is_subscribed_to_announcements: Option, + #[serde(rename = "visibility", skip_serializing_if = "Option::is_none")] + pub visibility: Option, + #[serde(rename = "isRepresenting", skip_serializing_if = "Option::is_none")] + pub is_representing: Option, + #[serde(rename = "joinedAt", skip_serializing_if = "Option::is_none")] + pub joined_at: Option, + #[serde(rename = "bannedAt", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub banned_at: Option>, + #[serde(rename = "has2FA", skip_serializing_if = "Option::is_none")] + pub has2_fa: Option, + #[serde(rename = "permissions", skip_serializing_if = "Option::is_none")] + pub permissions: Option>, +} + +impl GroupMyMember { + pub fn new() -> GroupMyMember { + GroupMyMember { + id: None, + group_id: None, + user_id: None, + role_ids: None, + manager_notes: None, + membership_status: None, + is_subscribed_to_announcements: None, + visibility: None, + is_representing: None, + joined_at: None, + banned_at: None, + has2_fa: None, + permissions: None, + } + } +} + + diff --git a/src/models/group_permission.rs b/src/models/group_permission.rs new file mode 100644 index 0000000..3334982 --- /dev/null +++ b/src/models/group_permission.rs @@ -0,0 +1,45 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + +/// GroupPermission : A permission that can be granted to a role in a group. + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct GroupPermission { + /// The name of the permission. + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The display name of the permission. + #[serde(rename = "displayName", skip_serializing_if = "Option::is_none")] + pub display_name: Option, + /// Human-readable description of the permission. + #[serde(rename = "help", skip_serializing_if = "Option::is_none")] + pub help: Option, + /// Whether this permission is a \"management\" permission. + #[serde(rename = "isManagementPermission", skip_serializing_if = "Option::is_none")] + pub is_management_permission: Option, + /// Whether the user is allowed to add this permission to a role. + #[serde(rename = "allowedToAdd", skip_serializing_if = "Option::is_none")] + pub allowed_to_add: Option, +} + +impl GroupPermission { + /// A permission that can be granted to a role in a group. + pub fn new() -> GroupPermission { + GroupPermission { + name: None, + display_name: None, + help: None, + is_management_permission: None, + allowed_to_add: None, + } + } +} + + diff --git a/src/models/group_privacy.rs b/src/models/group_privacy.rs new file mode 100644 index 0000000..00449fa --- /dev/null +++ b/src/models/group_privacy.rs @@ -0,0 +1,37 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum GroupPrivacy { + #[serde(rename = "default")] + Default, + #[serde(rename = "private")] + Private, + +} + +impl ToString for GroupPrivacy { + fn to_string(&self) -> String { + match self { + Self::Default => String::from("default"), + Self::Private => String::from("private"), + } + } +} + +impl Default for GroupPrivacy { + fn default() -> GroupPrivacy { + Self::Default + } +} + + + + diff --git a/src/models/group_role.rs b/src/models/group_role.rs new file mode 100644 index 0000000..69a764a --- /dev/null +++ b/src/models/group_role.rs @@ -0,0 +1,59 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct GroupRole { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "groupId", skip_serializing_if = "Option::is_none")] + pub group_id: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "isSelfAssignable", skip_serializing_if = "Option::is_none")] + pub is_self_assignable: Option, + #[serde(rename = "permissions", skip_serializing_if = "Option::is_none")] + pub permissions: Option>, + #[serde(rename = "isManagementRole", skip_serializing_if = "Option::is_none")] + pub is_management_role: Option, + #[serde(rename = "requiresTwoFactor", skip_serializing_if = "Option::is_none")] + pub requires_two_factor: Option, + #[serde(rename = "requiresPurchase", skip_serializing_if = "Option::is_none")] + pub requires_purchase: Option, + #[serde(rename = "order", skip_serializing_if = "Option::is_none")] + pub order: Option, + #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")] + pub created_at: Option, + #[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")] + pub updated_at: Option, +} + +impl GroupRole { + pub fn new() -> GroupRole { + GroupRole { + id: None, + group_id: None, + name: None, + description: None, + is_self_assignable: None, + permissions: None, + is_management_role: None, + requires_two_factor: None, + requires_purchase: None, + order: None, + created_at: None, + updated_at: None, + } + } +} + + diff --git a/src/models/group_role_template.rs b/src/models/group_role_template.rs new file mode 100644 index 0000000..f7456d3 --- /dev/null +++ b/src/models/group_role_template.rs @@ -0,0 +1,43 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum GroupRoleTemplate { + #[serde(rename = "default")] + Default, + #[serde(rename = "managedFree")] + ManagedFree, + #[serde(rename = "managedInvite")] + ManagedInvite, + #[serde(rename = "managedRequest")] + ManagedRequest, + +} + +impl ToString for GroupRoleTemplate { + fn to_string(&self) -> String { + match self { + Self::Default => String::from("default"), + Self::ManagedFree => String::from("managedFree"), + Self::ManagedInvite => String::from("managedInvite"), + Self::ManagedRequest => String::from("managedRequest"), + } + } +} + +impl Default for GroupRoleTemplate { + fn default() -> GroupRoleTemplate { + Self::Default + } +} + + + + diff --git a/src/models/group_user_visibility.rs b/src/models/group_user_visibility.rs new file mode 100644 index 0000000..ff101ff --- /dev/null +++ b/src/models/group_user_visibility.rs @@ -0,0 +1,40 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum GroupUserVisibility { + #[serde(rename = "visible")] + Visible, + #[serde(rename = "hidden")] + Hidden, + #[serde(rename = "friends")] + Friends, + +} + +impl ToString for GroupUserVisibility { + fn to_string(&self) -> String { + match self { + Self::Visible => String::from("visible"), + Self::Hidden => String::from("hidden"), + Self::Friends => String::from("friends"), + } + } +} + +impl Default for GroupUserVisibility { + fn default() -> GroupUserVisibility { + Self::Visible + } +} + + + + diff --git a/src/models/invite_message_type.rs b/src/models/invite_message_type.rs index 904887e..9c1d1f8 100644 --- a/src/models/invite_message_type.rs +++ b/src/models/invite_message_type.rs @@ -22,16 +22,7 @@ pub enum InviteMessageType { } -impl ToString for InviteMessageType { - fn to_string(&self) -> String { - match self { - Self::Message => String::from("message"), - Self::Response => String::from("response"), - Self::Request => String::from("request"), - Self::RequestResponse => String::from("requestResponse"), - } - } -} + impl Default for InviteMessageType { fn default() -> InviteMessageType { @@ -42,3 +33,13 @@ impl Default for InviteMessageType { +impl std::fmt::Display for InviteMessageType { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Message => write!(f, "message"), + Self::Response => write!(f, "response"), + Self::Request => write!(f, "request"), + Self::RequestResponse => write!(f, "requestResponse"), + } + } +} \ No newline at end of file diff --git a/src/models/mod.rs b/src/models/mod.rs index 2e834ce..a2f2e9c 100644 --- a/src/models/mod.rs +++ b/src/models/mod.rs @@ -1,21 +1,39 @@ pub mod add_favorite_request; pub use self::add_favorite_request::AddFavoriteRequest; +pub mod add_group_gallery_image_request; +pub use self::add_group_gallery_image_request::AddGroupGalleryImageRequest; pub mod api_config; pub use self::api_config::ApiConfig; -pub mod api_event_config; -pub use self::api_event_config::ApiEventConfig; +pub mod api_config_announcement; +pub use self::api_config_announcement::ApiConfigAnnouncement; +pub mod api_config_download_url_list; +pub use self::api_config_download_url_list::ApiConfigDownloadUrlList; +pub mod api_config_events; +pub use self::api_config_events::ApiConfigEvents; pub mod api_health; pub use self::api_health::ApiHealth; 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 ban_group_member_request; +pub use self::ban_group_member_request::BanGroupMemberRequest; pub mod create_avatar_request; pub use self::create_avatar_request::CreateAvatarRequest; pub mod create_file_request; pub use self::create_file_request::CreateFileRequest; pub mod create_file_version_request; pub use self::create_file_version_request::CreateFileVersionRequest; +pub mod create_group_announcement_request; +pub use self::create_group_announcement_request::CreateGroupAnnouncementRequest; +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_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_world_request; pub use self::create_world_request::CreateWorldRequest; pub mod current_user; @@ -24,8 +42,6 @@ pub mod deployment_group; pub use self::deployment_group::DeploymentGroup; pub mod developer_type; pub use self::developer_type::DeveloperType; -pub mod download_url_list; -pub use self::download_url_list::DownloadUrlList; pub mod dynamic_content_row; pub use self::dynamic_content_row::DynamicContentRow; pub mod error; @@ -54,6 +70,38 @@ pub mod finish_file_data_upload_request; pub use self::finish_file_data_upload_request::FinishFileDataUploadRequest; pub mod friend_status; pub use self::friend_status::FriendStatus; +pub mod group; +pub use self::group::Group; +pub mod group_announcement; +pub use self::group_announcement::GroupAnnouncement; +pub mod group_audit_log_entry; +pub use self::group_audit_log_entry::GroupAuditLogEntry; +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_join_state; +pub use self::group_join_state::GroupJoinState; +pub mod group_limited_member; +pub use self::group_limited_member::GroupLimitedMember; +pub mod group_member; +pub use self::group_member::GroupMember; +pub mod group_member_limited_user; +pub use self::group_member_limited_user::GroupMemberLimitedUser; +pub mod group_member_status; +pub use self::group_member_status::GroupMemberStatus; +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_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_user_visibility; +pub use self::group_user_visibility::GroupUserVisibility; pub mod info_push; pub use self::info_push::InfoPush; pub mod info_push_data; @@ -102,6 +150,10 @@ pub mod notification; pub use self::notification::Notification; pub mod notification_type; pub use self::notification_type::NotificationType; +pub mod order_option; +pub use self::order_option::OrderOption; +pub mod paginated_group_audit_log_entry_list; +pub use self::paginated_group_audit_log_entry_list::PaginatedGroupAuditLogEntryList; pub mod past_display_name; pub use self::past_display_name::PastDisplayName; pub mod permission; @@ -110,18 +162,20 @@ pub mod player_moderation; pub use self::player_moderation::PlayerModeration; pub mod player_moderation_type; pub use self::player_moderation_type::PlayerModerationType; -pub mod public_announcement; -pub use self::public_announcement::PublicAnnouncement; pub mod region; pub use self::region::Region; pub mod release_status; pub use self::release_status::ReleaseStatus; pub mod request_invite_request; pub use self::request_invite_request::RequestInviteRequest; +pub mod respond_group_join_request; +pub use self::respond_group_join_request::RespondGroupJoinRequest; pub mod response; pub use self::response::Response; pub mod sent_notification; pub use self::sent_notification::SentNotification; +pub mod sort_option; +pub use self::sort_option::SortOption; pub mod subscription; pub use self::subscription::Subscription; pub mod subscription_period; @@ -146,6 +200,14 @@ pub mod update_avatar_request; pub use self::update_avatar_request::UpdateAvatarRequest; pub mod update_favorite_group_request; pub use self::update_favorite_group_request::UpdateFavoriteGroupRequest; +pub mod update_group_gallery_request; +pub use self::update_group_gallery_request::UpdateGroupGalleryRequest; +pub mod update_group_member_request; +pub use self::update_group_member_request::UpdateGroupMemberRequest; +pub mod update_group_request; +pub use self::update_group_request::UpdateGroupRequest; +pub mod update_group_role_request; +pub use self::update_group_role_request::UpdateGroupRoleRequest; pub mod update_invite_message_request; pub use self::update_invite_message_request::UpdateInviteMessageRequest; pub mod update_user_request; diff --git a/src/models/notification.rs b/src/models/notification.rs index 2892d61..bb6f209 100644 --- a/src/models/notification.rs +++ b/src/models/notification.rs @@ -14,7 +14,7 @@ pub struct Notification { #[serde(rename = "created_at")] pub created_at: String, - /// **NOTICE:** This is not a JSON object, this is a json **encoded** object, meaning you have to json-de-encode to get the NotificationDetail object depending on the NotificationType. + /// **NOTICE:** This is not a JSON object when received from the REST API, but it is when received from the Websocket API. When received from the REST API, this is a json **encoded** object, meaning you have to json-de-encode to get the NotificationDetail object depending on the NotificationType. #[serde(rename = "details")] pub details: String, #[serde(rename = "id")] @@ -22,8 +22,12 @@ pub struct Notification { /// #[serde(rename = "message")] pub message: String, - #[serde(rename = "seen")] - pub seen: bool, + /// Not included in notification objects received from the Websocket API + #[serde(rename = "seen", skip_serializing_if = "Option::is_none")] + pub seen: Option, + /// 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 = "receiverUserId", skip_serializing_if = "Option::is_none")] + pub receiver_user_id: Option, /// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. #[serde(rename = "senderUserId")] pub sender_user_id: String, @@ -36,13 +40,14 @@ pub struct Notification { impl Notification { /// - pub fn new(created_at: String, details: String, id: String, message: String, seen: bool, sender_user_id: String, r#type: crate::models::NotificationType) -> Notification { + pub fn new(created_at: String, details: String, id: String, message: String, sender_user_id: String, r#type: crate::models::NotificationType) -> Notification { Notification { created_at, details, id, message, - seen, + seen: None, + receiver_user_id: None, sender_user_id, sender_username: None, r#type, diff --git a/src/models/order_option.rs b/src/models/order_option.rs new file mode 100644 index 0000000..f8d8515 --- /dev/null +++ b/src/models/order_option.rs @@ -0,0 +1,37 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum OrderOption { + #[serde(rename = "ascending")] + Ascending, + #[serde(rename = "descending")] + Descending, + +} + +impl ToString for OrderOption { + fn to_string(&self) -> String { + match self { + Self::Ascending => String::from("ascending"), + Self::Descending => String::from("descending"), + } + } +} + +impl Default for OrderOption { + fn default() -> OrderOption { + Self::Ascending + } +} + + + + diff --git a/src/models/paginated_group_audit_log_entry_list.rs b/src/models/paginated_group_audit_log_entry_list.rs new file mode 100644 index 0000000..a6c58d8 --- /dev/null +++ b/src/models/paginated_group_audit_log_entry_list.rs @@ -0,0 +1,35 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct PaginatedGroupAuditLogEntryList { + /// + #[serde(rename = "results", skip_serializing_if = "Option::is_none")] + pub results: Option>, + /// The total number of results that the query would return if there were no pagination. + #[serde(rename = "totalCount", skip_serializing_if = "Option::is_none")] + pub total_count: Option, + /// Whether there are more results after this page. + #[serde(rename = "hasNext", skip_serializing_if = "Option::is_none")] + pub has_next: Option, +} + +impl PaginatedGroupAuditLogEntryList { + pub fn new() -> PaginatedGroupAuditLogEntryList { + PaginatedGroupAuditLogEntryList { + results: None, + total_count: None, + has_next: None, + } + } +} + + diff --git a/src/models/respond_group_join_request.rs b/src/models/respond_group_join_request.rs new file mode 100644 index 0000000..ef7f0f6 --- /dev/null +++ b/src/models/respond_group_join_request.rs @@ -0,0 +1,26 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct RespondGroupJoinRequest { + #[serde(rename = "action", skip_serializing_if = "Option::is_none")] + pub action: Option, +} + +impl RespondGroupJoinRequest { + pub fn new() -> RespondGroupJoinRequest { + RespondGroupJoinRequest { + action: None, + } + } +} + + diff --git a/src/models/sort_option.rs b/src/models/sort_option.rs new file mode 100644 index 0000000..eb735cd --- /dev/null +++ b/src/models/sort_option.rs @@ -0,0 +1,85 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SortOption { + #[serde(rename = "popularity")] + Popularity, + #[serde(rename = "heat")] + Heat, + #[serde(rename = "trust")] + Trust, + #[serde(rename = "shuffle")] + Shuffle, + #[serde(rename = "random")] + Random, + #[serde(rename = "favorites")] + Favorites, + #[serde(rename = "reportScore")] + ReportScore, + #[serde(rename = "reportCount")] + ReportCount, + #[serde(rename = "publicationDate")] + PublicationDate, + #[serde(rename = "labsPublicationDate")] + LabsPublicationDate, + #[serde(rename = "created")] + Created, + #[serde(rename = "_created_at")] + CreatedAt, + #[serde(rename = "updated")] + Updated, + #[serde(rename = "_updated_at")] + UpdatedAt, + #[serde(rename = "order")] + Order, + #[serde(rename = "relevance")] + Relevance, + #[serde(rename = "magic")] + Magic, + #[serde(rename = "name")] + Name, + +} + +impl ToString for SortOption { + fn to_string(&self) -> String { + match self { + Self::Popularity => String::from("popularity"), + Self::Heat => String::from("heat"), + Self::Trust => String::from("trust"), + Self::Shuffle => String::from("shuffle"), + Self::Random => String::from("random"), + Self::Favorites => String::from("favorites"), + Self::ReportScore => String::from("reportScore"), + Self::ReportCount => String::from("reportCount"), + Self::PublicationDate => String::from("publicationDate"), + Self::LabsPublicationDate => String::from("labsPublicationDate"), + Self::Created => String::from("created"), + Self::CreatedAt => String::from("_created_at"), + Self::Updated => String::from("updated"), + Self::UpdatedAt => String::from("_updated_at"), + Self::Order => String::from("order"), + Self::Relevance => String::from("relevance"), + Self::Magic => String::from("magic"), + Self::Name => String::from("name"), + } + } +} + +impl Default for SortOption { + fn default() -> SortOption { + Self::Popularity + } +} + + + + diff --git a/src/models/update_group_gallery_request.rs b/src/models/update_group_gallery_request.rs new file mode 100644 index 0000000..12d30c0 --- /dev/null +++ b/src/models/update_group_gallery_request.rs @@ -0,0 +1,51 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct UpdateGroupGalleryRequest { + /// Name of the gallery. + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + /// Description of the gallery. + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + /// Whether the gallery is members only. + #[serde(rename = "membersOnly", skip_serializing_if = "Option::is_none")] + pub members_only: Option, + /// + #[serde(rename = "roleIdsToView", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub role_ids_to_view: Option>>, + /// + #[serde(rename = "roleIdsToSubmit", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub role_ids_to_submit: Option>>, + /// + #[serde(rename = "roleIdsToAutoApprove", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub role_ids_to_auto_approve: Option>>, + /// + #[serde(rename = "roleIdsToManage", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub role_ids_to_manage: Option>>, +} + +impl UpdateGroupGalleryRequest { + pub fn new() -> UpdateGroupGalleryRequest { + UpdateGroupGalleryRequest { + name: None, + description: None, + members_only: None, + role_ids_to_view: None, + role_ids_to_submit: None, + role_ids_to_auto_approve: None, + role_ids_to_manage: None, + } + } +} + + diff --git a/src/models/update_group_member_request.rs b/src/models/update_group_member_request.rs new file mode 100644 index 0000000..8db1d68 --- /dev/null +++ b/src/models/update_group_member_request.rs @@ -0,0 +1,32 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct UpdateGroupMemberRequest { + #[serde(rename = "visibility", skip_serializing_if = "Option::is_none")] + pub visibility: Option, + #[serde(rename = "isSubscribedToAnnouncements", skip_serializing_if = "Option::is_none")] + pub is_subscribed_to_announcements: Option, + #[serde(rename = "managerNotes", skip_serializing_if = "Option::is_none")] + pub manager_notes: Option, +} + +impl UpdateGroupMemberRequest { + pub fn new() -> UpdateGroupMemberRequest { + UpdateGroupMemberRequest { + visibility: None, + is_subscribed_to_announcements: None, + manager_notes: None, + } + } +} + + diff --git a/src/models/update_group_request.rs b/src/models/update_group_request.rs new file mode 100644 index 0000000..67c2f58 --- /dev/null +++ b/src/models/update_group_request.rs @@ -0,0 +1,55 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct UpdateGroupRequest { + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "shortCode", skip_serializing_if = "Option::is_none")] + pub short_code: Option, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "joinState", skip_serializing_if = "Option::is_none")] + pub join_state: Option, + #[serde(rename = "iconId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub icon_id: Option>, + #[serde(rename = "bannerId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub banner_id: Option>, + /// 3 letter language code + #[serde(rename = "languages", skip_serializing_if = "Option::is_none")] + pub languages: Option>, + #[serde(rename = "links", skip_serializing_if = "Option::is_none")] + pub links: Option>, + #[serde(rename = "rules", skip_serializing_if = "Option::is_none")] + pub rules: Option, + /// + #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] + pub tags: Option>, +} + +impl UpdateGroupRequest { + pub fn new() -> UpdateGroupRequest { + UpdateGroupRequest { + name: None, + short_code: None, + description: None, + join_state: None, + icon_id: None, + banner_id: None, + languages: None, + links: None, + rules: None, + tags: None, + } + } +} + + diff --git a/src/models/update_group_role_request.rs b/src/models/update_group_role_request.rs new file mode 100644 index 0000000..8b6206a --- /dev/null +++ b/src/models/update_group_role_request.rs @@ -0,0 +1,38 @@ +/* + * VRChat API Documentation + * + * + * Contact: me@ariesclark.com + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct UpdateGroupRoleRequest { + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "isSelfAssignable", skip_serializing_if = "Option::is_none")] + pub is_self_assignable: Option, + #[serde(rename = "permissions", skip_serializing_if = "Option::is_none")] + pub permissions: Option>, + #[serde(rename = "order", skip_serializing_if = "Option::is_none")] + pub order: Option, +} + +impl UpdateGroupRoleRequest { + pub fn new() -> UpdateGroupRoleRequest { + UpdateGroupRoleRequest { + name: None, + description: None, + is_self_assignable: None, + permissions: None, + order: None, + } + } +} + +