mirror of
https://github.com/mii443/vrchatapi-rust.git
synced 2025-08-22 23:55:33 +00:00
Upgrade Rust SDK to spec 1.3.0
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
* VRChat API Documentation
|
||||
*
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.2
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: me@ruby.js.org
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
@ -30,14 +30,6 @@ pub enum GetUserByNameError {
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `search_active_users`
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum SearchActiveUsersError {
|
||||
Status403(crate::models::InlineResponse403),
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method `search_users`
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
@ -109,43 +101,6 @@ pub fn get_user_by_name(configuration: &configuration::Configuration, username:
|
||||
}
|
||||
}
|
||||
|
||||
/// Search and list any Active users by text query. **Has been locked down and now always respond with \"Invalid Admin Credentials\".**
|
||||
pub fn search_active_users(configuration: &configuration::Configuration, search: &str, developer_type: Option<&str>, offset: Option<i32>, n: Option<i32>) -> Result<Vec<crate::models::LimitedUser>, Error<SearchActiveUsersError>> {
|
||||
|
||||
let local_var_client = &configuration.client;
|
||||
|
||||
let local_var_uri_str = format!("{}/users/active", configuration.base_path);
|
||||
let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
|
||||
|
||||
local_var_req_builder = local_var_req_builder.query(&[("search", &search.to_string())]);
|
||||
if let Some(ref local_var_str) = developer_type {
|
||||
local_var_req_builder = local_var_req_builder.query(&[("developerType", &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) = 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<SearchActiveUsersError> = 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<i32>, offset: Option<i32>) -> Result<Vec<crate::models::LimitedUser>, Error<SearchUsersError>> {
|
||||
|
||||
|
Reference in New Issue
Block a user