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.6
This commit is contained in:
@ -100,6 +100,7 @@ docs/PlayerModerationType.md
|
|||||||
docs/PlayermoderationApi.md
|
docs/PlayermoderationApi.md
|
||||||
docs/Region.md
|
docs/Region.md
|
||||||
docs/ReleaseStatus.md
|
docs/ReleaseStatus.md
|
||||||
|
docs/RepresentedGroup.md
|
||||||
docs/RequestInviteRequest.md
|
docs/RequestInviteRequest.md
|
||||||
docs/RespondGroupJoinRequest.md
|
docs/RespondGroupJoinRequest.md
|
||||||
docs/Response.md
|
docs/Response.md
|
||||||
@ -247,6 +248,7 @@ src/models/player_moderation.rs
|
|||||||
src/models/player_moderation_type.rs
|
src/models/player_moderation_type.rs
|
||||||
src/models/region.rs
|
src/models/region.rs
|
||||||
src/models/release_status.rs
|
src/models/release_status.rs
|
||||||
|
src/models/represented_group.rs
|
||||||
src/models/request_invite_request.rs
|
src/models/request_invite_request.rs
|
||||||
src/models/respond_group_join_request.rs
|
src/models/respond_group_join_request.rs
|
||||||
src/models/response.rs
|
src/models/response.rs
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "vrchatapi"
|
name = "vrchatapi"
|
||||||
version = "1.16.5"
|
version = "1.16.6"
|
||||||
authors = ["vrchatapi.lpv0t@aries.fyi"]
|
authors = ["vrchatapi.lpv0t@aries.fyi"]
|
||||||
description = "VRChat API Client for Rust"
|
description = "VRChat API Client for Rust"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
@ -13,6 +13,7 @@ Name | Type | Description | Notes
|
|||||||
**release_status** | Option<[**crate::models::ReleaseStatus**](ReleaseStatus.md)> | | [optional]
|
**release_status** | Option<[**crate::models::ReleaseStatus**](ReleaseStatus.md)> | | [optional]
|
||||||
**version** | Option<**f32**> | | [optional][default to 1]
|
**version** | Option<**f32**> | | [optional][default to 1]
|
||||||
**unity_package_url** | Option<**String**> | | [optional]
|
**unity_package_url** | Option<**String**> | | [optional]
|
||||||
|
**unity_version** | Option<**String**> | | [optional][default to 5.3.4p1]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ Name | Type | Description | Notes
|
|||||||
**created_at** | Option<**String**> | | [optional]
|
**created_at** | Option<**String**> | | [optional]
|
||||||
**group_id** | 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_id** | Option<**String**> | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. | [optional]
|
||||||
**actor_displayname** | Option<**String**> | | [optional]
|
**actor_display_name** | Option<**String**> | | [optional]
|
||||||
**target_id** | Option<**String**> | Typically GroupID or GroupRoleID, but could be other types of IDs. | [optional]
|
**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]
|
**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]
|
**description** | Option<**String**> | A human-readable description of the event. | [optional]
|
||||||
|
24
docs/RepresentedGroup.md
Normal file
24
docs/RepresentedGroup.md
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# RepresentedGroup
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**name** | Option<**String**> | | [optional]
|
||||||
|
**short_code** | Option<**String**> | | [optional]
|
||||||
|
**discriminator** | Option<**String**> | | [optional]
|
||||||
|
**description** | Option<**String**> | | [optional]
|
||||||
|
**icon_id** | Option<**String**> | | [optional]
|
||||||
|
**icon_url** | Option<**String**> | | [optional]
|
||||||
|
**banner_id** | Option<**String**> | | [optional]
|
||||||
|
**banner_url** | Option<**String**> | | [optional]
|
||||||
|
**privacy** | Option<[**crate::models::GroupPrivacy**](GroupPrivacy.md)> | | [optional]
|
||||||
|
**owner_id** | Option<**String**> | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. | [optional]
|
||||||
|
**member_count** | Option<**i32**> | | [optional]
|
||||||
|
**group_id** | Option<**String**> | | [optional]
|
||||||
|
**member_visibility** | Option<[**crate::models::GroupUserVisibility**](GroupUserVisibility.md)> | | [optional]
|
||||||
|
**is_representing** | Option<**bool**> | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -13,6 +13,7 @@ Name | Type | Description | Notes
|
|||||||
**release_status** | Option<[**crate::models::ReleaseStatus**](ReleaseStatus.md)> | | [optional]
|
**release_status** | Option<[**crate::models::ReleaseStatus**](ReleaseStatus.md)> | | [optional]
|
||||||
**version** | Option<**f32**> | | [optional][default to 1]
|
**version** | Option<**f32**> | | [optional][default to 1]
|
||||||
**unity_package_url** | Option<**String**> | | [optional]
|
**unity_package_url** | Option<**String**> | | [optional]
|
||||||
|
**unity_version** | Option<**String**> | | [optional][default to 5.3.4p1]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ Method | HTTP request | Description
|
|||||||
[**get_user_by_name**](UsersApi.md#get_user_by_name) | **GET** /users/{username}/name | Get User by Username
|
[**get_user_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_group_requests**](UsersApi.md#get_user_group_requests) | **GET** /users/{userId}/groups/requested | Get User Group Requests
|
||||||
[**get_user_groups**](UsersApi.md#get_user_groups) | **GET** /users/{userId}/groups | Get User Groups
|
[**get_user_groups**](UsersApi.md#get_user_groups) | **GET** /users/{userId}/groups | Get User Groups
|
||||||
|
[**get_user_represented_group**](UsersApi.md#get_user_represented_group) | **GET** /users/{userId}/groups/represented | Get user's current represented group
|
||||||
[**search_users**](UsersApi.md#search_users) | **GET** /users | Search All Users
|
[**search_users**](UsersApi.md#search_users) | **GET** /users | Search All Users
|
||||||
[**update_user**](UsersApi.md#update_user) | **PUT** /users/{userId} | Update User Info
|
[**update_user**](UsersApi.md#update_user) | **PUT** /users/{userId} | Update User Info
|
||||||
|
|
||||||
@ -133,6 +134,36 @@ 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)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## get_user_represented_group
|
||||||
|
|
||||||
|
> crate::models::RepresentedGroup get_user_represented_group(user_id)
|
||||||
|
Get user's current represented group
|
||||||
|
|
||||||
|
Returns the current group that the user is currently representing
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**user_id** | **String** | Must be a valid user ID. | [required] |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**crate::models::RepresentedGroup**](representedGroup.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[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
|
## search_users
|
||||||
|
|
||||||
> Vec<crate::models::LimitedUser> search_users(search, developer_type, n, offset)
|
> Vec<crate::models::LimitedUser> search_users(search, developer_type, n, offset)
|
||||||
|
@ -45,6 +45,14 @@ pub enum GetUserGroupsError {
|
|||||||
UnknownValue(serde_json::Value),
|
UnknownValue(serde_json::Value),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method [`get_user_represented_group`]
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum GetUserRepresentedGroupError {
|
||||||
|
Status401(crate::models::Error),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
/// struct for typed errors of method [`search_users`]
|
/// struct for typed errors of method [`search_users`]
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
#[serde(untagged)]
|
#[serde(untagged)]
|
||||||
@ -175,6 +183,34 @@ pub fn get_user_groups(configuration: &configuration::Configuration, user_id: &s
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns the current group that the user is currently representing
|
||||||
|
pub fn get_user_represented_group(configuration: &configuration::Configuration, user_id: &str) -> Result<crate::models::RepresentedGroup, Error<GetUserRepresentedGroupError>> {
|
||||||
|
let local_var_configuration = configuration;
|
||||||
|
|
||||||
|
let local_var_client = &local_var_configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/users/{userId}/groups/represented", 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<GetUserRepresentedGroupError> = 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
|
/// Search and list any users by text query
|
||||||
pub fn search_users(configuration: &configuration::Configuration, search: Option<&str>, developer_type: Option<&str>, n: Option<i32>, offset: Option<i32>) -> Result<Vec<crate::models::LimitedUser>, Error<SearchUsersError>> {
|
pub fn search_users(configuration: &configuration::Configuration, search: Option<&str>, developer_type: Option<&str>, n: Option<i32>, offset: Option<i32>) -> Result<Vec<crate::models::LimitedUser>, Error<SearchUsersError>> {
|
||||||
let local_var_configuration = configuration;
|
let local_var_configuration = configuration;
|
||||||
|
@ -30,6 +30,8 @@ pub struct CreateAvatarRequest {
|
|||||||
pub version: Option<f32>,
|
pub version: Option<f32>,
|
||||||
#[serde(rename = "unityPackageUrl", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "unityPackageUrl", skip_serializing_if = "Option::is_none")]
|
||||||
pub unity_package_url: Option<String>,
|
pub unity_package_url: Option<String>,
|
||||||
|
#[serde(rename = "unityVersion", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub unity_version: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl CreateAvatarRequest {
|
impl CreateAvatarRequest {
|
||||||
@ -44,6 +46,7 @@ impl CreateAvatarRequest {
|
|||||||
release_status: None,
|
release_status: None,
|
||||||
version: None,
|
version: None,
|
||||||
unity_package_url: None,
|
unity_package_url: None,
|
||||||
|
unity_version: None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,8 +20,8 @@ pub struct GroupAuditLogEntry {
|
|||||||
/// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.
|
/// 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")]
|
#[serde(rename = "actorId", skip_serializing_if = "Option::is_none")]
|
||||||
pub actor_id: Option<String>,
|
pub actor_id: Option<String>,
|
||||||
#[serde(rename = "actorDisplayname", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "actorDisplayName", skip_serializing_if = "Option::is_none")]
|
||||||
pub actor_displayname: Option<String>,
|
pub actor_display_name: Option<String>,
|
||||||
/// Typically GroupID or GroupRoleID, but could be other types of IDs.
|
/// Typically GroupID or GroupRoleID, but could be other types of IDs.
|
||||||
#[serde(rename = "targetId", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "targetId", skip_serializing_if = "Option::is_none")]
|
||||||
pub target_id: Option<String>,
|
pub target_id: Option<String>,
|
||||||
@ -43,7 +43,7 @@ impl GroupAuditLogEntry {
|
|||||||
created_at: None,
|
created_at: None,
|
||||||
group_id: None,
|
group_id: None,
|
||||||
actor_id: None,
|
actor_id: None,
|
||||||
actor_displayname: None,
|
actor_display_name: None,
|
||||||
target_id: None,
|
target_id: None,
|
||||||
event_type: None,
|
event_type: None,
|
||||||
description: None,
|
description: None,
|
||||||
|
@ -174,6 +174,8 @@ pub mod region;
|
|||||||
pub use self::region::Region;
|
pub use self::region::Region;
|
||||||
pub mod release_status;
|
pub mod release_status;
|
||||||
pub use self::release_status::ReleaseStatus;
|
pub use self::release_status::ReleaseStatus;
|
||||||
|
pub mod represented_group;
|
||||||
|
pub use self::represented_group::RepresentedGroup;
|
||||||
pub mod request_invite_request;
|
pub mod request_invite_request;
|
||||||
pub use self::request_invite_request::RequestInviteRequest;
|
pub use self::request_invite_request::RequestInviteRequest;
|
||||||
pub mod respond_group_join_request;
|
pub mod respond_group_join_request;
|
||||||
|
66
src/models/represented_group.rs
Normal file
66
src/models/represented_group.rs
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Contact: vrchatapi.lpv0t@aries.fyi
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||||
|
pub struct RepresentedGroup {
|
||||||
|
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub name: Option<String>,
|
||||||
|
#[serde(rename = "shortCode", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub short_code: Option<String>,
|
||||||
|
#[serde(rename = "discriminator", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub discriminator: Option<String>,
|
||||||
|
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub description: Option<String>,
|
||||||
|
#[serde(rename = "iconId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub icon_id: Option<Option<String>>,
|
||||||
|
#[serde(rename = "iconUrl", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub icon_url: Option<Option<String>>,
|
||||||
|
#[serde(rename = "bannerId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub banner_id: Option<Option<String>>,
|
||||||
|
#[serde(rename = "bannerUrl", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub banner_url: Option<Option<String>>,
|
||||||
|
#[serde(rename = "privacy", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub privacy: Option<crate::models::GroupPrivacy>,
|
||||||
|
/// A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed.
|
||||||
|
#[serde(rename = "ownerId", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub owner_id: Option<String>,
|
||||||
|
#[serde(rename = "memberCount", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub member_count: Option<i32>,
|
||||||
|
#[serde(rename = "groupId", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub group_id: Option<String>,
|
||||||
|
#[serde(rename = "memberVisibility", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub member_visibility: Option<crate::models::GroupUserVisibility>,
|
||||||
|
#[serde(rename = "isRepresenting", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub is_representing: Option<bool>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl RepresentedGroup {
|
||||||
|
pub fn new() -> RepresentedGroup {
|
||||||
|
RepresentedGroup {
|
||||||
|
name: None,
|
||||||
|
short_code: None,
|
||||||
|
discriminator: None,
|
||||||
|
description: None,
|
||||||
|
icon_id: None,
|
||||||
|
icon_url: None,
|
||||||
|
banner_id: None,
|
||||||
|
banner_url: None,
|
||||||
|
privacy: None,
|
||||||
|
owner_id: None,
|
||||||
|
member_count: None,
|
||||||
|
group_id: None,
|
||||||
|
member_visibility: None,
|
||||||
|
is_representing: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -30,6 +30,8 @@ pub struct UpdateAvatarRequest {
|
|||||||
pub version: Option<f32>,
|
pub version: Option<f32>,
|
||||||
#[serde(rename = "unityPackageUrl", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "unityPackageUrl", skip_serializing_if = "Option::is_none")]
|
||||||
pub unity_package_url: Option<String>,
|
pub unity_package_url: Option<String>,
|
||||||
|
#[serde(rename = "unityVersion", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub unity_version: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl UpdateAvatarRequest {
|
impl UpdateAvatarRequest {
|
||||||
@ -44,6 +46,7 @@ impl UpdateAvatarRequest {
|
|||||||
release_status: None,
|
release_status: None,
|
||||||
version: None,
|
version: None,
|
||||||
unity_package_url: None,
|
unity_package_url: None,
|
||||||
|
unity_version: None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user