Upgrade Rust SDK to spec 1.6.6

This commit is contained in:
VRCCat
2022-01-16 19:00:26 +00:00
parent 3e29cfb6d5
commit 74d4992771
9 changed files with 52 additions and 5 deletions

View File

@ -69,6 +69,7 @@ docs/PlayermoderationApi.md
docs/PublicAnnouncement.md
docs/Region.md
docs/ReleaseStatus.md
docs/RequestInviteRequest.md
docs/Response.md
docs/Subscription.md
docs/SubscriptionPeriod.md
@ -175,6 +176,7 @@ src/models/player_moderation_type.rs
src/models/public_announcement.rs
src/models/region.rs
src/models/release_status.rs
src/models/request_invite_request.rs
src/models/response.rs
src/models/subscription.rs
src/models/subscription_period.rs

View File

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

View File

@ -110,7 +110,7 @@ Name | Type | Description | Required | Notes
## request_invite
> crate::models::Notification request_invite(user_id)
> crate::models::Notification request_invite(user_id, request_invite_request)
Request Invite
Requests an invite from a user. Returns the Notification of type `requestInvite` that was sent.
@ -121,6 +121,7 @@ Requests an invite from a user. Returns the Notification of type `requestInvite`
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**user_id** | **String** | | [required] |
**request_invite_request** | Option<[**RequestInviteRequest**](RequestInviteRequest.md)> | Slot number of the Request Message to use when request an invite. | |
### Return type
@ -132,7 +133,7 @@ Name | Type | Description | Required | Notes
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: 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)
@ -183,7 +184,7 @@ Respond to an invite request by sending a world invite to the requesting user. `
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**notification_id** | **String** | | [required] |
**invite_response** | Option<[**InviteResponse**](InviteResponse.md)> | Instance ID when inviting a user. | |
**invite_response** | Option<[**InviteResponse**](InviteResponse.md)> | Slot number of the Response Message to use when responding to a user. | |
### Return type

View File

@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**instance_id** | **String** | InstanceID be \"offline\" on User profiles if you are not friends with that user. |
**message_slot** | Option<**i32**> | | [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)

View File

@ -0,0 +1,11 @@
# RequestInviteRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**message_slot** | Option<**i32**> | | [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)

View File

@ -164,7 +164,7 @@ pub fn invite_user(configuration: &configuration::Configuration, user_id: &str,
}
/// Requests an invite from a user. Returns the Notification of type `requestInvite` that was sent.
pub fn request_invite(configuration: &configuration::Configuration, user_id: &str) -> Result<crate::models::Notification, Error<RequestInviteError>> {
pub fn request_invite(configuration: &configuration::Configuration, user_id: &str, request_invite_request: Option<crate::models::RequestInviteRequest>) -> Result<crate::models::Notification, Error<RequestInviteError>> {
let local_var_configuration = configuration;
let local_var_client = &local_var_configuration.client;
@ -175,6 +175,7 @@ pub fn request_invite(configuration: &configuration::Configuration, user_id: &st
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.json(&request_invite_request);
let local_var_req = local_var_req_builder.build()?;
let mut local_var_resp = local_var_client.execute(local_var_req)?;

View File

@ -14,12 +14,15 @@ pub struct InviteRequest {
/// InstanceID be \"offline\" on User profiles if you are not friends with that user.
#[serde(rename = "instanceId")]
pub instance_id: String,
#[serde(rename = "messageSlot", skip_serializing_if = "Option::is_none")]
pub message_slot: Option<i32>,
}
impl InviteRequest {
pub fn new(instance_id: String) -> InviteRequest {
InviteRequest {
instance_id,
message_slot: None,
}
}
}

View File

@ -114,6 +114,8 @@ pub mod region;
pub use self::region::Region;
pub mod release_status;
pub use self::release_status::ReleaseStatus;
pub mod request_invite_request;
pub use self::request_invite_request::RequestInviteRequest;
pub mod response;
pub use self::response::Response;
pub mod subscription;

View File

@ -0,0 +1,26 @@
/*
* VRChat API Documentation
*
*
* Contact: me@ruby.js.org
* Generated by: https://openapi-generator.tech
*/
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct RequestInviteRequest {
#[serde(rename = "messageSlot", skip_serializing_if = "Option::is_none")]
pub message_slot: Option<i32>,
}
impl RequestInviteRequest {
pub fn new() -> RequestInviteRequest {
RequestInviteRequest {
message_slot: None,
}
}
}