Upgrade Rust SDK to spec 1.7.4

This commit is contained in:
VRCCat
2022-09-08 22:36:49 +00:00
parent 2f9ff05bfe
commit ae61282074
12 changed files with 52 additions and 47 deletions

View File

@ -41,12 +41,12 @@ docs/InfoPushDataArticleContent.md
docs/InfoPushDataClickable.md docs/InfoPushDataClickable.md
docs/Instance.md docs/Instance.md
docs/InstancePlatforms.md docs/InstancePlatforms.md
docs/InstanceShortNameResponse.md
docs/InstanceType.md docs/InstanceType.md
docs/InstancesApi.md docs/InstancesApi.md
docs/InviteApi.md docs/InviteApi.md
docs/InviteMessage.md docs/InviteMessage.md
docs/InviteMessageType.md docs/InviteMessageType.md
docs/InviteMyselfToRequest.md
docs/InviteRequest.md docs/InviteRequest.md
docs/InviteResponse.md docs/InviteResponse.md
docs/License.md docs/License.md
@ -154,10 +154,10 @@ src/models/info_push_data_article_content.rs
src/models/info_push_data_clickable.rs src/models/info_push_data_clickable.rs
src/models/instance.rs src/models/instance.rs
src/models/instance_platforms.rs src/models/instance_platforms.rs
src/models/instance_short_name_response.rs
src/models/instance_type.rs src/models/instance_type.rs
src/models/invite_message.rs src/models/invite_message.rs
src/models/invite_message_type.rs src/models/invite_message_type.rs
src/models/invite_myself_to_request.rs
src/models/invite_request.rs src/models/invite_request.rs
src/models/invite_response.rs src/models/invite_response.rs
src/models/license.rs src/models/license.rs

View File

@ -1,6 +1,6 @@
[package] [package]
name = "vrchatapi" name = "vrchatapi"
version = "1.7.3" version = "1.7.4"
authors = ["OpenAPI Generator team and contributors"] authors = ["OpenAPI Generator team and contributors"]
license = "MIT" license = "MIT"
edition = "2018" edition = "2018"

View File

@ -19,7 +19,8 @@ Name | Type | Description | Notes
**photon_region** | [**crate::models::Region**](Region.md) | | **photon_region** | [**crate::models::Region**](Region.md) | |
**platforms** | [**crate::models::InstancePlatforms**](InstancePlatforms.md) | | **platforms** | [**crate::models::InstancePlatforms**](InstancePlatforms.md) | |
**region** | [**crate::models::Region**](Region.md) | | **region** | [**crate::models::Region**](Region.md) | |
**short_name** | **String** | | **secure_name** | **String** | |
**short_name** | Option<**String**> | | [optional]
**tags** | **Vec<String>** | The tags array on Instances usually contain the language tags of the people in the instance. | **tags** | **Vec<String>** | The tags array on Instances usually contain the language tags of the people in the instance. |
**_type** | [**crate::models::InstanceType**](InstanceType.md) | | **_type** | [**crate::models::InstanceType**](InstanceType.md) | |
**world_id** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | **world_id** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. |

View File

@ -1,10 +1,11 @@
# InviteMyselfToRequest # InstanceShortNameResponse
## Properties ## Properties
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**short_name** | **String** | Short Name of the Instance; can be retrieved from the Get Instance Short Name endpoint. | **secure_name** | **String** | |
**short_name** | Option<**String**> | | [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) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -74,7 +74,7 @@ Name | Type | Description | Required | Notes
## get_short_name ## get_short_name
> String get_short_name(world_id, instance_id) > crate::models::InstanceShortNameResponse get_short_name(world_id, instance_id)
Get Instance Short Name Get Instance Short Name
Returns an instance short name. Returns an instance short name.
@ -89,7 +89,7 @@ Name | Type | Description | Required | Notes
### Return type ### Return type
**String** [**crate::models::InstanceShortNameResponse**](InstanceShortNameResponse.md)
### Authorization ### Authorization

View File

@ -80,7 +80,7 @@ Name | Type | Description | Required | Notes
## invite_myself_to ## invite_myself_to
> crate::models::SentNotification invite_myself_to(world_id, instance_id, invite_myself_to_request) > crate::models::SentNotification invite_myself_to(world_id, instance_id)
Invite Myself To Instance Invite Myself To Instance
Sends self an invite to an instance Sends self an invite to an instance
@ -92,7 +92,6 @@ Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | ------------- | -------------
**world_id** | **String** | | [required] | **world_id** | **String** | | [required] |
**instance_id** | **String** | | [required] | **instance_id** | **String** | | [required] |
**invite_myself_to_request** | Option<[**InviteMyselfToRequest**](InviteMyselfToRequest.md)> | | |
### Return type ### Return type
@ -104,7 +103,7 @@ Name | Type | Description | Required | Notes
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/json - **Content-Type**: Not defined
- **Accept**: application/json - **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) [[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)

View File

@ -104,7 +104,7 @@ pub fn get_instance_by_short_name(configuration: &configuration::Configuration,
} }
/// Returns an instance short name. /// Returns an instance short name.
pub fn get_short_name(configuration: &configuration::Configuration, world_id: &str, instance_id: &str) -> Result<String, Error<GetShortNameError>> { pub fn get_short_name(configuration: &configuration::Configuration, world_id: &str, instance_id: &str) -> Result<crate::models::InstanceShortNameResponse, Error<GetShortNameError>> {
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;

View File

@ -144,7 +144,7 @@ pub fn get_invite_messages(configuration: &configuration::Configuration, user_id
} }
/// Sends self an invite to an instance /// Sends self an invite to an instance
pub fn invite_myself_to(configuration: &configuration::Configuration, world_id: &str, instance_id: &str, invite_myself_to_request: Option<crate::models::InviteMyselfToRequest>) -> Result<crate::models::SentNotification, Error<InviteMyselfToError>> { pub fn invite_myself_to(configuration: &configuration::Configuration, world_id: &str, instance_id: &str) -> Result<crate::models::SentNotification, Error<InviteMyselfToError>> {
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;
@ -155,7 +155,6 @@ pub fn invite_myself_to(configuration: &configuration::Configuration, world_id:
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());
} }
local_var_req_builder = local_var_req_builder.json(&invite_myself_to_request);
let local_var_req = local_var_req_builder.build()?; let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?; let mut local_var_resp = local_var_client.execute(local_var_req)?;

View File

@ -46,8 +46,10 @@ pub struct Instance {
pub platforms: Box<crate::models::InstancePlatforms>, pub platforms: Box<crate::models::InstancePlatforms>,
#[serde(rename = "region")] #[serde(rename = "region")]
pub region: crate::models::Region, pub region: crate::models::Region,
#[serde(rename = "shortName")] #[serde(rename = "secureName")]
pub short_name: String, pub secure_name: String,
#[serde(rename = "shortName", skip_serializing_if = "Option::is_none")]
pub short_name: Option<String>,
/// The tags array on Instances usually contain the language tags of the people in the instance. /// The tags array on Instances usually contain the language tags of the people in the instance.
#[serde(rename = "tags")] #[serde(rename = "tags")]
pub tags: Vec<String>, pub tags: Vec<String>,
@ -69,7 +71,7 @@ pub struct Instance {
impl Instance { impl Instance {
/// * `hidden` field is only present if InstanceType is `hidden` aka \"Friends+\", and is instance creator. * `friends` field is only present if InstanceType is `friends` aka \"Friends\", and is instance creator. * `private` field is only present if InstanceType is `private` aka \"Invite\" or \"Invite+\", and is instance creator. /// * `hidden` field is only present if InstanceType is `hidden` aka \"Friends+\", and is instance creator. * `friends` field is only present if InstanceType is `friends` aka \"Friends\", and is instance creator. * `private` field is only present if InstanceType is `private` aka \"Invite\" or \"Invite+\", and is instance creator.
pub fn new(active: bool, can_request_invite: bool, capacity: i32, client_number: String, full: bool, id: String, instance_id: String, location: String, n_users: i32, name: String, permanent: bool, photon_region: crate::models::Region, platforms: crate::models::InstancePlatforms, region: crate::models::Region, short_name: String, tags: Vec<String>, _type: crate::models::InstanceType, world_id: String) -> Instance { pub fn new(active: bool, can_request_invite: bool, capacity: i32, client_number: String, full: bool, id: String, instance_id: String, location: String, n_users: i32, name: String, permanent: bool, photon_region: crate::models::Region, platforms: crate::models::InstancePlatforms, region: crate::models::Region, secure_name: String, tags: Vec<String>, _type: crate::models::InstanceType, world_id: String) -> Instance {
Instance { Instance {
active, active,
can_request_invite, can_request_invite,
@ -86,7 +88,8 @@ impl Instance {
photon_region, photon_region,
platforms: Box::new(platforms), platforms: Box::new(platforms),
region, region,
short_name, secure_name,
short_name: None,
tags, tags,
_type, _type,
world_id, world_id,

View File

@ -0,0 +1,29 @@
/*
* VRChat API Documentation
*
*
* Contact: me@ariesclark.com
* Generated by: https://openapi-generator.tech
*/
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InstanceShortNameResponse {
#[serde(rename = "secureName")]
pub secure_name: String,
#[serde(rename = "shortName", skip_serializing_if = "Option::is_none")]
pub short_name: Option<String>,
}
impl InstanceShortNameResponse {
pub fn new(secure_name: String) -> InstanceShortNameResponse {
InstanceShortNameResponse {
secure_name,
short_name: None,
}
}
}

View File

@ -1,27 +0,0 @@
/*
* VRChat API Documentation
*
*
* Contact: me@ariesclark.com
* Generated by: https://openapi-generator.tech
*/
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InviteMyselfToRequest {
/// Short Name of the Instance; can be retrieved from the Get Instance Short Name endpoint.
#[serde(rename = "shortName")]
pub short_name: String,
}
impl InviteMyselfToRequest {
pub fn new(short_name: String) -> InviteMyselfToRequest {
InviteMyselfToRequest {
short_name,
}
}
}

View File

@ -68,14 +68,14 @@ pub mod instance;
pub use self::instance::Instance; pub use self::instance::Instance;
pub mod instance_platforms; pub mod instance_platforms;
pub use self::instance_platforms::InstancePlatforms; pub use self::instance_platforms::InstancePlatforms;
pub mod instance_short_name_response;
pub use self::instance_short_name_response::InstanceShortNameResponse;
pub mod instance_type; pub mod instance_type;
pub use self::instance_type::InstanceType; pub use self::instance_type::InstanceType;
pub mod invite_message; pub mod invite_message;
pub use self::invite_message::InviteMessage; pub use self::invite_message::InviteMessage;
pub mod invite_message_type; pub mod invite_message_type;
pub use self::invite_message_type::InviteMessageType; pub use self::invite_message_type::InviteMessageType;
pub mod invite_myself_to_request;
pub use self::invite_myself_to_request::InviteMyselfToRequest;
pub mod invite_request; pub mod invite_request;
pub use self::invite_request::InviteRequest; pub use self::invite_request::InviteRequest;
pub mod invite_response; pub mod invite_response;