mirror of
https://github.com/mii443/vrchatapi-rust.git
synced 2025-08-22 15:45:35 +00:00
Upgrade Rust SDK to spec 1.16.0
This commit is contained in:
@ -80,6 +80,7 @@ docs/License.md
|
||||
docs/LicenseAction.md
|
||||
docs/LicenseGroup.md
|
||||
docs/LicenseType.md
|
||||
docs/LimitedGroup.md
|
||||
docs/LimitedUnityPackage.md
|
||||
docs/LimitedUser.md
|
||||
docs/LimitedWorld.md
|
||||
@ -227,6 +228,7 @@ src/models/license.rs
|
||||
src/models/license_action.rs
|
||||
src/models/license_group.rs
|
||||
src/models/license_type.rs
|
||||
src/models/limited_group.rs
|
||||
src/models/limited_unity_package.rs
|
||||
src/models/limited_user.rs
|
||||
src/models/limited_world.rs
|
||||
|
@ -35,6 +35,7 @@ Method | HTTP request | Description
|
||||
[**leave_group**](GroupsApi.md#leave_group) | **POST** /groups/{groupId}/leave | Leave Group
|
||||
[**remove_group_member_role**](GroupsApi.md#remove_group_member_role) | **DELETE** /groups/{groupId}/members/{userId}/roles/{groupRoleId} | Remove Role from GroupMember
|
||||
[**respond_group_join_request**](GroupsApi.md#respond_group_join_request) | **PUT** /groups/{groupId}/requests/{userId} | Respond Group Join request
|
||||
[**search_groups**](GroupsApi.md#search_groups) | **GET** /groups | Search Group
|
||||
[**unban_group_member**](GroupsApi.md#unban_group_member) | **DELETE** /groups/{groupId}/bans/{userId} | Unban Group Member
|
||||
[**update_group**](GroupsApi.md#update_group) | **PUT** /groups/{groupId} | Update Group
|
||||
[**update_group_gallery**](GroupsApi.md#update_group_gallery) | **PUT** /groups/{groupId}/galleries/{groupGalleryId} | Update Group Gallery
|
||||
@ -1006,6 +1007,38 @@ Name | Type | Description | Required | Notes
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
## search_groups
|
||||
|
||||
> Vec<crate::models::LimitedGroup> search_groups(query, offset, n)
|
||||
Search Group
|
||||
|
||||
Searches Groups by name or shortCode
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Required | Notes
|
||||
------------- | ------------- | ------------- | ------------- | -------------
|
||||
**query** | Option<**String**> | Query to search for, can be either Group Name or Group shortCode | |
|
||||
**offset** | Option<**i32**> | A zero-based offset from the default object sorting from where search results start. | |
|
||||
**n** | Option<**i32**> | The number of objects to return. | |[default to 60]
|
||||
|
||||
### Return type
|
||||
|
||||
[**Vec<crate::models::LimitedGroup>**](LimitedGroup.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
## unban_group_member
|
||||
|
||||
> crate::models::GroupMember unban_group_member(group_id, user_id)
|
||||
|
27
docs/LimitedGroup.md
Normal file
27
docs/LimitedGroup.md
Normal file
@ -0,0 +1,27 @@
|
||||
# LimitedGroup
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | Option<**String**> | | [optional]
|
||||
**name** | Option<**String**> | | [optional]
|
||||
**short_code** | Option<**String**> | | [optional]
|
||||
**discriminator** | Option<**String**> | | [optional]
|
||||
**description** | Option<**String**> | | [optional]
|
||||
**icon_url** | Option<**String**> | | [optional]
|
||||
**banner_url** | Option<**String**> | | [optional]
|
||||
**owner_id** | Option<**String**> | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. | [optional]
|
||||
**rules** | Option<**String**> | | [optional]
|
||||
**icon_id** | Option<**String**> | | [optional]
|
||||
**banner_id** | Option<**String**> | | [optional]
|
||||
**member_count** | Option<**i32**> | | [optional]
|
||||
**tags** | Option<**Vec<String>**> | | [optional]
|
||||
**created_at** | Option<**String**> | | [optional]
|
||||
**membership_status** | Option<[**crate::models::GroupMemberStatus**](GroupMemberStatus.md)> | | [optional]
|
||||
**is_searchable** | Option<**bool**> | | [optional]
|
||||
**galleries** | Option<[**Vec<crate::models::GroupGallery>**](GroupGallery.md)> | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -298,6 +298,14 @@ pub enum RespondGroupJoinRequestError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method [`search_groups`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum SearchGroupsError {
|
||||
Status401(crate::models::Error),
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method [`unban_group_member`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
@ -1255,6 +1263,43 @@ pub fn respond_group_join_request(configuration: &configuration::Configuration,
|
||||
}
|
||||
}
|
||||
|
||||
/// Searches Groups by name or shortCode
|
||||
pub fn search_groups(configuration: &configuration::Configuration, query: Option<&str>, offset: Option<i32>, n: Option<i32>) -> Result<Vec<crate::models::LimitedGroup>, Error<SearchGroupsError>> {
|
||||
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::GET, local_var_uri_str.as_str());
|
||||
|
||||
if let Some(ref local_var_str) = query {
|
||||
local_var_req_builder = local_var_req_builder.query(&[("query", &local_var_str.to_string())]);
|
||||
}
|
||||
if let Some(ref local_var_str) = offset {
|
||||
local_var_req_builder = local_var_req_builder.query(&[("offset", &local_var_str.to_string())]);
|
||||
}
|
||||
if let Some(ref local_var_str) = n {
|
||||
local_var_req_builder = local_var_req_builder.query(&[("n", &local_var_str.to_string())]);
|
||||
}
|
||||
if let Some(ref local_var_user_agent) = 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<SearchGroupsError> = 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<crate::models::GroupMember, Error<UnbanGroupMemberError>> {
|
||||
let local_var_configuration = configuration;
|
||||
|
77
src/models/limited_group.rs
Normal file
77
src/models/limited_group.rs
Normal file
@ -0,0 +1,77 @@
|
||||
/*
|
||||
* VRChat API Documentation
|
||||
*
|
||||
*
|
||||
* Contact: vrchatapi.lpv0t@aries.fyi
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct LimitedGroup {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<String>,
|
||||
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
|
||||
pub name: Option<String>,
|
||||
#[serde(rename = "shortCode", skip_serializing_if = "Option::is_none")]
|
||||
pub short_code: Option<String>,
|
||||
#[serde(rename = "discriminator", skip_serializing_if = "Option::is_none")]
|
||||
pub discriminator: Option<String>,
|
||||
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
|
||||
pub description: Option<String>,
|
||||
#[serde(rename = "iconUrl", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub icon_url: Option<Option<String>>,
|
||||
#[serde(rename = "bannerUrl", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub banner_url: Option<Option<String>>,
|
||||
/// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.
|
||||
#[serde(rename = "ownerId", skip_serializing_if = "Option::is_none")]
|
||||
pub owner_id: Option<String>,
|
||||
#[serde(rename = "rules", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub rules: Option<Option<String>>,
|
||||
#[serde(rename = "iconId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub icon_id: Option<Option<String>>,
|
||||
#[serde(rename = "bannerId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub banner_id: Option<Option<String>>,
|
||||
#[serde(rename = "memberCount", skip_serializing_if = "Option::is_none")]
|
||||
pub member_count: Option<i32>,
|
||||
///
|
||||
#[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
|
||||
pub tags: Option<Vec<String>>,
|
||||
#[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
|
||||
pub created_at: Option<String>,
|
||||
#[serde(rename = "membershipStatus", skip_serializing_if = "Option::is_none")]
|
||||
pub membership_status: Option<crate::models::GroupMemberStatus>,
|
||||
#[serde(rename = "isSearchable", skip_serializing_if = "Option::is_none")]
|
||||
pub is_searchable: Option<bool>,
|
||||
///
|
||||
#[serde(rename = "galleries", skip_serializing_if = "Option::is_none")]
|
||||
pub galleries: Option<Vec<crate::models::GroupGallery>>,
|
||||
}
|
||||
|
||||
impl LimitedGroup {
|
||||
pub fn new() -> LimitedGroup {
|
||||
LimitedGroup {
|
||||
id: None,
|
||||
name: None,
|
||||
short_code: None,
|
||||
discriminator: None,
|
||||
description: None,
|
||||
icon_url: None,
|
||||
banner_url: None,
|
||||
owner_id: None,
|
||||
rules: None,
|
||||
icon_id: None,
|
||||
banner_id: None,
|
||||
member_count: None,
|
||||
tags: None,
|
||||
created_at: None,
|
||||
membership_status: None,
|
||||
is_searchable: None,
|
||||
galleries: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -140,6 +140,8 @@ pub mod license_group;
|
||||
pub use self::license_group::LicenseGroup;
|
||||
pub mod license_type;
|
||||
pub use self::license_type::LicenseType;
|
||||
pub mod limited_group;
|
||||
pub use self::limited_group::LimitedGroup;
|
||||
pub mod limited_unity_package;
|
||||
pub use self::limited_unity_package::LimitedUnityPackage;
|
||||
pub mod limited_user;
|
||||
|
Reference in New Issue
Block a user