mirror of
https://github.com/mii443/vrchatapi-rust.git
synced 2025-08-22 15:45:35 +00:00
Upgrade Rust SDK to spec 1.5.0
This commit is contained in:
@ -33,10 +33,8 @@ docs/FilesApi.md
|
||||
docs/FinishFileDataUploadRequest.md
|
||||
docs/FriendStatus.md
|
||||
docs/FriendsApi.md
|
||||
docs/InlineResponse404.md
|
||||
docs/Instance.md
|
||||
docs/InstancePlatforms.md
|
||||
docs/InstancesApi.md
|
||||
docs/InviteApi.md
|
||||
docs/InviteMessage.md
|
||||
docs/InviteMessageType.md
|
||||
@ -65,7 +63,6 @@ docs/TwoFactorAuthCode.md
|
||||
docs/UnityPackage.md
|
||||
docs/UpdateAvatarRequest.md
|
||||
docs/UpdateFavoriteGroupRequest.md
|
||||
docs/UpdateInviteMessageRequest.md
|
||||
docs/UpdateUserRequest.md
|
||||
docs/UpdateWorldRequest.md
|
||||
docs/User.md
|
||||
@ -86,7 +83,6 @@ src/apis/configuration.rs
|
||||
src/apis/favorites_api.rs
|
||||
src/apis/files_api.rs
|
||||
src/apis/friends_api.rs
|
||||
src/apis/instances_api.rs
|
||||
src/apis/invite_api.rs
|
||||
src/apis/mod.rs
|
||||
src/apis/notifications_api.rs
|
||||
@ -124,7 +120,6 @@ src/models/file_version.rs
|
||||
src/models/file_version_upload_status.rs
|
||||
src/models/finish_file_data_upload_request.rs
|
||||
src/models/friend_status.rs
|
||||
src/models/inline_response_404.rs
|
||||
src/models/instance.rs
|
||||
src/models/instance_platforms.rs
|
||||
src/models/invite_message.rs
|
||||
@ -151,7 +146,6 @@ src/models/two_factor_auth_code.rs
|
||||
src/models/unity_package.rs
|
||||
src/models/update_avatar_request.rs
|
||||
src/models/update_favorite_group_request.rs
|
||||
src/models/update_invite_message_request.rs
|
||||
src/models/update_user_request.rs
|
||||
src/models/update_world_request.rs
|
||||
src/models/user.rs
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "vrchatapi"
|
||||
version = "1.5.1"
|
||||
version = "1.5.0"
|
||||
authors = ["OpenAPI Generator team and contributors"]
|
||||
license = "MIT"
|
||||
edition = "2018"
|
||||
|
@ -1,11 +0,0 @@
|
||||
# InlineResponse404
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**error** | [**crate::models::Error**](Error.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)
|
||||
|
||||
|
@ -1,104 +0,0 @@
|
||||
# \InstancesApi
|
||||
|
||||
All URIs are relative to *https://api.vrchat.cloud/api/1*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**get_instance**](InstancesApi.md#get_instance) | **GET** /instances/{worldId}:{instanceId} | Get Instance
|
||||
[**get_short_name**](InstancesApi.md#get_short_name) | **GET** /instances/{worldId}:{instanceId}/shortName | Get Instance Short Name
|
||||
[**send_self_invite**](InstancesApi.md#send_self_invite) | **POST** /instances/{worldId}:{instanceId}/invite | Send Self Invite
|
||||
|
||||
|
||||
|
||||
## get_instance
|
||||
|
||||
> crate::models::Instance get_instance(world_id, instance_id)
|
||||
Get Instance
|
||||
|
||||
Returns an instance.
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Required | Notes
|
||||
------------- | ------------- | ------------- | ------------- | -------------
|
||||
**world_id** | **String** | | [required] |
|
||||
**instance_id** | **String** | | [required] |
|
||||
|
||||
### Return type
|
||||
|
||||
[**crate::models::Instance**](Instance.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **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)
|
||||
|
||||
|
||||
## get_short_name
|
||||
|
||||
> String get_short_name(world_id, instance_id)
|
||||
Get Instance Short Name
|
||||
|
||||
Returns an instance short name.
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Required | Notes
|
||||
------------- | ------------- | ------------- | ------------- | -------------
|
||||
**world_id** | **String** | | [required] |
|
||||
**instance_id** | **String** | | [required] |
|
||||
|
||||
### Return type
|
||||
|
||||
**String**
|
||||
|
||||
### Authorization
|
||||
|
||||
[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: text/plain, 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)
|
||||
|
||||
|
||||
## send_self_invite
|
||||
|
||||
> crate::models::Success send_self_invite(world_id, instance_id)
|
||||
Send Self Invite
|
||||
|
||||
Sends an invite to the instance to yourself.
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Required | Notes
|
||||
------------- | ------------- | ------------- | ------------- | -------------
|
||||
**world_id** | **String** | | [required] |
|
||||
**instance_id** | **String** | | [required] |
|
||||
|
||||
### Return type
|
||||
|
||||
[**crate::models::Success**](Success.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **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)
|
||||
|
@ -4,20 +4,20 @@ All URIs are relative to *https://api.vrchat.cloud/api/1*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**get_invite_message**](InviteApi.md#get_invite_message) | **GET** /message/{userId}/{messageType}/{slot} | Get Invite Message
|
||||
[**get_invite_message**](InviteApi.md#get_invite_message) | **GET** /message/{userId}/{messageType}/{messageId} | Get Invite Messages
|
||||
[**get_invite_messages**](InviteApi.md#get_invite_messages) | **GET** /message/{userId}/{messageType} | List Invite Messages
|
||||
[**invite_user**](InviteApi.md#invite_user) | **POST** /invite/{userId} | Invite User
|
||||
[**request_invite**](InviteApi.md#request_invite) | **POST** /requestInvite/{userId} | Request Invite
|
||||
[**reset_invite_message**](InviteApi.md#reset_invite_message) | **DELETE** /message/{userId}/{messageType}/{slot} | Reset Invite Message
|
||||
[**reset_invite_message**](InviteApi.md#reset_invite_message) | **DELETE** /message/{userId}/{messageType}/{messageId} | Reset Invite Message
|
||||
[**respond_invite**](InviteApi.md#respond_invite) | **POST** /invite/{notificationId}/response | Respond Invite
|
||||
[**update_invite_message**](InviteApi.md#update_invite_message) | **PUT** /message/{userId}/{messageType}/{slot} | Update Invite Message
|
||||
[**update_invite_message**](InviteApi.md#update_invite_message) | **PUT** /message/{userId}/{messageType}/{messageId} | Update Invite Message
|
||||
|
||||
|
||||
|
||||
## get_invite_message
|
||||
|
||||
> crate::models::InviteMessage get_invite_message(user_id, message_type, slot)
|
||||
Get Invite Message
|
||||
> crate::models::InviteMessage get_invite_message(user_id, message_type, message_id)
|
||||
Get Invite Messages
|
||||
|
||||
Returns a single Invite Message. This returns the exact same information but less than `getInviteMessages`. Admin Credentials are required to view messages of other users! Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite
|
||||
|
||||
@ -28,7 +28,7 @@ Name | Type | Description | Required | Notes
|
||||
------------- | ------------- | ------------- | ------------- | -------------
|
||||
**user_id** | **String** | | [required] |
|
||||
**message_type** | **String** | | [required] |
|
||||
**slot** | **i32** | | [required] |
|
||||
**message_id** | **i32** | | [required] |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -140,10 +140,10 @@ Name | Type | Description | Required | Notes
|
||||
|
||||
## reset_invite_message
|
||||
|
||||
> Vec<crate::models::InviteMessage> reset_invite_message(user_id, message_type, slot)
|
||||
> Vec<crate::models::InviteMessage> reset_invite_message(user_id, message_type, message_id)
|
||||
Reset Invite Message
|
||||
|
||||
Resets a single Invite Message back to it's original message, and then returns a list of all of them. Admin Credentials are required to update messages of other users! Resetting a message respects the rate-limit, so it is not possible to reset within the 60 minutes countdown. Resetting it does however not set the rate-limit to 60 like when editing it. It is possible to edit it right after resetting it. Trying to edit a message before the cooldown timer expires results in a 429 \"Too Fast Error\". Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite The DELETE endpoint does not have/require any request body.
|
||||
Resets a single Invite Message back to it's original message, and then returns a list of all of them. Admin Credentials are required to update messages of other users! Resetting a message respects the rate-limit, but resetting it does not set the rate-limit to 60 like when editing it. It is possible to edit it right after resetting it. Trying to edit a message before the cooldown timer expires results in a 429 Too Fast Error. Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite
|
||||
|
||||
### Parameters
|
||||
|
||||
@ -152,7 +152,7 @@ Name | Type | Description | Required | Notes
|
||||
------------- | ------------- | ------------- | ------------- | -------------
|
||||
**user_id** | **String** | | [required] |
|
||||
**message_type** | **String** | | [required] |
|
||||
**slot** | **i32** | | [required] |
|
||||
**message_id** | **i32** | | [required] |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -203,10 +203,10 @@ Name | Type | Description | Required | Notes
|
||||
|
||||
## update_invite_message
|
||||
|
||||
> Vec<crate::models::InviteMessage> update_invite_message(user_id, message_type, slot, update_invite_message_request)
|
||||
> Vec<crate::models::InviteMessage> update_invite_message(user_id, message_type, message_id)
|
||||
Update Invite Message
|
||||
|
||||
Updates a single Invite Message and then returns a list of all of them. Admin Credentials are required to update messages of other users! Updating a message automatically sets the cooldown timer to 60 minutes. Trying to edit a message before the cooldown timer expires results in a 429 \"Too Fast Error\". Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite
|
||||
Updates a single Invite Message and then returns a list of all of them. Admin Credentials are required to update messages of other users! Updating a message automatically sets the cooldown timer to 60 minutes. Trying to edit a message before the cooldown timer expires results in a 429 Too Fast Error. Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite
|
||||
|
||||
### Parameters
|
||||
|
||||
@ -215,8 +215,7 @@ Name | Type | Description | Required | Notes
|
||||
------------- | ------------- | ------------- | ------------- | -------------
|
||||
**user_id** | **String** | | [required] |
|
||||
**message_type** | **String** | | [required] |
|
||||
**slot** | **i32** | | [required] |
|
||||
**update_invite_message_request** | Option<[**UpdateInviteMessageRequest**](UpdateInviteMessageRequest.md)> | Message of what to set the invite message to. | |
|
||||
**message_id** | **i32** | | [required] |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -228,7 +227,7 @@ Name | Type | Description | Required | Notes
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Content-Type**: Not defined
|
||||
- **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)
|
||||
|
@ -15,7 +15,7 @@ Method | HTTP request | Description
|
||||
|
||||
## clear_all_player_moderations
|
||||
|
||||
> crate::models::Success clear_all_player_moderations()
|
||||
> crate::models::Error clear_all_player_moderations()
|
||||
Clear All Player Moderations
|
||||
|
||||
⚠️ **This will delete every single player moderation you've ever made.**
|
||||
@ -26,7 +26,7 @@ This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**crate::models::Success**](Success.md)
|
||||
[**crate::models::Error**](Error.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
@ -5,7 +5,7 @@ All URIs are relative to *https://api.vrchat.cloud/api/1*
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**get_config**](SystemApi.md#get_config) | **GET** /config | Fetch API Config
|
||||
[**get_css**](SystemApi.md#get_css) | **GET** /css/app.css | Download CSS
|
||||
[**get_css**](SystemApi.md#get_css) | **GET** /css/app.js | Download CSS
|
||||
[**get_current_online_users**](SystemApi.md#get_current_online_users) | **GET** /visits | Current Online Users
|
||||
[**get_health**](SystemApi.md#get_health) | **GET** /health | Check API Health
|
||||
[**get_java_script**](SystemApi.md#get_java_script) | **GET** /js/app.js | Download JavaScript
|
||||
@ -76,7 +76,7 @@ No authorization required
|
||||
> i32 get_current_online_users()
|
||||
Current Online Users
|
||||
|
||||
Returns the current number of online users. **NOTE:** The response type is not a JSON object, but a simple JSON integer.
|
||||
Returns in plain format the number of currently online users. **NOTE:** The response type is not of JSON, but is an integer in plain ASCII format.
|
||||
|
||||
### Parameters
|
||||
|
||||
@ -93,7 +93,7 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
- **Accept**: text/plain
|
||||
|
||||
[[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)
|
||||
|
||||
@ -161,7 +161,7 @@ No authorization required
|
||||
> String get_system_time()
|
||||
Current System Time
|
||||
|
||||
Returns the current time of the API server. **NOTE:** The response type is not a JSON object, but a simple JSON string.
|
||||
Returns in plain format the current time of the API server. **NOTE:** The response type is not of JSON, but is a string in plain ASCII format.
|
||||
|
||||
### Parameters
|
||||
|
||||
@ -178,7 +178,7 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
- **Accept**: text/plain
|
||||
|
||||
[[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)
|
||||
|
||||
|
@ -1,11 +0,0 @@
|
||||
# UpdateInviteMessageRequest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**message** | **String** | |
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -1,124 +0,0 @@
|
||||
/*
|
||||
* VRChat API Documentation
|
||||
*
|
||||
*
|
||||
* Contact: me@ruby.js.org
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
use reqwest;
|
||||
|
||||
use crate::apis::ResponseContent;
|
||||
use super::{Error, configuration};
|
||||
|
||||
|
||||
/// struct for typed errors of method [`get_instance`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetInstanceError {
|
||||
Status401(crate::models::Error),
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method [`get_short_name`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum GetShortNameError {
|
||||
Status401(crate::models::Error),
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
/// struct for typed errors of method [`send_self_invite`]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum SendSelfInviteError {
|
||||
Status401(crate::models::Error),
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
|
||||
/// Returns an instance.
|
||||
pub fn get_instance(configuration: &configuration::Configuration, world_id: &str, instance_id: &str) -> Result<crate::models::Instance, Error<GetInstanceError>> {
|
||||
let local_var_configuration = configuration;
|
||||
|
||||
let local_var_client = &local_var_configuration.client;
|
||||
|
||||
let local_var_uri_str = format!("{}/instances/{worldId}:{instanceId}", local_var_configuration.base_path, worldId=crate::apis::urlencode(world_id), instanceId=crate::apis::urlencode(instance_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<GetInstanceError> = 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 an instance short name.
|
||||
pub fn get_short_name(configuration: &configuration::Configuration, world_id: &str, instance_id: &str) -> Result<String, Error<GetShortNameError>> {
|
||||
let local_var_configuration = configuration;
|
||||
|
||||
let local_var_client = &local_var_configuration.client;
|
||||
|
||||
let local_var_uri_str = format!("{}/instances/{worldId}:{instanceId}/shortName", local_var_configuration.base_path, worldId=crate::apis::urlencode(world_id), instanceId=crate::apis::urlencode(instance_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<GetShortNameError> = 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))
|
||||
}
|
||||
}
|
||||
|
||||
/// Sends an invite to the instance to yourself.
|
||||
pub fn send_self_invite(configuration: &configuration::Configuration, world_id: &str, instance_id: &str) -> Result<crate::models::Success, Error<SendSelfInviteError>> {
|
||||
let local_var_configuration = configuration;
|
||||
|
||||
let local_var_client = &local_var_configuration.client;
|
||||
|
||||
let local_var_uri_str = format!("{}/instances/{worldId}:{instanceId}/invite", local_var_configuration.base_path, worldId=crate::apis::urlencode(world_id), instanceId=crate::apis::urlencode(instance_id));
|
||||
let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, 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<SendSelfInviteError> = 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))
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,6 @@ use super::{Error, configuration};
|
||||
pub enum GetInviteMessageError {
|
||||
Status400(crate::models::Error),
|
||||
Status401(crate::models::Error),
|
||||
Status404(crate::models::Error),
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
|
||||
@ -54,7 +53,6 @@ pub enum RequestInviteError {
|
||||
pub enum ResetInviteMessageError {
|
||||
Status400(crate::models::Error),
|
||||
Status401(crate::models::Error),
|
||||
Status404(crate::models::InlineResponse404),
|
||||
Status429(crate::models::Error),
|
||||
UnknownValue(serde_json::Value),
|
||||
}
|
||||
@ -79,12 +77,12 @@ pub enum UpdateInviteMessageError {
|
||||
|
||||
|
||||
/// Returns a single Invite Message. This returns the exact same information but less than `getInviteMessages`. Admin Credentials are required to view messages of other users! Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite
|
||||
pub fn get_invite_message(configuration: &configuration::Configuration, user_id: &str, message_type: &str, slot: i32) -> Result<crate::models::InviteMessage, Error<GetInviteMessageError>> {
|
||||
pub fn get_invite_message(configuration: &configuration::Configuration, user_id: &str, message_type: &str, message_id: i32) -> Result<crate::models::InviteMessage, Error<GetInviteMessageError>> {
|
||||
let local_var_configuration = configuration;
|
||||
|
||||
let local_var_client = &local_var_configuration.client;
|
||||
|
||||
let local_var_uri_str = format!("{}/message/{userId}/{messageType}/{slot}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id), messageType=crate::apis::urlencode(message_type), slot=slot);
|
||||
let local_var_uri_str = format!("{}/message/{userId}/{messageType}/{messageId}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id), messageType=crate::apis::urlencode(message_type), messageId=message_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 {
|
||||
@ -191,13 +189,13 @@ pub fn request_invite(configuration: &configuration::Configuration, user_id: &st
|
||||
}
|
||||
}
|
||||
|
||||
/// Resets a single Invite Message back to it's original message, and then returns a list of all of them. Admin Credentials are required to update messages of other users! Resetting a message respects the rate-limit, so it is not possible to reset within the 60 minutes countdown. Resetting it does however not set the rate-limit to 60 like when editing it. It is possible to edit it right after resetting it. Trying to edit a message before the cooldown timer expires results in a 429 \"Too Fast Error\". Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite The DELETE endpoint does not have/require any request body.
|
||||
pub fn reset_invite_message(configuration: &configuration::Configuration, user_id: &str, message_type: &str, slot: i32) -> Result<Vec<crate::models::InviteMessage>, Error<ResetInviteMessageError>> {
|
||||
/// Resets a single Invite Message back to it's original message, and then returns a list of all of them. Admin Credentials are required to update messages of other users! Resetting a message respects the rate-limit, but resetting it does not set the rate-limit to 60 like when editing it. It is possible to edit it right after resetting it. Trying to edit a message before the cooldown timer expires results in a 429 Too Fast Error. Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite
|
||||
pub fn reset_invite_message(configuration: &configuration::Configuration, user_id: &str, message_type: &str, message_id: i32) -> Result<Vec<crate::models::InviteMessage>, Error<ResetInviteMessageError>> {
|
||||
let local_var_configuration = configuration;
|
||||
|
||||
let local_var_client = &local_var_configuration.client;
|
||||
|
||||
let local_var_uri_str = format!("{}/message/{userId}/{messageType}/{slot}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id), messageType=crate::apis::urlencode(message_type), slot=slot);
|
||||
let local_var_uri_str = format!("{}/message/{userId}/{messageType}/{messageId}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id), messageType=crate::apis::urlencode(message_type), messageId=message_id);
|
||||
let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
|
||||
|
||||
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
|
||||
@ -248,19 +246,18 @@ pub fn respond_invite(configuration: &configuration::Configuration, notification
|
||||
}
|
||||
}
|
||||
|
||||
/// Updates a single Invite Message and then returns a list of all of them. Admin Credentials are required to update messages of other users! Updating a message automatically sets the cooldown timer to 60 minutes. Trying to edit a message before the cooldown timer expires results in a 429 \"Too Fast Error\". Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite
|
||||
pub fn update_invite_message(configuration: &configuration::Configuration, user_id: &str, message_type: &str, slot: i32, update_invite_message_request: Option<crate::models::UpdateInviteMessageRequest>) -> Result<Vec<crate::models::InviteMessage>, Error<UpdateInviteMessageError>> {
|
||||
/// Updates a single Invite Message and then returns a list of all of them. Admin Credentials are required to update messages of other users! Updating a message automatically sets the cooldown timer to 60 minutes. Trying to edit a message before the cooldown timer expires results in a 429 Too Fast Error. Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite
|
||||
pub fn update_invite_message(configuration: &configuration::Configuration, user_id: &str, message_type: &str, message_id: i32) -> Result<Vec<crate::models::InviteMessage>, Error<UpdateInviteMessageError>> {
|
||||
let local_var_configuration = configuration;
|
||||
|
||||
let local_var_client = &local_var_configuration.client;
|
||||
|
||||
let local_var_uri_str = format!("{}/message/{userId}/{messageType}/{slot}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id), messageType=crate::apis::urlencode(message_type), slot=slot);
|
||||
let local_var_uri_str = format!("{}/message/{userId}/{messageType}/{messageId}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id), messageType=crate::apis::urlencode(message_type), messageId=message_id);
|
||||
let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, 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());
|
||||
}
|
||||
local_var_req_builder = local_var_req_builder.json(&update_invite_message_request);
|
||||
|
||||
let local_var_req = local_var_req_builder.build()?;
|
||||
let mut local_var_resp = local_var_client.execute(local_var_req)?;
|
||||
|
@ -66,7 +66,6 @@ pub mod avatars_api;
|
||||
pub mod favorites_api;
|
||||
pub mod files_api;
|
||||
pub mod friends_api;
|
||||
pub mod instances_api;
|
||||
pub mod invite_api;
|
||||
pub mod notifications_api;
|
||||
pub mod permissions_api;
|
||||
|
@ -65,7 +65,7 @@ pub enum UnmoderateUserError {
|
||||
|
||||
|
||||
/// ⚠️ **This will delete every single player moderation you've ever made.**
|
||||
pub fn clear_all_player_moderations(configuration: &configuration::Configuration, ) -> Result<crate::models::Success, Error<ClearAllPlayerModerationsError>> {
|
||||
pub fn clear_all_player_moderations(configuration: &configuration::Configuration, ) -> Result<crate::models::Error, Error<ClearAllPlayerModerationsError>> {
|
||||
let local_var_configuration = configuration;
|
||||
|
||||
let local_var_client = &local_var_configuration.client;
|
||||
|
@ -92,7 +92,7 @@ pub fn get_css(configuration: &configuration::Configuration, variant: Option<&st
|
||||
|
||||
let local_var_client = &local_var_configuration.client;
|
||||
|
||||
let local_var_uri_str = format!("{}/css/app.css", local_var_configuration.base_path);
|
||||
let local_var_uri_str = format!("{}/css/app.js", local_var_configuration.base_path);
|
||||
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_str) = variant {
|
||||
@ -120,7 +120,7 @@ pub fn get_css(configuration: &configuration::Configuration, variant: Option<&st
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the current number of online users. **NOTE:** The response type is not a JSON object, but a simple JSON integer.
|
||||
/// Returns in plain format the number of currently online users. **NOTE:** The response type is not of JSON, but is an integer in plain ASCII format.
|
||||
pub fn get_current_online_users(configuration: &configuration::Configuration, ) -> Result<i32, Error<GetCurrentOnlineUsersError>> {
|
||||
let local_var_configuration = configuration;
|
||||
|
||||
@ -210,7 +210,7 @@ pub fn get_java_script(configuration: &configuration::Configuration, variant: Op
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the current time of the API server. **NOTE:** The response type is not a JSON object, but a simple JSON string.
|
||||
/// Returns in plain format the current time of the API server. **NOTE:** The response type is not of JSON, but is a string in plain ASCII format.
|
||||
pub fn get_system_time(configuration: &configuration::Configuration, ) -> Result<String, Error<GetSystemTimeError>> {
|
||||
let local_var_configuration = configuration;
|
||||
|
||||
|
@ -1,26 +0,0 @@
|
||||
/*
|
||||
* VRChat API Documentation
|
||||
*
|
||||
*
|
||||
* Contact: me@ruby.js.org
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct InlineResponse404 {
|
||||
#[serde(rename = "error")]
|
||||
pub error: Box<crate::models::Error>,
|
||||
}
|
||||
|
||||
impl InlineResponse404 {
|
||||
pub fn new(error: crate::models::Error) -> InlineResponse404 {
|
||||
InlineResponse404 {
|
||||
error: Box::new(error),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -54,8 +54,6 @@ pub mod finish_file_data_upload_request;
|
||||
pub use self::finish_file_data_upload_request::FinishFileDataUploadRequest;
|
||||
pub mod friend_status;
|
||||
pub use self::friend_status::FriendStatus;
|
||||
pub mod inline_response_404;
|
||||
pub use self::inline_response_404::InlineResponse404;
|
||||
pub mod instance;
|
||||
pub use self::instance::Instance;
|
||||
pub mod instance_platforms;
|
||||
@ -106,8 +104,6 @@ pub mod update_avatar_request;
|
||||
pub use self::update_avatar_request::UpdateAvatarRequest;
|
||||
pub mod update_favorite_group_request;
|
||||
pub use self::update_favorite_group_request::UpdateFavoriteGroupRequest;
|
||||
pub mod update_invite_message_request;
|
||||
pub use self::update_invite_message_request::UpdateInviteMessageRequest;
|
||||
pub mod update_user_request;
|
||||
pub use self::update_user_request::UpdateUserRequest;
|
||||
pub mod update_world_request;
|
||||
|
@ -1,26 +0,0 @@
|
||||
/*
|
||||
* VRChat API Documentation
|
||||
*
|
||||
*
|
||||
* Contact: me@ruby.js.org
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct UpdateInviteMessageRequest {
|
||||
#[serde(rename = "message")]
|
||||
pub message: String,
|
||||
}
|
||||
|
||||
impl UpdateInviteMessageRequest {
|
||||
pub fn new(message: String) -> UpdateInviteMessageRequest {
|
||||
UpdateInviteMessageRequest {
|
||||
message,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user