mirror of
https://github.com/mii443/vrchatapi-rust.git
synced 2025-08-23 08:05:37 +00:00
Upgrade Rust SDK to spec 1.6.7
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "vrchatapi"
|
name = "vrchatapi"
|
||||||
version = "1.6.6"
|
version = "1.6.7"
|
||||||
authors = ["OpenAPI Generator team and contributors"]
|
authors = ["OpenAPI Generator team and contributors"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
@ -313,7 +313,7 @@ Name | Type | Description | Required | Notes
|
|||||||
**file_id** | **String** | | [required] |
|
**file_id** | **String** | | [required] |
|
||||||
**version_id** | **i32** | | [required] |
|
**version_id** | **i32** | | [required] |
|
||||||
**file_type** | **String** | | [required] |
|
**file_type** | **String** | | [required] |
|
||||||
**part_number** | **i32** | | [required] |
|
**part_number** | Option<**i32**> | | |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
|
@ -357,7 +357,7 @@ pub fn get_files(configuration: &configuration::Configuration, tag: Option<&str>
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Starts an upload of a specific FilePart. This endpoint will return an AWS URL which you can PUT data to. You need to call this and receive a new AWS API URL for each `partNumber`. Please see AWS's REST documentation on \"PUT Object to S3\" on how to upload. Once all parts has been uploaded, proceed to `/finish` endpoint. **Note:** `nextPartNumber` seems like it is always ignored. Despite it returning 0, first partNumber is always 1.
|
/// Starts an upload of a specific FilePart. This endpoint will return an AWS URL which you can PUT data to. You need to call this and receive a new AWS API URL for each `partNumber`. Please see AWS's REST documentation on \"PUT Object to S3\" on how to upload. Once all parts has been uploaded, proceed to `/finish` endpoint. **Note:** `nextPartNumber` seems like it is always ignored. Despite it returning 0, first partNumber is always 1.
|
||||||
pub fn start_file_data_upload(configuration: &configuration::Configuration, file_id: &str, version_id: i32, file_type: &str, part_number: i32) -> Result<crate::models::FileUploadUrl, Error<StartFileDataUploadError>> {
|
pub fn start_file_data_upload(configuration: &configuration::Configuration, file_id: &str, version_id: i32, file_type: &str, part_number: Option<i32>) -> Result<crate::models::FileUploadUrl, Error<StartFileDataUploadError>> {
|
||||||
let local_var_configuration = configuration;
|
let local_var_configuration = configuration;
|
||||||
|
|
||||||
let local_var_client = &local_var_configuration.client;
|
let local_var_client = &local_var_configuration.client;
|
||||||
@ -365,7 +365,9 @@ pub fn start_file_data_upload(configuration: &configuration::Configuration, file
|
|||||||
let local_var_uri_str = format!("{}/file/{fileId}/{versionId}/{fileType}/start", local_var_configuration.base_path, fileId=crate::apis::urlencode(file_id), versionId=version_id, fileType=crate::apis::urlencode(file_type));
|
let local_var_uri_str = format!("{}/file/{fileId}/{versionId}/{fileType}/start", local_var_configuration.base_path, fileId=crate::apis::urlencode(file_id), versionId=version_id, fileType=crate::apis::urlencode(file_type));
|
||||||
let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
|
let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
|
||||||
|
|
||||||
local_var_req_builder = local_var_req_builder.query(&[("partNumber", &part_number.to_string())]);
|
if let Some(ref local_var_str) = part_number {
|
||||||
|
local_var_req_builder = local_var_req_builder.query(&[("partNumber", &local_var_str.to_string())]);
|
||||||
|
}
|
||||||
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
|
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.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,8 @@ pub enum FileStatus {
|
|||||||
Complete,
|
Complete,
|
||||||
#[serde(rename = "none")]
|
#[serde(rename = "none")]
|
||||||
None,
|
None,
|
||||||
|
#[serde(rename = "queued")]
|
||||||
|
Queued,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -25,6 +27,7 @@ impl ToString for FileStatus {
|
|||||||
Self::Waiting => String::from("waiting"),
|
Self::Waiting => String::from("waiting"),
|
||||||
Self::Complete => String::from("complete"),
|
Self::Complete => String::from("complete"),
|
||||||
Self::None => String::from("none"),
|
Self::None => String::from("none"),
|
||||||
|
Self::Queued => String::from("queued"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user