mirror of
https://github.com/mii443/vrchatapi-rust.git
synced 2025-08-22 23:55:33 +00:00
Upgrade Rust SDK to spec 1.17.1
This commit is contained in:
@ -35,6 +35,7 @@ pub enum AddGroupMemberRoleError {
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum BanGroupMemberError {
|
||||
Status400(crate::models::Error),
|
||||
Status401(crate::models::Error),
|
||||
Status404(crate::models::Error),
|
||||
UnknownValue(serde_json::Value),
|
||||
@ -195,6 +196,15 @@ pub enum GetGroupGalleryImagesError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method [`get_group_instances`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetGroupInstancesError {
|
||||
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)]
|
||||
@ -950,6 +960,34 @@ pub fn get_group_gallery_images(configuration: &configuration::Configuration, gr
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns a list of group instances
|
||||
pub fn get_group_instances(configuration: &configuration::Configuration, group_id: &str) -> Result<Vec<crate::models::GroupInstance>, Error<GetGroupInstancesError>> {
|
||||
let local_var_configuration = configuration;
|
||||
|
||||
let local_var_client = &local_var_configuration.client;
|
||||
|
||||
let local_var_uri_str = format!("{}/groups/{groupId}/instances", 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<GetGroupInstancesError> = 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, n: Option<i32>, offset: Option<i32>) -> Result<Vec<crate::models::GroupMember>, Error<GetGroupInvitesError>> {
|
||||
let local_var_configuration = configuration;
|
||||
|
Reference in New Issue
Block a user