mirror of
https://github.com/mii443/vrchatapi-rust.git
synced 2025-08-22 15:45:35 +00:00
Initial commit
This commit is contained in:
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
/target/
|
||||||
|
**/*.rs.bk
|
||||||
|
Cargo.lock
|
23
.openapi-generator-ignore
Normal file
23
.openapi-generator-ignore
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# OpenAPI Generator Ignore
|
||||||
|
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||||
|
|
||||||
|
# Use this file to prevent files from being overwritten by the generator.
|
||||||
|
# The patterns follow closely to .gitignore or .dockerignore.
|
||||||
|
|
||||||
|
# As an example, the C# client generator defines ApiClient.cs.
|
||||||
|
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||||
|
#ApiClient.cs
|
||||||
|
|
||||||
|
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||||
|
#foo/*/qux
|
||||||
|
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||||
|
|
||||||
|
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||||
|
#foo/**/qux
|
||||||
|
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||||
|
|
||||||
|
# You can also negate patterns with an exclamation (!).
|
||||||
|
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||||
|
#docs/*.md
|
||||||
|
# Then explicitly reverse the ignore rule for a single file:
|
||||||
|
#!docs/README.md
|
95
.openapi-generator/FILES
Normal file
95
.openapi-generator/FILES
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
.gitignore
|
||||||
|
.travis.yml
|
||||||
|
Cargo.toml
|
||||||
|
README.md
|
||||||
|
docs/AuthenticationApi.md
|
||||||
|
docs/Config.md
|
||||||
|
docs/ConfigAnnouncements.md
|
||||||
|
docs/ConfigDownloadUrls.md
|
||||||
|
docs/ConfigDynamicWorldRows.md
|
||||||
|
docs/ConfigEvents.md
|
||||||
|
docs/CurrentUser.md
|
||||||
|
docs/DeploymentGroup.md
|
||||||
|
docs/DeveloperType.md
|
||||||
|
docs/Error.md
|
||||||
|
docs/File.md
|
||||||
|
docs/FileData.md
|
||||||
|
docs/FileStatus.md
|
||||||
|
docs/FileVersion.md
|
||||||
|
docs/FilesApi.md
|
||||||
|
docs/FriendsApi.md
|
||||||
|
docs/InlineObject.md
|
||||||
|
docs/InlineObject1.md
|
||||||
|
docs/InlineObject2.md
|
||||||
|
docs/InlineObject3.md
|
||||||
|
docs/InlineObject4.md
|
||||||
|
docs/InlineResponse200.md
|
||||||
|
docs/InlineResponse2001.md
|
||||||
|
docs/InlineResponse2002.md
|
||||||
|
docs/InlineResponse2003.md
|
||||||
|
docs/InlineResponse2004.md
|
||||||
|
docs/InlineResponse2005.md
|
||||||
|
docs/InlineResponse401.md
|
||||||
|
docs/LimitedUser.md
|
||||||
|
docs/LimitedWorld.md
|
||||||
|
docs/MimeType.md
|
||||||
|
docs/Notification.md
|
||||||
|
docs/NotificationType.md
|
||||||
|
docs/NotificationsApi.md
|
||||||
|
docs/ReleaseStatus.md
|
||||||
|
docs/Response.md
|
||||||
|
docs/Success.md
|
||||||
|
docs/SystemApi.md
|
||||||
|
docs/User.md
|
||||||
|
docs/UserState.md
|
||||||
|
docs/UserStatus.md
|
||||||
|
docs/UsersApi.md
|
||||||
|
docs/WorldsApi.md
|
||||||
|
git_push.sh
|
||||||
|
src/apis/authentication_api.rs
|
||||||
|
src/apis/configuration.rs
|
||||||
|
src/apis/files_api.rs
|
||||||
|
src/apis/friends_api.rs
|
||||||
|
src/apis/mod.rs
|
||||||
|
src/apis/notifications_api.rs
|
||||||
|
src/apis/system_api.rs
|
||||||
|
src/apis/users_api.rs
|
||||||
|
src/apis/worlds_api.rs
|
||||||
|
src/lib.rs
|
||||||
|
src/models/config.rs
|
||||||
|
src/models/config_announcements.rs
|
||||||
|
src/models/config_download_urls.rs
|
||||||
|
src/models/config_dynamic_world_rows.rs
|
||||||
|
src/models/config_events.rs
|
||||||
|
src/models/current_user.rs
|
||||||
|
src/models/deployment_group.rs
|
||||||
|
src/models/developer_type.rs
|
||||||
|
src/models/error.rs
|
||||||
|
src/models/file.rs
|
||||||
|
src/models/file_data.rs
|
||||||
|
src/models/file_status.rs
|
||||||
|
src/models/file_version.rs
|
||||||
|
src/models/inline_object.rs
|
||||||
|
src/models/inline_object_1.rs
|
||||||
|
src/models/inline_object_2.rs
|
||||||
|
src/models/inline_object_3.rs
|
||||||
|
src/models/inline_object_4.rs
|
||||||
|
src/models/inline_response_200.rs
|
||||||
|
src/models/inline_response_200_1.rs
|
||||||
|
src/models/inline_response_200_2.rs
|
||||||
|
src/models/inline_response_200_3.rs
|
||||||
|
src/models/inline_response_200_4.rs
|
||||||
|
src/models/inline_response_200_5.rs
|
||||||
|
src/models/inline_response_401.rs
|
||||||
|
src/models/limited_user.rs
|
||||||
|
src/models/limited_world.rs
|
||||||
|
src/models/mime_type.rs
|
||||||
|
src/models/mod.rs
|
||||||
|
src/models/notification.rs
|
||||||
|
src/models/notification_type.rs
|
||||||
|
src/models/release_status.rs
|
||||||
|
src/models/response.rs
|
||||||
|
src/models/success.rs
|
||||||
|
src/models/user.rs
|
||||||
|
src/models/user_state.rs
|
||||||
|
src/models/user_status.rs
|
1
.openapi-generator/VERSION
Normal file
1
.openapi-generator/VERSION
Normal file
@ -0,0 +1 @@
|
|||||||
|
5.2.0
|
1
.travis.yml
Normal file
1
.travis.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
language: rust
|
17
Cargo.toml
Normal file
17
Cargo.toml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
[package]
|
||||||
|
name = "vrchatapi"
|
||||||
|
version = "1.0.0"
|
||||||
|
authors = ["OpenAPI Generator team and contributors"]
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
serde = "^1.0"
|
||||||
|
serde_derive = "^1.0"
|
||||||
|
serde_json = "^1.0"
|
||||||
|
url = "^2.2"
|
||||||
|
[dependencies.reqwest]
|
||||||
|
version = "^0.11"
|
||||||
|
default-features = false
|
||||||
|
features = ["json", "multipart"]
|
||||||
|
|
||||||
|
[dev-dependencies]
|
138
README.md
Normal file
138
README.md
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
# Rust API client for vrchatapi
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
# VRChat API Documentation
|
||||||
|
This project is an [OPEN Open Source Project](https://openopensource.org)
|
||||||
|
|
||||||
|
Individuals making significant and valuable contributions are given
|
||||||
|
commit-access to the project to contribute as they see fit. This project
|
||||||
|
is more like an open wiki than a standard guarded open source project.
|
||||||
|
|
||||||
|
## Disclaimer
|
||||||
|
|
||||||
|
This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API.
|
||||||
|
|
||||||
|
> **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:**
|
||||||
|
> * We do not provide documentation or support for the API.
|
||||||
|
> * Do not make queries to the API more than once per 60 seconds.
|
||||||
|
> * Abuse of the API may result in account termination.
|
||||||
|
> * Access to API endpoints may break at any given time, with no warning.
|
||||||
|
|
||||||
|
As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it.
|
||||||
|
|
||||||
|
## Get in touch with us!
|
||||||
|
|
||||||
|
[https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client.
|
||||||
|
|
||||||
|
- API version: 1.0.0
|
||||||
|
- Package version: 1.0.0
|
||||||
|
- Build package: org.openapitools.codegen.languages.RustClientCodegen
|
||||||
|
For more information, please visit [https://github.com/VRChatAPI](https://github.com/VRChatAPI)
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Put the package under your project folder and add the following to `Cargo.toml` under `[dependencies]`:
|
||||||
|
|
||||||
|
```
|
||||||
|
openapi = { path = "./generated" }
|
||||||
|
```
|
||||||
|
|
||||||
|
## Documentation for API Endpoints
|
||||||
|
|
||||||
|
All URIs are relative to *https://api.vrchat.cloud/api/1*
|
||||||
|
|
||||||
|
Class | Method | HTTP request | Description
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
*AuthenticationApi* | [**delete_user_by_id**](docs/AuthenticationApi.md#delete_user_by_id) | **PUT** /user/{userId}/delete | Delete User
|
||||||
|
*AuthenticationApi* | [**get_current_user**](docs/AuthenticationApi.md#get_current_user) | **GET** /auth/user | Login and/or Get Current User Info
|
||||||
|
*AuthenticationApi* | [**logout**](docs/AuthenticationApi.md#logout) | **PUT** /logout | Logout
|
||||||
|
*AuthenticationApi* | [**verify2_fa**](docs/AuthenticationApi.md#verify2_fa) | **POST** /auth/twofactorauth/totp/verify | Verify 2FA code
|
||||||
|
*AuthenticationApi* | [**verify_auth_token**](docs/AuthenticationApi.md#verify_auth_token) | **GET** /auth | Verify Auth Token
|
||||||
|
*AuthenticationApi* | [**verify_recovery_code**](docs/AuthenticationApi.md#verify_recovery_code) | **POST** /auth/twofactorauth/otp/verify | Verify 2FA code with Recovery code
|
||||||
|
*FilesApi* | [**create_file**](docs/FilesApi.md#create_file) | **POST** /file | Create File
|
||||||
|
*FilesApi* | [**create_file_version**](docs/FilesApi.md#create_file_version) | **POST** /file/{fileId} | Create File Version
|
||||||
|
*FilesApi* | [**delete_file**](docs/FilesApi.md#delete_file) | **DELETE** /file/{fileId} | Delete File
|
||||||
|
*FilesApi* | [**delete_file_version**](docs/FilesApi.md#delete_file_version) | **DELETE** /file/{fileId}/{versionId} | Delete File Version
|
||||||
|
*FilesApi* | [**download_file_version**](docs/FilesApi.md#download_file_version) | **GET** /file/{fileId}/{versionId} | Download File Version
|
||||||
|
*FilesApi* | [**finish_file_data_upload**](docs/FilesApi.md#finish_file_data_upload) | **PUT** /file/{fileId}/{versionId}/{fileType}/finish | Finish FileData Upload
|
||||||
|
*FilesApi* | [**get_file**](docs/FilesApi.md#get_file) | **GET** /file/{fileId} | Show File
|
||||||
|
*FilesApi* | [**get_file_data_upload_status**](docs/FilesApi.md#get_file_data_upload_status) | **GET** /file/{fileId}/{versionId}/{fileType}/status | Check FileData Upload Status
|
||||||
|
*FilesApi* | [**get_files**](docs/FilesApi.md#get_files) | **GET** /files | List Files
|
||||||
|
*FilesApi* | [**start_file_data_upload**](docs/FilesApi.md#start_file_data_upload) | **PUT** /file/{fileId}/{versionId}/{fileType}/start | Start FileData Upload
|
||||||
|
*FriendsApi* | [**delete_friend_request**](docs/FriendsApi.md#delete_friend_request) | **DELETE** /user/{userId}/friendRequest | Delete Friend Request
|
||||||
|
*FriendsApi* | [**friend**](docs/FriendsApi.md#friend) | **POST** /user/{userId}/friendRequest | Send Friend Request
|
||||||
|
*FriendsApi* | [**get_friend_status**](docs/FriendsApi.md#get_friend_status) | **GET** /user/{userId}/friendStatus | Check Friend Status
|
||||||
|
*FriendsApi* | [**get_friends**](docs/FriendsApi.md#get_friends) | **GET** /auth/user/friends | List Friends
|
||||||
|
*FriendsApi* | [**unfriend**](docs/FriendsApi.md#unfriend) | **DELETE** /auth/user/friends/{userId} | Unfriend
|
||||||
|
*NotificationsApi* | [**accept_friend_request**](docs/NotificationsApi.md#accept_friend_request) | **PUT** /auth/user/notifications/{notificationId}/accept | Accept Friend Request
|
||||||
|
*NotificationsApi* | [**clear_notifications**](docs/NotificationsApi.md#clear_notifications) | **PUT** /auth/user/notifications/clear | Clear All Notifications
|
||||||
|
*NotificationsApi* | [**delete_notification**](docs/NotificationsApi.md#delete_notification) | **PUT** /auth/user/notifications/{notificationId}/hide | Delete Notification
|
||||||
|
*NotificationsApi* | [**get_notifications**](docs/NotificationsApi.md#get_notifications) | **GET** /auth/user/notifications | List Notifications
|
||||||
|
*NotificationsApi* | [**mark_notification_as_read**](docs/NotificationsApi.md#mark_notification_as_read) | **PUT** /auth/user/notifications/{notificationId}/see | Mark As Read
|
||||||
|
*SystemApi* | [**get_config**](docs/SystemApi.md#get_config) | **GET** /config | Fetch API Config
|
||||||
|
*SystemApi* | [**get_current_online_users**](docs/SystemApi.md#get_current_online_users) | **GET** /visits | Current Online Users
|
||||||
|
*SystemApi* | [**get_health**](docs/SystemApi.md#get_health) | **GET** /health | Check API Health
|
||||||
|
*SystemApi* | [**get_system_time**](docs/SystemApi.md#get_system_time) | **GET** /time | Current System Time
|
||||||
|
*UsersApi* | [**get_user**](docs/UsersApi.md#get_user) | **GET** /users/{userId} | Get User by ID
|
||||||
|
*UsersApi* | [**get_user_by_name**](docs/UsersApi.md#get_user_by_name) | **GET** /users/{username}/name | Get User by Username
|
||||||
|
*UsersApi* | [**search_active_users**](docs/UsersApi.md#search_active_users) | **GET** /users/active | Search Active Users
|
||||||
|
*UsersApi* | [**search_users**](docs/UsersApi.md#search_users) | **GET** /users | Search All Users
|
||||||
|
*UsersApi* | [**update_user**](docs/UsersApi.md#update_user) | **PUT** /users/{userId} | Update User Info
|
||||||
|
*WorldsApi* | [**search_worlds**](docs/WorldsApi.md#search_worlds) | **GET** /worlds | Search all worlds
|
||||||
|
|
||||||
|
|
||||||
|
## Documentation For Models
|
||||||
|
|
||||||
|
- [Config](docs/Config.md)
|
||||||
|
- [ConfigAnnouncements](docs/ConfigAnnouncements.md)
|
||||||
|
- [ConfigDownloadUrls](docs/ConfigDownloadUrls.md)
|
||||||
|
- [ConfigDynamicWorldRows](docs/ConfigDynamicWorldRows.md)
|
||||||
|
- [ConfigEvents](docs/ConfigEvents.md)
|
||||||
|
- [CurrentUser](docs/CurrentUser.md)
|
||||||
|
- [DeploymentGroup](docs/DeploymentGroup.md)
|
||||||
|
- [DeveloperType](docs/DeveloperType.md)
|
||||||
|
- [Error](docs/Error.md)
|
||||||
|
- [File](docs/File.md)
|
||||||
|
- [FileData](docs/FileData.md)
|
||||||
|
- [FileStatus](docs/FileStatus.md)
|
||||||
|
- [FileVersion](docs/FileVersion.md)
|
||||||
|
- [InlineObject](docs/InlineObject.md)
|
||||||
|
- [InlineObject1](docs/InlineObject1.md)
|
||||||
|
- [InlineObject2](docs/InlineObject2.md)
|
||||||
|
- [InlineObject3](docs/InlineObject3.md)
|
||||||
|
- [InlineObject4](docs/InlineObject4.md)
|
||||||
|
- [InlineResponse200](docs/InlineResponse200.md)
|
||||||
|
- [InlineResponse2001](docs/InlineResponse2001.md)
|
||||||
|
- [InlineResponse2002](docs/InlineResponse2002.md)
|
||||||
|
- [InlineResponse2003](docs/InlineResponse2003.md)
|
||||||
|
- [InlineResponse2004](docs/InlineResponse2004.md)
|
||||||
|
- [InlineResponse2005](docs/InlineResponse2005.md)
|
||||||
|
- [InlineResponse401](docs/InlineResponse401.md)
|
||||||
|
- [LimitedUser](docs/LimitedUser.md)
|
||||||
|
- [LimitedWorld](docs/LimitedWorld.md)
|
||||||
|
- [MimeType](docs/MimeType.md)
|
||||||
|
- [Notification](docs/Notification.md)
|
||||||
|
- [NotificationType](docs/NotificationType.md)
|
||||||
|
- [ReleaseStatus](docs/ReleaseStatus.md)
|
||||||
|
- [Response](docs/Response.md)
|
||||||
|
- [Success](docs/Success.md)
|
||||||
|
- [User](docs/User.md)
|
||||||
|
- [UserState](docs/UserState.md)
|
||||||
|
- [UserStatus](docs/UserStatus.md)
|
||||||
|
|
||||||
|
|
||||||
|
To get access to the crate's generated documentation, use:
|
||||||
|
|
||||||
|
```
|
||||||
|
cargo doc --open
|
||||||
|
```
|
||||||
|
|
||||||
|
## Author
|
||||||
|
|
||||||
|
me@ruby.js.org
|
||||||
|
|
185
docs/AuthenticationApi.md
Normal file
185
docs/AuthenticationApi.md
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
# \AuthenticationApi
|
||||||
|
|
||||||
|
All URIs are relative to *https://api.vrchat.cloud/api/1*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**delete_user_by_id**](AuthenticationApi.md#delete_user_by_id) | **PUT** /user/{userId}/delete | Delete User
|
||||||
|
[**get_current_user**](AuthenticationApi.md#get_current_user) | **GET** /auth/user | Login and/or Get Current User Info
|
||||||
|
[**logout**](AuthenticationApi.md#logout) | **PUT** /logout | Logout
|
||||||
|
[**verify2_fa**](AuthenticationApi.md#verify2_fa) | **POST** /auth/twofactorauth/totp/verify | Verify 2FA code
|
||||||
|
[**verify_auth_token**](AuthenticationApi.md#verify_auth_token) | **GET** /auth | Verify Auth Token
|
||||||
|
[**verify_recovery_code**](AuthenticationApi.md#verify_recovery_code) | **POST** /auth/twofactorauth/otp/verify | Verify 2FA code with Recovery code
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## delete_user_by_id
|
||||||
|
|
||||||
|
> crate::models::CurrentUser delete_user_by_id(user_id)
|
||||||
|
Delete User
|
||||||
|
|
||||||
|
Deletes the account with given ID. Normal users only have permission to delete their own account. Account deletion is 14 days from this request, and will be cancelled if you do an authenticated request with the account afterwards. **VRC+ NOTE:** Despite the 14-days cooldown, any VRC+ subscription will be cancelled **immediately**. **METHOD NOTE:** Despite this being a Delete action, the method type required is PUT.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**user_id** | **String** | | [required] |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**crate::models::CurrentUser**](CurrentUser.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_current_user
|
||||||
|
|
||||||
|
> crate::models::CurrentUser get_current_user()
|
||||||
|
Login and/or Get Current User Info
|
||||||
|
|
||||||
|
Login and/or Get user data from your VRChat account. If `Authorization` header is present then a new login session will be generated, and a new `auth` cookie is returned. **WARNING: Session Limit:** Each authentication with login credentials counts as a separate session, out of which you have a limited amount. Make sure to save and reuse the `auth` cookie whenever you can, and avoid sending the Authorization header unless strictly neccesary. While the exact number of simultaneous open sessions is secret, expect to **very fast** run into the rate-limit and be temporarily blocked from making new sessions until the old ones expire.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**crate::models::CurrentUser**](CurrentUser.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[authCookie](../README.md#authCookie), [authHeader](../README.md#authHeader), [twoFactorAuthCookie](../README.md#twoFactorAuthCookie)
|
||||||
|
|
||||||
|
### 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)
|
||||||
|
|
||||||
|
|
||||||
|
## logout
|
||||||
|
|
||||||
|
> crate::models::Success logout()
|
||||||
|
Logout
|
||||||
|
|
||||||
|
Invalidates the auth cookie.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
|
### 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)
|
||||||
|
|
||||||
|
|
||||||
|
## verify2_fa
|
||||||
|
|
||||||
|
> crate::models::InlineResponse2001 verify2_fa(inline_object)
|
||||||
|
Verify 2FA code
|
||||||
|
|
||||||
|
Finishes the login sequence with a normal 2FA-generated code for accounts with 2FA-protection enabled.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**inline_object** | Option<[**InlineObject**](InlineObject.md)> | | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**crate::models::InlineResponse2001**](inline_response_200_1.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[authCookie](../README.md#authCookie)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **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)
|
||||||
|
|
||||||
|
|
||||||
|
## verify_auth_token
|
||||||
|
|
||||||
|
> crate::models::InlineResponse200 verify_auth_token()
|
||||||
|
Verify Auth Token
|
||||||
|
|
||||||
|
Verify whether the currently provided Auth Token is valid.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**crate::models::InlineResponse200**](inline_response_200.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)
|
||||||
|
|
||||||
|
|
||||||
|
## verify_recovery_code
|
||||||
|
|
||||||
|
> crate::models::InlineResponse2001 verify_recovery_code(inline_object1)
|
||||||
|
Verify 2FA code with Recovery code
|
||||||
|
|
||||||
|
Finishes the login sequence with an OTP (One Time Password) recovery code for accounts with 2FA-protection enabled.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**inline_object1** | Option<[**InlineObject1**](InlineObject1.md)> | | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**crate::models::InlineResponse2001**](inline_response_200_1.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[authCookie](../README.md#authCookie)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **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)
|
||||||
|
|
85
docs/Config.md
Normal file
85
docs/Config.md
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
# Config
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**address** | **String** | VRChat's office address | [readonly]
|
||||||
|
**announcements** | [**Vec<crate::models::ConfigAnnouncements>**](Config_announcements.md) | PSA, Public Announcements | [readonly]
|
||||||
|
**api_key** | **String** | apiKey to be used for all other requests | [readonly]
|
||||||
|
**app_name** | **String** | Game name | [readonly][default to VrChat]
|
||||||
|
**build_version_tag** | **String** | Build tag of the API server | [readonly]
|
||||||
|
**client_api_key** | **String** | apiKey to be used for all other requests | [readonly]
|
||||||
|
**client_bps_ceiling** | Option<**f32**> | Unknown | [optional]
|
||||||
|
**client_disconnect_timeout** | Option<**f32**> | Unknown | [optional]
|
||||||
|
**client_reserved_player_bps** | Option<**f32**> | Unknown | [optional]
|
||||||
|
**client_sent_count_allowance** | Option<**f32**> | Unknown | [optional]
|
||||||
|
**contact_email** | **String** | VRChat's contact email | [readonly]
|
||||||
|
**copyright_email** | **String** | VRChat's copyright-issues-related email | [readonly]
|
||||||
|
**current_tos_version** | **f32** | Current version number of the Terms of Service | [readonly]
|
||||||
|
**default_avatar** | **String** | |
|
||||||
|
**deployment_group** | [**crate::models::DeploymentGroup**](DeploymentGroup.md) | |
|
||||||
|
**dev_app_version_standalone** | **String** | Version number for game development build | [readonly]
|
||||||
|
**dev_download_link_windows** | **String** | Developer Download link | [readonly]
|
||||||
|
**dev_sdk_url** | **String** | Link to download the development SDK, use downloadUrls instead | [readonly]
|
||||||
|
**dev_sdk_version** | **String** | Version of the development SDK | [readonly]
|
||||||
|
**dev_server_version_standalone** | **String** | Version number for server development build | [readonly]
|
||||||
|
**disable_avatar_copying** | **bool** | Toggles if copying avatars should be disabled | [default to false]
|
||||||
|
**disable_avatar_gating** | **bool** | Toggles if avatar gating should be disabled. Avatar gating restricts uploading of avatars to people with the `system_avatar_access` Tag or `admin_avatar_access` Tag | [default to false]
|
||||||
|
**disable_community_labs** | **bool** | Toggles if the Community Labs should be disabled | [default to false]
|
||||||
|
**disable_community_labs_promotion** | **bool** | Toggles if promotion out of Community Labs should be disabled | [default to false]
|
||||||
|
**disable_email** | Option<**bool**> | Unknown | [optional][default to false]
|
||||||
|
**disable_event_stream** | **bool** | Toggles if Analytics should be disabled (this sreportedly not used in the Client) | [default to false]
|
||||||
|
**disable_feedback_gating** | **bool** | Toggles if feedback gating should be disabled. Feedback gating restricts submission of feedback (reporting a World or User) to people with the `system_feedback_access` Tag. | [default to false]
|
||||||
|
**disable_hello** | Option<**bool**> | Unknown | [optional][default to false]
|
||||||
|
**disable_registration** | **bool** | Toggles if new user account registration should be disabled | [default to false]
|
||||||
|
**disable_steam_networking** | **bool** | Toggles if Steam Networking should be disabled. VRChat these days uses Photon Unity Networking (PUN) instead. | [default to true]
|
||||||
|
**disable_two_factor_auth** | **bool** | Toggles if 2FA should be disabled. | [default to false]
|
||||||
|
**disable_udon** | **bool** | Toggles if Udon should be universally disabled in-game. | [default to false]
|
||||||
|
**disable_upgrade_account** | **bool** | Toggles if account upgrading \"linking with Steam/Oculus\" should be disabled. | [default to false]
|
||||||
|
**download_link_windows** | **String** | Download link for game on the Oculus Rift website. | [readonly]
|
||||||
|
**download_urls** | [**crate::models::ConfigDownloadUrls**](Config_downloadUrls.md) | |
|
||||||
|
**dynamic_world_rows** | [**Vec<crate::models::ConfigDynamicWorldRows>**](Config_dynamicWorldRows.md) | Array of DynamicWorldRow objects, used by the game to display the list of world rows | [readonly]
|
||||||
|
**events** | [**crate::models::ConfigEvents**](Config_events.md) | |
|
||||||
|
**gear_demo_room_id** | **String** | Unknown | [readonly]
|
||||||
|
**homepage_redirect_target** | **String** | Redirect target if you try to open the base API domain in your browser | [readonly][default to https://hello.vrchat.com]
|
||||||
|
**home_world_id** | **String** | |
|
||||||
|
**hub_world_id** | **String** | |
|
||||||
|
**jobs_email** | **String** | VRChat's job application email | [readonly]
|
||||||
|
**message_of_the_day** | **String** | MOTD | [readonly]
|
||||||
|
**moderation_email** | **String** | VRChat's moderation related email | [readonly]
|
||||||
|
**moderation_query_period** | **f32** | Unknown |
|
||||||
|
**not_allowed_to_select_avatar_in_private_world_message** | **String** | Used in-game to notify a user they aren't allowed to select avatars in private worlds | [readonly]
|
||||||
|
**plugin** | **String** | Extra [plugin](https://doc.photonengine.com/en-us/server/current/plugins/manual) to run in each instance | [readonly]
|
||||||
|
**release_app_version_standalone** | **String** | Version number for game release build | [readonly]
|
||||||
|
**release_sdk_url** | **String** | Link to download the release SDK | [readonly]
|
||||||
|
**release_sdk_version** | **String** | Version of the release SDK | [readonly]
|
||||||
|
**release_server_version_standalone** | **String** | Version number for server release build | [readonly]
|
||||||
|
**sdk_developer_faq_url** | **String** | Link to the developer FAQ | [readonly]
|
||||||
|
**sdk_discord_url** | **String** | Link to the official VRChat Discord | [readonly]
|
||||||
|
**sdk_not_allowed_to_publish_message** | **String** | Used in the SDK to notify a user they aren't allowed to upload avatars/worlds yet | [readonly]
|
||||||
|
**sdk_unity_version** | **String** | Unity version supported by the SDK | [readonly]
|
||||||
|
**server_name** | **String** | Server name of the API server currently responding | [readonly]
|
||||||
|
**support_email** | **String** | VRChat's support email | [readonly]
|
||||||
|
**time_out_world_id** | **String** | |
|
||||||
|
**tutorial_world_id** | **String** | |
|
||||||
|
**update_rate_ms_maximum** | **f32** | Unknown | [readonly]
|
||||||
|
**update_rate_ms_minimum** | **f32** | Unknown | [readonly]
|
||||||
|
**update_rate_ms_normal** | **f32** | Unknown | [readonly]
|
||||||
|
**update_rate_ms_udon_manual** | **f32** | Unknown | [readonly]
|
||||||
|
**upload_analysis_percent** | **f32** | Unknown | [readonly]
|
||||||
|
**url_list** | **Vec<String>** | List of allowed URLs that bypass the \"Allow untrusted URL's\" setting in-game | [readonly]
|
||||||
|
**use_reliable_udp_for_voice** | **bool** | Unknown | [default to false]
|
||||||
|
**user_update_period** | **f32** | Unknown | [readonly]
|
||||||
|
**user_verification_delay** | **f32** | Unknown | [readonly]
|
||||||
|
**user_verification_retry** | **f32** | Unknown | [readonly]
|
||||||
|
**user_verification_timeout** | **f32** | Unknown | [readonly]
|
||||||
|
**vive_windows_url** | **String** | Download link for game on the Steam website. | [readonly]
|
||||||
|
**white_listed_asset_urls** | **Vec<String>** | List of allowed URLs that are allowed to host avatar assets | [readonly]
|
||||||
|
**world_update_period** | **f32** | Unknown | [readonly]
|
||||||
|
**youtubedl_hash** | **String** | Currently used youtube-dl.exe hash in SHA-256-delimited format | [readonly]
|
||||||
|
**youtubedl_version** | **String** | Currently used youtube-dl.exe version | [readonly]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
12
docs/ConfigAnnouncements.md
Normal file
12
docs/ConfigAnnouncements.md
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# ConfigAnnouncements
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**name** | **String** | Announcement name | [readonly]
|
||||||
|
**text** | **String** | Announcement text | [readonly]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
13
docs/ConfigDownloadUrls.md
Normal file
13
docs/ConfigDownloadUrls.md
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# ConfigDownloadUrls
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**sdk2** | **String** | Download link for legacy SDK2 | [readonly]
|
||||||
|
**sdk3_avatars** | **String** | Download link for SDK3 for Avatars | [readonly]
|
||||||
|
**sdk3_worlds** | **String** | Download link for SDK3 for Worlds | [readonly]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
17
docs/ConfigDynamicWorldRows.md
Normal file
17
docs/ConfigDynamicWorldRows.md
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# ConfigDynamicWorldRows
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**index** | **f32** | | [readonly]
|
||||||
|
**name** | **String** | | [readonly]
|
||||||
|
**platform** | **String** | | [readonly]
|
||||||
|
**sort_heading** | **String** | | [readonly]
|
||||||
|
**sort_order** | **String** | | [readonly]
|
||||||
|
**sort_ownership** | **String** | | [readonly]
|
||||||
|
**tag** | Option<**String**> | Tag to filter worlds for this row | [optional][readonly]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
20
docs/ConfigEvents.md
Normal file
20
docs/ConfigEvents.md
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# ConfigEvents
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**distance_close** | **f32** | Unknown | [readonly]
|
||||||
|
**distance_factor** | **f32** | Unknown | [readonly]
|
||||||
|
**distance_far** | **f32** | Unknown | [readonly]
|
||||||
|
**group_distance** | **f32** | Unknown | [readonly]
|
||||||
|
**maximum_bunch_size** | **f32** | Unknown | [readonly]
|
||||||
|
**not_visible_factor** | **f32** | Unknown | [readonly]
|
||||||
|
**player_order_bucket_size** | **f32** | Unknown | [readonly]
|
||||||
|
**player_order_factor** | **f32** | Unknown | [readonly]
|
||||||
|
**slow_update_factor_threshold** | **f32** | Unknown | [readonly]
|
||||||
|
**view_segment_length** | **f32** | Unknown | [readonly]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
56
docs/CurrentUser.md
Normal file
56
docs/CurrentUser.md
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
# CurrentUser
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**id** | **String** | | [readonly]
|
||||||
|
**username** | **String** | |
|
||||||
|
**display_name** | **String** | |
|
||||||
|
**user_icon** | **String** | |
|
||||||
|
**bio** | **String** | |
|
||||||
|
**bio_links** | **Vec<String>** | |
|
||||||
|
**profile_pic_override** | **String** | |
|
||||||
|
**status_description** | **String** | |
|
||||||
|
**past_display_names** | **Vec<String>** | |
|
||||||
|
**has_email** | **bool** | |
|
||||||
|
**has_pending_email** | **bool** | |
|
||||||
|
**obfuscated_email** | **String** | |
|
||||||
|
**obfuscated_pending_email** | **String** | |
|
||||||
|
**email_verified** | **bool** | |
|
||||||
|
**has_birthday** | **bool** | |
|
||||||
|
**unsubscribe** | **bool** | |
|
||||||
|
**status_history** | **Vec<String>** | |
|
||||||
|
**status_first_time** | **bool** | |
|
||||||
|
**friends** | **Vec<String>** | |
|
||||||
|
**friend_group_names** | **Vec<String>** | |
|
||||||
|
**current_avatar_image_url** | **String** | |
|
||||||
|
**current_avatar_thumbnail_image_url** | **String** | |
|
||||||
|
**fallback_avatar** | **String** | |
|
||||||
|
**current_avatar** | **String** | |
|
||||||
|
**current_avatar_asset_url** | **String** | |
|
||||||
|
**account_deletion_date** | Option<[**String**](string.md)> | | [optional]
|
||||||
|
**accepted_tos_version** | **f32** | |
|
||||||
|
**steam_id** | **String** | |
|
||||||
|
**steam_details** | [**serde_json::Value**](.md) | |
|
||||||
|
**oculus_id** | **String** | |
|
||||||
|
**has_logged_in_from_client** | **bool** | |
|
||||||
|
**home_location** | **String** | |
|
||||||
|
**two_factor_auth_enabled** | **bool** | |
|
||||||
|
**state** | [**crate::models::UserState**](UserState.md) | |
|
||||||
|
**tags** | **Vec<String>** | |
|
||||||
|
**developer_type** | [**crate::models::DeveloperType**](DeveloperType.md) | |
|
||||||
|
**last_login** | **String** | |
|
||||||
|
**last_platform** | **String** | |
|
||||||
|
**allow_avatar_copying** | **bool** | |
|
||||||
|
**status** | [**crate::models::UserStatus**](UserStatus.md) | |
|
||||||
|
**date_joined** | [**String**](string.md) | | [readonly]
|
||||||
|
**is_friend** | **bool** | | [default to false]
|
||||||
|
**friend_key** | **String** | |
|
||||||
|
**online_friends** | **Vec<String>** | |
|
||||||
|
**active_friends** | **Vec<String>** | |
|
||||||
|
**offline_friends** | **Vec<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)
|
||||||
|
|
||||||
|
|
10
docs/DeploymentGroup.md
Normal file
10
docs/DeploymentGroup.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# DeploymentGroup
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
10
docs/DeveloperType.md
Normal file
10
docs/DeveloperType.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# DeveloperType
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
11
docs/Error.md
Normal file
11
docs/Error.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# Error
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**error** | Option<[**crate::models::Response**](Response.md)> | | [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)
|
||||||
|
|
||||||
|
|
17
docs/File.md
Normal file
17
docs/File.md
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# File
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**id** | **String** | |
|
||||||
|
**name** | **String** | |
|
||||||
|
**owner_id** | **String** | | [readonly]
|
||||||
|
**mime_type** | [**crate::models::MimeType**](MIMEType.md) | |
|
||||||
|
**extension** | **String** | |
|
||||||
|
**tags** | **Vec<String>** | |
|
||||||
|
**versions** | [**Vec<crate::models::FileVersion>**](FileVersion.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)
|
||||||
|
|
||||||
|
|
17
docs/FileData.md
Normal file
17
docs/FileData.md
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# FileData
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**file_name** | **String** | |
|
||||||
|
**url** | **String** | |
|
||||||
|
**md5** | **String** | |
|
||||||
|
**size_in_bytes** | **f32** | |
|
||||||
|
**status** | [**crate::models::FileStatus**](FileStatus.md) | |
|
||||||
|
**category** | **String** | | [readonly]
|
||||||
|
**upload_id** | **String** | | [default to ]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
10
docs/FileStatus.md
Normal file
10
docs/FileStatus.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# FileStatus
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
17
docs/FileVersion.md
Normal file
17
docs/FileVersion.md
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# FileVersion
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**version** | **f32** | Incremental version counter, can only be increased. | [default to 0]
|
||||||
|
**status** | [**crate::models::FileStatus**](FileStatus.md) | |
|
||||||
|
**created_at** | **String** | | [readonly]
|
||||||
|
**file** | Option<[**crate::models::FileData**](FileData.md)> | | [optional]
|
||||||
|
**delta** | Option<[**crate::models::FileData**](FileData.md)> | | [optional]
|
||||||
|
**signature** | Option<[**crate::models::FileData**](FileData.md)> | | [optional]
|
||||||
|
**deleted** | Option<**bool**> | Usually only present if `true` | [optional][default to true]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
331
docs/FilesApi.md
Normal file
331
docs/FilesApi.md
Normal file
@ -0,0 +1,331 @@
|
|||||||
|
# \FilesApi
|
||||||
|
|
||||||
|
All URIs are relative to *https://api.vrchat.cloud/api/1*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**create_file**](FilesApi.md#create_file) | **POST** /file | Create File
|
||||||
|
[**create_file_version**](FilesApi.md#create_file_version) | **POST** /file/{fileId} | Create File Version
|
||||||
|
[**delete_file**](FilesApi.md#delete_file) | **DELETE** /file/{fileId} | Delete File
|
||||||
|
[**delete_file_version**](FilesApi.md#delete_file_version) | **DELETE** /file/{fileId}/{versionId} | Delete File Version
|
||||||
|
[**download_file_version**](FilesApi.md#download_file_version) | **GET** /file/{fileId}/{versionId} | Download File Version
|
||||||
|
[**finish_file_data_upload**](FilesApi.md#finish_file_data_upload) | **PUT** /file/{fileId}/{versionId}/{fileType}/finish | Finish FileData Upload
|
||||||
|
[**get_file**](FilesApi.md#get_file) | **GET** /file/{fileId} | Show File
|
||||||
|
[**get_file_data_upload_status**](FilesApi.md#get_file_data_upload_status) | **GET** /file/{fileId}/{versionId}/{fileType}/status | Check FileData Upload Status
|
||||||
|
[**get_files**](FilesApi.md#get_files) | **GET** /files | List Files
|
||||||
|
[**start_file_data_upload**](FilesApi.md#start_file_data_upload) | **PUT** /file/{fileId}/{versionId}/{fileType}/start | Start FileData Upload
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## create_file
|
||||||
|
|
||||||
|
> crate::models::File create_file(inline_object3)
|
||||||
|
Create File
|
||||||
|
|
||||||
|
Creates a new File object
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**inline_object3** | Option<[**InlineObject3**](InlineObject3.md)> | | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**crate::models::File**](File.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **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)
|
||||||
|
|
||||||
|
|
||||||
|
## create_file_version
|
||||||
|
|
||||||
|
> crate::models::File create_file_version(file_id)
|
||||||
|
Create File Version
|
||||||
|
|
||||||
|
Creates a new FileVersion. Once a Version has been created, proceed to the `/file/{fileId}/{versionId}/file/start` endpoint to start a file upload.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**file_id** | **String** | | [required] |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**crate::models::File**](File.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)
|
||||||
|
|
||||||
|
|
||||||
|
## delete_file
|
||||||
|
|
||||||
|
> crate::models::Success delete_file(file_id)
|
||||||
|
Delete File
|
||||||
|
|
||||||
|
Deletes a File object.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**file_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)
|
||||||
|
|
||||||
|
|
||||||
|
## delete_file_version
|
||||||
|
|
||||||
|
> crate::models::File delete_file_version(file_id, version_id)
|
||||||
|
Delete File Version
|
||||||
|
|
||||||
|
Delete a specific version of a file. You can only delete the latest version.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**file_id** | **String** | | [required] |
|
||||||
|
**version_id** | **i32** | | [required] |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**crate::models::File**](File.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)
|
||||||
|
|
||||||
|
|
||||||
|
## download_file_version
|
||||||
|
|
||||||
|
> download_file_version(file_id, version_id)
|
||||||
|
Download File Version
|
||||||
|
|
||||||
|
Downloads the file with the provided version number. **Version Note:** Version 0 is always when the file was created. The real data is usually always located in version 1 and up. **Extension Note:** Files are not guaranteed to have a file extensions. UnityPackage files tends to have it, images through this endpoint do not. You are responsible for appending file extension from the `extension` field when neccesary.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**file_id** | **String** | | [required] |
|
||||||
|
**version_id** | **i32** | | [required] |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[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)
|
||||||
|
|
||||||
|
|
||||||
|
## finish_file_data_upload
|
||||||
|
|
||||||
|
> crate::models::File finish_file_data_upload(file_id, version_id, file_type, inline_object4)
|
||||||
|
Finish FileData Upload
|
||||||
|
|
||||||
|
Finish an upload of a FileData. This will mark it as \"complete\". After uploading the `file` for Avatars and Worlds you then have to upload a `signature` file.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**file_id** | **String** | | [required] |
|
||||||
|
**version_id** | **i32** | | [required] |
|
||||||
|
**file_type** | **String** | | [required] |
|
||||||
|
**inline_object4** | Option<[**InlineObject4**](InlineObject4.md)> | | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**crate::models::File**](File.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **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)
|
||||||
|
|
||||||
|
|
||||||
|
## get_file
|
||||||
|
|
||||||
|
> crate::models::File get_file(file_id)
|
||||||
|
Show File
|
||||||
|
|
||||||
|
Shows general information about the \"File\" object. Each File can have several \"Version\"'s, and each Version can have multiple real files or \"Data\" blobs.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**file_id** | **String** | | [required] |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**crate::models::File**](File.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_file_data_upload_status
|
||||||
|
|
||||||
|
> crate::models::InlineResponse2004 get_file_data_upload_status(file_id, version_id, file_type)
|
||||||
|
Check FileData Upload Status
|
||||||
|
|
||||||
|
Retrieves the upload status for file upload. Can currently only be accessed when `status` is `waiting`. Trying to access it on a file version already uploaded currently times out.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**file_id** | **String** | | [required] |
|
||||||
|
**version_id** | **i32** | | [required] |
|
||||||
|
**file_type** | **String** | | [required] |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**crate::models::InlineResponse2004**](inline_response_200_4.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_files
|
||||||
|
|
||||||
|
> Vec<crate::models::File> get_files(tag, user_id, n, offset)
|
||||||
|
List Files
|
||||||
|
|
||||||
|
Returns a list of files
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**tag** | Option<**String**> | Tag, for example \"icon\" or \"gallery\", not included by default. | |
|
||||||
|
**user_id** | Option<**String**> | UserID, will always generate a 500 permission error. | |
|
||||||
|
**n** | Option<**i32**> | The number of objects to return. | |[default to 60]
|
||||||
|
**offset** | Option<**i32**> | A zero-based offset from the default object sorting from where search results start. | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Vec<crate::models::File>**](File.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)
|
||||||
|
|
||||||
|
|
||||||
|
## start_file_data_upload
|
||||||
|
|
||||||
|
> crate::models::InlineResponse2005 start_file_data_upload(file_id, version_id, file_type, part_number)
|
||||||
|
Start FileData Upload
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**file_id** | **String** | | [required] |
|
||||||
|
**version_id** | **i32** | | [required] |
|
||||||
|
**file_type** | **String** | | [required] |
|
||||||
|
**part_number** | **i32** | | [required] |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**crate::models::InlineResponse2005**](inline_response_200_5.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)
|
||||||
|
|
165
docs/FriendsApi.md
Normal file
165
docs/FriendsApi.md
Normal file
@ -0,0 +1,165 @@
|
|||||||
|
# \FriendsApi
|
||||||
|
|
||||||
|
All URIs are relative to *https://api.vrchat.cloud/api/1*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**delete_friend_request**](FriendsApi.md#delete_friend_request) | **DELETE** /user/{userId}/friendRequest | Delete Friend Request
|
||||||
|
[**friend**](FriendsApi.md#friend) | **POST** /user/{userId}/friendRequest | Send Friend Request
|
||||||
|
[**get_friend_status**](FriendsApi.md#get_friend_status) | **GET** /user/{userId}/friendStatus | Check Friend Status
|
||||||
|
[**get_friends**](FriendsApi.md#get_friends) | **GET** /auth/user/friends | List Friends
|
||||||
|
[**unfriend**](FriendsApi.md#unfriend) | **DELETE** /auth/user/friends/{userId} | Unfriend
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## delete_friend_request
|
||||||
|
|
||||||
|
> crate::models::Success delete_friend_request(user_id)
|
||||||
|
Delete Friend Request
|
||||||
|
|
||||||
|
Deletes an outgoing pending friend request to another user. To delete an incoming friend request, use the `deleteNotification` endpoint instead.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**user_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)
|
||||||
|
|
||||||
|
|
||||||
|
## friend
|
||||||
|
|
||||||
|
> crate::models::Notification friend(user_id)
|
||||||
|
Send Friend Request
|
||||||
|
|
||||||
|
Send a friend request to another user.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**user_id** | **String** | | [required] |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**crate::models::Notification**](Notification.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_friend_status
|
||||||
|
|
||||||
|
> crate::models::InlineResponse2003 get_friend_status(user_id)
|
||||||
|
Check Friend Status
|
||||||
|
|
||||||
|
Retrieve if the user is currently a friend with a given user, if they have an outgoing friend request, and if they have an incoming friend request. The proper way to receive and accept friend request is by checking if the user has an incoming `Notification` of type `friendRequest`, and then accepting that notification.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**user_id** | **String** | | [required] |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**crate::models::InlineResponse2003**](inline_response_200_3.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_friends
|
||||||
|
|
||||||
|
> Vec<crate::models::LimitedUser> get_friends(offset, n, offline)
|
||||||
|
List Friends
|
||||||
|
|
||||||
|
List information about friends.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**offset** | Option<**i32**> | A zero-based offset from the default object sorting from where search results start. | |
|
||||||
|
**n** | Option<**i32**> | The number of objects to return. | |[default to 60]
|
||||||
|
**offline** | Option<**bool**> | Returns *only* offline users if true, returns only online and active users if false | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Vec<crate::models::LimitedUser>**](LimitedUser.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)
|
||||||
|
|
||||||
|
|
||||||
|
## unfriend
|
||||||
|
|
||||||
|
> crate::models::Success unfriend(user_id)
|
||||||
|
Unfriend
|
||||||
|
|
||||||
|
Unfriend a user by ID.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**user_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)
|
||||||
|
|
11
docs/InlineObject.md
Normal file
11
docs/InlineObject.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# InlineObject
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**code** | **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)
|
||||||
|
|
||||||
|
|
11
docs/InlineObject1.md
Normal file
11
docs/InlineObject1.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# InlineObject1
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**code** | **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)
|
||||||
|
|
||||||
|
|
19
docs/InlineObject2.md
Normal file
19
docs/InlineObject2.md
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# InlineObject2
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**email** | Option<**String**> | | [optional]
|
||||||
|
**birthday** | Option<[**String**](string.md)> | | [optional]
|
||||||
|
**accepted_tos_version** | Option<**f32**> | | [optional]
|
||||||
|
**tags** | Option<**Vec<String>**> | | [optional]
|
||||||
|
**status** | Option<[**crate::models::UserStatus**](UserStatus.md)> | | [optional]
|
||||||
|
**status_description** | Option<**String**> | | [optional]
|
||||||
|
**bio** | Option<**String**> | | [optional]
|
||||||
|
**bio_links** | Option<**Vec<String>**> | | [optional]
|
||||||
|
**user_icon** | Option<**String**> | MUST be a valid VRChat /file/ url. | [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)
|
||||||
|
|
||||||
|
|
14
docs/InlineObject3.md
Normal file
14
docs/InlineObject3.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# InlineObject3
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**name** | **String** | |
|
||||||
|
**mime_type** | [**crate::models::MimeType**](MIMEType.md) | |
|
||||||
|
**extension** | **String** | |
|
||||||
|
**tags** | Option<**Vec<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)
|
||||||
|
|
||||||
|
|
13
docs/InlineObject4.md
Normal file
13
docs/InlineObject4.md
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# InlineObject4
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**etags** | Option<**Vec<String>**> | Array of ETags uploaded. | [optional]
|
||||||
|
**next_part_number** | **String** | Always a zero in string form, despite how many parts uploaded. | [default to NextPartNumber__0]
|
||||||
|
**max_parts** | **String** | Always a zero in string form, despite how many parts uploaded. | [default to MaxParts__0]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
12
docs/InlineResponse200.md
Normal file
12
docs/InlineResponse200.md
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# InlineResponse200
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**ok** | **bool** | |
|
||||||
|
**token** | **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)
|
||||||
|
|
||||||
|
|
11
docs/InlineResponse2001.md
Normal file
11
docs/InlineResponse2001.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# InlineResponse2001
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**verified** | **bool** | |
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
13
docs/InlineResponse2002.md
Normal file
13
docs/InlineResponse2002.md
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# InlineResponse2002
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**ok** | **bool** | |
|
||||||
|
**server_name** | **String** | |
|
||||||
|
**build_version_tag** | **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)
|
||||||
|
|
||||||
|
|
13
docs/InlineResponse2003.md
Normal file
13
docs/InlineResponse2003.md
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# InlineResponse2003
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**is_friend** | **bool** | | [default to false]
|
||||||
|
**outgoing_request** | **bool** | | [default to false]
|
||||||
|
**incoming_request** | **bool** | | [default to false]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
16
docs/InlineResponse2004.md
Normal file
16
docs/InlineResponse2004.md
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# InlineResponse2004
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**upload_id** | **String** | | [readonly]
|
||||||
|
**file_name** | **String** | | [readonly]
|
||||||
|
**next_part_number** | **f32** | | [readonly]
|
||||||
|
**max_parts** | **f32** | | [readonly]
|
||||||
|
**parts** | [**Vec<serde_json::Value>**](serde_json::Value.md) | | [readonly]
|
||||||
|
**etags** | [**Vec<serde_json::Value>**](serde_json::Value.md) | Unknown | [readonly]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
11
docs/InlineResponse2005.md
Normal file
11
docs/InlineResponse2005.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# InlineResponse2005
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**url** | **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)
|
||||||
|
|
||||||
|
|
11
docs/InlineResponse401.md
Normal file
11
docs/InlineResponse401.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# InlineResponse401
|
||||||
|
|
||||||
|
## 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)
|
||||||
|
|
||||||
|
|
26
docs/LimitedUser.md
Normal file
26
docs/LimitedUser.md
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# LimitedUser
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**id** | **String** | | [readonly]
|
||||||
|
**username** | **String** | |
|
||||||
|
**display_name** | **String** | |
|
||||||
|
**bio** | Option<**String**> | | [optional]
|
||||||
|
**user_icon** | **String** | |
|
||||||
|
**profile_pic_override** | **String** | |
|
||||||
|
**status_description** | **String** | |
|
||||||
|
**current_avatar_image_url** | **String** | |
|
||||||
|
**current_avatar_thumbnail_image_url** | **String** | |
|
||||||
|
**fallback_avatar** | **String** | |
|
||||||
|
**developer_type** | [**crate::models::DeveloperType**](DeveloperType.md) | |
|
||||||
|
**last_platform** | **String** | |
|
||||||
|
**status** | [**crate::models::UserStatus**](UserStatus.md) | |
|
||||||
|
**is_friend** | **bool** | |
|
||||||
|
**location** | **String** | |
|
||||||
|
**tags** | **Vec<String>** | Always empty |
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
29
docs/LimitedWorld.md
Normal file
29
docs/LimitedWorld.md
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
# LimitedWorld
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**author_id** | **String** | | [readonly]
|
||||||
|
**author_name** | **String** | |
|
||||||
|
**capacity** | **f32** | |
|
||||||
|
**created_at** | Option<[**String**](string.md)> | | [optional]
|
||||||
|
**favorites** | **f32** | |
|
||||||
|
**heat** | **f32** | |
|
||||||
|
**id** | **String** | |
|
||||||
|
**image_url** | **String** | |
|
||||||
|
**labs_publication_date** | Option<**String**> | | [optional]
|
||||||
|
**name** | **String** | |
|
||||||
|
**occupants** | Option<**f32**> | | [optional]
|
||||||
|
**organization** | **String** | |
|
||||||
|
**popularity** | **f32** | |
|
||||||
|
**publication_date** | **String** | |
|
||||||
|
**release_status** | [**crate::models::ReleaseStatus**](ReleaseStatus.md) | |
|
||||||
|
**tags** | **Vec<String>** | |
|
||||||
|
**thumbnail_image_url** | **String** | |
|
||||||
|
**unity_packages** | [**Vec<serde_json::Value>**](serde_json::Value.md) | |
|
||||||
|
**updated_at** | Option<[**String**](string.md)> | | [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)
|
||||||
|
|
||||||
|
|
10
docs/MimeType.md
Normal file
10
docs/MimeType.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# MimeType
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
18
docs/Notification.md
Normal file
18
docs/Notification.md
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Notification
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**id** | **String** | |
|
||||||
|
**sender_user_id** | **String** | | [readonly]
|
||||||
|
**sender_username** | **String** | |
|
||||||
|
**_type** | [**crate::models::NotificationType**](NotificationType.md) | |
|
||||||
|
**message** | **String** | |
|
||||||
|
**details** | **String** | **NOTICE:** This is not a JSON object, this is a json **encoded** object, meaning you have to json-de-encode to get the NotificationDetail object depending on the NotificationType. | [default to {}]
|
||||||
|
**seen** | **bool** | | [default to false]
|
||||||
|
**created_at** | **String** | | [readonly]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
10
docs/NotificationType.md
Normal file
10
docs/NotificationType.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# NotificationType
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
165
docs/NotificationsApi.md
Normal file
165
docs/NotificationsApi.md
Normal file
@ -0,0 +1,165 @@
|
|||||||
|
# \NotificationsApi
|
||||||
|
|
||||||
|
All URIs are relative to *https://api.vrchat.cloud/api/1*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**accept_friend_request**](NotificationsApi.md#accept_friend_request) | **PUT** /auth/user/notifications/{notificationId}/accept | Accept Friend Request
|
||||||
|
[**clear_notifications**](NotificationsApi.md#clear_notifications) | **PUT** /auth/user/notifications/clear | Clear All Notifications
|
||||||
|
[**delete_notification**](NotificationsApi.md#delete_notification) | **PUT** /auth/user/notifications/{notificationId}/hide | Delete Notification
|
||||||
|
[**get_notifications**](NotificationsApi.md#get_notifications) | **GET** /auth/user/notifications | List Notifications
|
||||||
|
[**mark_notification_as_read**](NotificationsApi.md#mark_notification_as_read) | **PUT** /auth/user/notifications/{notificationId}/see | Mark As Read
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## accept_friend_request
|
||||||
|
|
||||||
|
> crate::models::Success accept_friend_request(notification_id)
|
||||||
|
Accept Friend Request
|
||||||
|
|
||||||
|
Accept a friend request by notification `frq_` ID. Friend requests can be found using the NotificationsAPI `getNotifications` by filtering of type `friendRequest`.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**notification_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)
|
||||||
|
|
||||||
|
|
||||||
|
## clear_notifications
|
||||||
|
|
||||||
|
> crate::models::Success clear_notifications()
|
||||||
|
Clear All Notifications
|
||||||
|
|
||||||
|
Clear **all** notifications.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
|
### 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)
|
||||||
|
|
||||||
|
|
||||||
|
## delete_notification
|
||||||
|
|
||||||
|
> crate::models::Notification delete_notification(notification_id)
|
||||||
|
Delete Notification
|
||||||
|
|
||||||
|
Delete a notification.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**notification_id** | **String** | | [required] |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**crate::models::Notification**](Notification.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_notifications
|
||||||
|
|
||||||
|
> Vec<crate::models::Notification> get_notifications(_type, sent, hidden, after, n, offset)
|
||||||
|
List Notifications
|
||||||
|
|
||||||
|
Retrieve all of the current user's notifications.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**_type** | Option<**String**> | Only send notifications of this type (can use `all` for all). | |
|
||||||
|
**sent** | Option<**bool**> | Return notifications sent by the user. Must be false or omitted. | |
|
||||||
|
**hidden** | Option<**bool**> | Whether to return hidden or non-hidden notifications. True only allowed on type `friendRequest`. | |
|
||||||
|
**after** | Option<**String**> | Only return notifications sent after this Date. Ignored if type is `friendRequest`. | |
|
||||||
|
**n** | Option<**i32**> | The number of objects to return. | |[default to 60]
|
||||||
|
**offset** | Option<**i32**> | A zero-based offset from the default object sorting from where search results start. | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Vec<crate::models::Notification>**](Notification.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)
|
||||||
|
|
||||||
|
|
||||||
|
## mark_notification_as_read
|
||||||
|
|
||||||
|
> crate::models::Notification mark_notification_as_read(notification_id)
|
||||||
|
Mark As Read
|
||||||
|
|
||||||
|
Mark a notification as seen.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**notification_id** | **String** | | [required] |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**crate::models::Notification**](Notification.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)
|
||||||
|
|
10
docs/ReleaseStatus.md
Normal file
10
docs/ReleaseStatus.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# ReleaseStatus
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
12
docs/Response.md
Normal file
12
docs/Response.md
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Response
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**message** | **String** | |
|
||||||
|
**status_code** | **f32** | |
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
11
docs/Success.md
Normal file
11
docs/Success.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# Success
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**success** | Option<[**crate::models::Response**](Response.md)> | | [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)
|
||||||
|
|
||||||
|
|
120
docs/SystemApi.md
Normal file
120
docs/SystemApi.md
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
# \SystemApi
|
||||||
|
|
||||||
|
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_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_system_time**](SystemApi.md#get_system_time) | **GET** /time | Current System Time
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## get_config
|
||||||
|
|
||||||
|
> crate::models::Config get_config()
|
||||||
|
Fetch API Config
|
||||||
|
|
||||||
|
API config contains configuration that the clients needs to work properly. Currently the most important value here is `clientApiKey` which is used for all other API endpoints.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**crate::models::Config**](Config.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### 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_current_online_users
|
||||||
|
|
||||||
|
> i32 get_current_online_users()
|
||||||
|
Current Online Users
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**i32**
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **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)
|
||||||
|
|
||||||
|
|
||||||
|
## get_health
|
||||||
|
|
||||||
|
> crate::models::InlineResponse2002 get_health()
|
||||||
|
Check API Health
|
||||||
|
|
||||||
|
Gets the overall health status, the server name, and the current build version tag of the API.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**crate::models::InlineResponse2002**](inline_response_200_2.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### 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_system_time
|
||||||
|
|
||||||
|
> String get_system_time()
|
||||||
|
Current System Time
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**String**
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **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)
|
||||||
|
|
34
docs/User.md
Normal file
34
docs/User.md
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# User
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**id** | **String** | | [readonly]
|
||||||
|
**username** | **String** | |
|
||||||
|
**display_name** | **String** | |
|
||||||
|
**user_icon** | **String** | |
|
||||||
|
**bio** | **String** | |
|
||||||
|
**bio_links** | **Vec<String>** | |
|
||||||
|
**profile_pic_override** | **String** | |
|
||||||
|
**status_description** | **String** | |
|
||||||
|
**current_avatar_image_url** | **String** | |
|
||||||
|
**current_avatar_thumbnail_image_url** | **String** | |
|
||||||
|
**fallback_avatar** | **String** | |
|
||||||
|
**state** | [**crate::models::UserState**](UserState.md) | |
|
||||||
|
**tags** | **Vec<String>** | |
|
||||||
|
**developer_type** | [**crate::models::DeveloperType**](DeveloperType.md) | |
|
||||||
|
**last_login** | **String** | |
|
||||||
|
**last_platform** | **String** | |
|
||||||
|
**allow_avatar_copying** | **bool** | |
|
||||||
|
**status** | [**crate::models::UserStatus**](UserStatus.md) | |
|
||||||
|
**date_joined** | [**String**](string.md) | | [readonly]
|
||||||
|
**is_friend** | **bool** | |
|
||||||
|
**friend_key** | **String** | |
|
||||||
|
**world_id** | Option<**String**> | | [optional]
|
||||||
|
**instance_id** | Option<**String**> | | [optional]
|
||||||
|
**location** | 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)
|
||||||
|
|
||||||
|
|
10
docs/UserState.md
Normal file
10
docs/UserState.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# UserState
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
10
docs/UserStatus.md
Normal file
10
docs/UserStatus.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# UserStatus
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
170
docs/UsersApi.md
Normal file
170
docs/UsersApi.md
Normal file
@ -0,0 +1,170 @@
|
|||||||
|
# \UsersApi
|
||||||
|
|
||||||
|
All URIs are relative to *https://api.vrchat.cloud/api/1*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**get_user**](UsersApi.md#get_user) | **GET** /users/{userId} | Get User by ID
|
||||||
|
[**get_user_by_name**](UsersApi.md#get_user_by_name) | **GET** /users/{username}/name | Get User by Username
|
||||||
|
[**search_active_users**](UsersApi.md#search_active_users) | **GET** /users/active | Search Active Users
|
||||||
|
[**search_users**](UsersApi.md#search_users) | **GET** /users | Search All Users
|
||||||
|
[**update_user**](UsersApi.md#update_user) | **PUT** /users/{userId} | Update User Info
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## get_user
|
||||||
|
|
||||||
|
> crate::models::User get_user(user_id)
|
||||||
|
Get User by ID
|
||||||
|
|
||||||
|
Get public user information about a specific user using their ID.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**user_id** | **String** | | [required] |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**crate::models::User**](User.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_user_by_name
|
||||||
|
|
||||||
|
> crate::models::User get_user_by_name(username)
|
||||||
|
Get User by Username
|
||||||
|
|
||||||
|
Get public user information about a specific user using their name.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**username** | **String** | | [required] |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**crate::models::User**](User.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)
|
||||||
|
|
||||||
|
|
||||||
|
## search_active_users
|
||||||
|
|
||||||
|
> Vec<crate::models::LimitedUser> search_active_users(search, developer_type, offset, n)
|
||||||
|
Search Active Users
|
||||||
|
|
||||||
|
Search and list any Active users by text query. **Has been locked down and now always respond with \"Invalid Admin Credentials\".**
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**search** | **String** | Username to search for | [required] |
|
||||||
|
**developer_type** | Option<**String**> | Active user by developer type, none for normal users and internal for moderators | |
|
||||||
|
**offset** | Option<**i32**> | A zero-based offset from the default object sorting from where search results start. | |
|
||||||
|
**n** | Option<**i32**> | The number of objects to return. | |[default to 60]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Vec<crate::models::LimitedUser>**](LimitedUser.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)
|
||||||
|
|
||||||
|
|
||||||
|
## search_users
|
||||||
|
|
||||||
|
> Vec<crate::models::LimitedUser> search_users(search, developer_type, n, offset)
|
||||||
|
Search All Users
|
||||||
|
|
||||||
|
Search and list any users by text query
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**search** | Option<**String**> | Searches by `displayName`. Will return empty array if search query is empty or missing. | |
|
||||||
|
**developer_type** | Option<**String**> | Active user by developer type, none for normal users and internal for moderators | |
|
||||||
|
**n** | Option<**i32**> | The number of objects to return. | |[default to 60]
|
||||||
|
**offset** | Option<**i32**> | A zero-based offset from the default object sorting from where search results start. | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Vec<crate::models::LimitedUser>**](LimitedUser.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)
|
||||||
|
|
||||||
|
|
||||||
|
## update_user
|
||||||
|
|
||||||
|
> crate::models::CurrentUser update_user(user_id, inline_object2)
|
||||||
|
Update User Info
|
||||||
|
|
||||||
|
Update a users information such as the email and birthday.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**user_id** | **String** | | [required] |
|
||||||
|
**inline_object2** | Option<[**InlineObject2**](InlineObject2.md)> | | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**crate::models::CurrentUser**](CurrentUser.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **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)
|
||||||
|
|
54
docs/WorldsApi.md
Normal file
54
docs/WorldsApi.md
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
# \WorldsApi
|
||||||
|
|
||||||
|
All URIs are relative to *https://api.vrchat.cloud/api/1*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**search_worlds**](WorldsApi.md#search_worlds) | **GET** /worlds | Search all worlds
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## search_worlds
|
||||||
|
|
||||||
|
> Vec<crate::models::LimitedWorld> search_worlds(featured, sort, user, user_id, n, order, offset, search, tag, notag, release_status, max_unity_version, min_unity_version, max_asset_version, min_asset_version, platform)
|
||||||
|
Search all worlds
|
||||||
|
|
||||||
|
Search and list any worlds by text query
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Required | Notes
|
||||||
|
------------- | ------------- | ------------- | ------------- | -------------
|
||||||
|
**featured** | Option<**bool**> | is the world featured | |
|
||||||
|
**sort** | Option<**String**> | | |[default to order]
|
||||||
|
**user** | Option<**String**> | Set to `me` for searching own worlds | |
|
||||||
|
**user_id** | Option<**String**> | Filter by creator id, use `me` for only worlds owned by current user | |
|
||||||
|
**n** | Option<**i32**> | The number of objects to return. | |[default to 60]
|
||||||
|
**order** | Option<**String**> | | |[default to descending]
|
||||||
|
**offset** | Option<**i32**> | A zero-based offset from the default object sorting from where search results start. | |
|
||||||
|
**search** | Option<**String**> | Searches by `name`. Will return empty array if search query is empty or missing. | |
|
||||||
|
**tag** | Option<[**Vec<String>**](String.md)> | Filter by Tag | |
|
||||||
|
**notag** | Option<[**Vec<String>**](String.md)> | Tags to exclude | |
|
||||||
|
**release_status** | Option<**String**> | | |[default to hidden]
|
||||||
|
**max_unity_version** | Option<**String**> | Current unity version the game is using | |
|
||||||
|
**min_unity_version** | Option<**String**> | The min unity version the world support | |
|
||||||
|
**max_asset_version** | Option<**String**> | Current asset version the game is using | |
|
||||||
|
**min_asset_version** | Option<**String**> | The min asset version the world support | |
|
||||||
|
**platform** | Option<**String**> | The platform the world supports (usually standalonewindows) | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Vec<crate::models::LimitedWorld>**](LimitedWorld.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)
|
||||||
|
|
24
generate.sh
Executable file
24
generate.sh
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Generate Client
|
||||||
|
rm src/apis src/models docs -rf
|
||||||
|
openapi-generator-cli generate \
|
||||||
|
-g rust \
|
||||||
|
--additional-properties=packageName=vrchatapi \
|
||||||
|
--git-user-id=vrchatapi \
|
||||||
|
--git-repo-id=vrchatapi-rust \
|
||||||
|
-o . \
|
||||||
|
-i ../specification/openapi.yaml \
|
||||||
|
--http-user-agent="vrchatapi-rust"
|
||||||
|
|
||||||
|
# Remove unwanted lines from README
|
||||||
|
#sed -i '/Uncomment the following line to set a prefix/d' ./README.md
|
||||||
|
#sed -i '/apiKeyPrefix/d' ./README.md
|
||||||
|
#sed -i '/Uncomment the following line to set a prefix/d' ./docs/*.md
|
||||||
|
#sed -i '/apiKeyPrefix/d' ./docs/*.md
|
||||||
|
#sed -i 's/api.deleteUserById/api.getUser/g' ./README.md
|
||||||
|
#
|
||||||
|
#sed -i 's/@default false/@default true/g' ./src/ApiClient.js
|
||||||
|
#sed -i 's/enableCookies = false/enableCookies = true/g' ./src/ApiClient.js
|
||||||
|
|
||||||
|
#npm run build
|
58
git_push.sh
Normal file
58
git_push.sh
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
||||||
|
#
|
||||||
|
# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
|
||||||
|
|
||||||
|
git_user_id=$1
|
||||||
|
git_repo_id=$2
|
||||||
|
release_note=$3
|
||||||
|
git_host=$4
|
||||||
|
|
||||||
|
if [ "$git_host" = "" ]; then
|
||||||
|
git_host="github.com"
|
||||||
|
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$git_user_id" = "" ]; then
|
||||||
|
git_user_id="vrchatapi"
|
||||||
|
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$git_repo_id" = "" ]; then
|
||||||
|
git_repo_id="vrchatapi-rust"
|
||||||
|
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$release_note" = "" ]; then
|
||||||
|
release_note="Minor update"
|
||||||
|
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Initialize the local directory as a Git repository
|
||||||
|
git init
|
||||||
|
|
||||||
|
# Adds the files in the local repository and stages them for commit.
|
||||||
|
git add .
|
||||||
|
|
||||||
|
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
||||||
|
git commit -m "$release_note"
|
||||||
|
|
||||||
|
# Sets the new remote
|
||||||
|
git_remote=`git remote`
|
||||||
|
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||||
|
|
||||||
|
if [ "$GIT_TOKEN" = "" ]; then
|
||||||
|
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||||
|
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
||||||
|
else
|
||||||
|
git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
git pull origin master
|
||||||
|
|
||||||
|
# Pushes (Forces) the changes in the local repository up to the remote repository
|
||||||
|
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
||||||
|
git push origin master 2>&1 | grep -v 'To https'
|
||||||
|
|
7
openapitools.json
Normal file
7
openapitools.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
|
||||||
|
"spaces": 2,
|
||||||
|
"generator-cli": {
|
||||||
|
"version": "5.2.0"
|
||||||
|
}
|
||||||
|
}
|
233
src/apis/authentication_api.rs
Normal file
233
src/apis/authentication_api.rs
Normal file
@ -0,0 +1,233 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* 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 `delete_user_by_id`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum DeleteUserByIdError {
|
||||||
|
Status401(crate::models::InlineResponse401),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method `get_current_user`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum GetCurrentUserError {
|
||||||
|
Status401(crate::models::InlineResponse401),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method `logout`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum LogoutError {
|
||||||
|
Status401(crate::models::InlineResponse401),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method `verify2_fa`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum Verify2FaError {
|
||||||
|
Status401(crate::models::InlineResponse401),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method `verify_auth_token`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum VerifyAuthTokenError {
|
||||||
|
Status401(crate::models::InlineResponse401),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method `verify_recovery_code`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum VerifyRecoveryCodeError {
|
||||||
|
Status401(crate::models::InlineResponse401),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Deletes the account with given ID. Normal users only have permission to delete their own account. Account deletion is 14 days from this request, and will be cancelled if you do an authenticated request with the account afterwards. **VRC+ NOTE:** Despite the 14-days cooldown, any VRC+ subscription will be cancelled **immediately**. **METHOD NOTE:** Despite this being a Delete action, the method type required is PUT.
|
||||||
|
pub async fn delete_user_by_id(configuration: &configuration::Configuration, user_id: &str) -> Result<crate::models::CurrentUser, Error<DeleteUserByIdError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/user/{userId}/delete", configuration.base_path, userId=crate::apis::urlencode(user_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) = 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 local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<DeleteUserByIdError> = 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))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Login and/or Get user data from your VRChat account. If `Authorization` header is present then a new login session will be generated, and a new `auth` cookie is returned. **WARNING: Session Limit:** Each authentication with login credentials counts as a separate session, out of which you have a limited amount. Make sure to save and reuse the `auth` cookie whenever you can, and avoid sending the Authorization header unless strictly neccesary. While the exact number of simultaneous open sessions is secret, expect to **very fast** run into the rate-limit and be temporarily blocked from making new sessions until the old ones expire.
|
||||||
|
pub async fn get_current_user(configuration: &configuration::Configuration, ) -> Result<crate::models::CurrentUser, Error<GetCurrentUserError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/auth/user", 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_user_agent) = configuration.user_agent {
|
||||||
|
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
|
||||||
|
}
|
||||||
|
if let Some(ref local_var_auth_conf) = configuration.basic_auth {
|
||||||
|
local_var_req_builder = local_var_req_builder.basic_auth(local_var_auth_conf.0.to_owned(), local_var_auth_conf.1.to_owned());
|
||||||
|
};
|
||||||
|
|
||||||
|
let local_var_req = local_var_req_builder.build()?;
|
||||||
|
let local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<GetCurrentUserError> = 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))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Invalidates the auth cookie.
|
||||||
|
pub async fn logout(configuration: &configuration::Configuration, ) -> Result<crate::models::Success, Error<LogoutError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/logout", configuration.base_path);
|
||||||
|
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) = 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 local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<LogoutError> = 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))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Finishes the login sequence with a normal 2FA-generated code for accounts with 2FA-protection enabled.
|
||||||
|
pub async fn verify2_fa(configuration: &configuration::Configuration, inline_object: Option<crate::models::InlineObject>) -> Result<crate::models::InlineResponse2001, Error<Verify2FaError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/auth/twofactorauth/totp/verify", configuration.base_path);
|
||||||
|
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) = 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(&inline_object);
|
||||||
|
|
||||||
|
let local_var_req = local_var_req_builder.build()?;
|
||||||
|
let local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<Verify2FaError> = 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))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Verify whether the currently provided Auth Token is valid.
|
||||||
|
pub async fn verify_auth_token(configuration: &configuration::Configuration, ) -> Result<crate::models::InlineResponse200, Error<VerifyAuthTokenError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/auth", 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_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 local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<VerifyAuthTokenError> = 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))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Finishes the login sequence with an OTP (One Time Password) recovery code for accounts with 2FA-protection enabled.
|
||||||
|
pub async fn verify_recovery_code(configuration: &configuration::Configuration, inline_object1: Option<crate::models::InlineObject1>) -> Result<crate::models::InlineResponse2001, Error<VerifyRecoveryCodeError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/auth/twofactorauth/otp/verify", configuration.base_path);
|
||||||
|
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) = 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(&inline_object1);
|
||||||
|
|
||||||
|
let local_var_req = local_var_req_builder.build()?;
|
||||||
|
let local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<VerifyRecoveryCodeError> = 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))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
52
src/apis/configuration.rs
Normal file
52
src/apis/configuration.rs
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
use reqwest;
|
||||||
|
|
||||||
|
#[derive(Debug, Clone)]
|
||||||
|
pub struct Configuration {
|
||||||
|
pub base_path: String,
|
||||||
|
pub user_agent: Option<String>,
|
||||||
|
pub client: reqwest::Client,
|
||||||
|
pub basic_auth: Option<BasicAuth>,
|
||||||
|
pub oauth_access_token: Option<String>,
|
||||||
|
pub bearer_access_token: Option<String>,
|
||||||
|
pub api_key: Option<ApiKey>,
|
||||||
|
// TODO: take an oauth2 token source, similar to the go one
|
||||||
|
}
|
||||||
|
|
||||||
|
pub type BasicAuth = (String, Option<String>);
|
||||||
|
|
||||||
|
#[derive(Debug, Clone)]
|
||||||
|
pub struct ApiKey {
|
||||||
|
pub prefix: Option<String>,
|
||||||
|
pub key: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Configuration {
|
||||||
|
pub fn new() -> Configuration {
|
||||||
|
Configuration::default()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Default for Configuration {
|
||||||
|
fn default() -> Self {
|
||||||
|
Configuration {
|
||||||
|
base_path: "https://api.vrchat.cloud/api/1".to_owned(),
|
||||||
|
user_agent: Some("vrchatapi-rust".to_owned()),
|
||||||
|
client: reqwest::Client::new(),
|
||||||
|
basic_auth: None,
|
||||||
|
oauth_access_token: None,
|
||||||
|
bearer_access_token: None,
|
||||||
|
api_key: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
378
src/apis/files_api.rs
Normal file
378
src/apis/files_api.rs
Normal file
@ -0,0 +1,378 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* 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 `create_file`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum CreateFileError {
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method `create_file_version`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum CreateFileVersionError {
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method `delete_file`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum DeleteFileError {
|
||||||
|
Status404(crate::models::Error),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method `delete_file_version`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum DeleteFileVersionError {
|
||||||
|
Status400(crate::models::Error),
|
||||||
|
Status500(crate::models::Error),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method `download_file_version`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum DownloadFileVersionError {
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method `finish_file_data_upload`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum FinishFileDataUploadError {
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method `get_file`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum GetFileError {
|
||||||
|
Status404(crate::models::Error),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method `get_file_data_upload_status`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum GetFileDataUploadStatusError {
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method `get_files`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum GetFilesError {
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method `start_file_data_upload`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum StartFileDataUploadError {
|
||||||
|
Status400(crate::models::Error),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Creates a new File object
|
||||||
|
pub async fn create_file(configuration: &configuration::Configuration, inline_object3: Option<crate::models::InlineObject3>) -> Result<crate::models::File, Error<CreateFileError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/file", configuration.base_path);
|
||||||
|
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) = 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(&inline_object3);
|
||||||
|
|
||||||
|
let local_var_req = local_var_req_builder.build()?;
|
||||||
|
let local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<CreateFileError> = 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))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Creates a new FileVersion. Once a Version has been created, proceed to the `/file/{fileId}/{versionId}/file/start` endpoint to start a file upload.
|
||||||
|
pub async fn create_file_version(configuration: &configuration::Configuration, file_id: &str) -> Result<crate::models::File, Error<CreateFileVersionError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/file/{fileId}", configuration.base_path, fileId=crate::apis::urlencode(file_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) = 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 local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<CreateFileVersionError> = 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))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Deletes a File object.
|
||||||
|
pub async fn delete_file(configuration: &configuration::Configuration, file_id: &str) -> Result<crate::models::Success, Error<DeleteFileError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/file/{fileId}", configuration.base_path, fileId=crate::apis::urlencode(file_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) = 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 local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<DeleteFileError> = 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))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Delete a specific version of a file. You can only delete the latest version.
|
||||||
|
pub async fn delete_file_version(configuration: &configuration::Configuration, file_id: &str, version_id: i32) -> Result<crate::models::File, Error<DeleteFileVersionError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/file/{fileId}/{versionId}", configuration.base_path, fileId=crate::apis::urlencode(file_id), versionId=version_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) = 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 local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<DeleteFileVersionError> = 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))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Downloads the file with the provided version number. **Version Note:** Version 0 is always when the file was created. The real data is usually always located in version 1 and up. **Extension Note:** Files are not guaranteed to have a file extensions. UnityPackage files tends to have it, images through this endpoint do not. You are responsible for appending file extension from the `extension` field when neccesary.
|
||||||
|
pub async fn download_file_version(configuration: &configuration::Configuration, file_id: &str, version_id: i32) -> Result<(), Error<DownloadFileVersionError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/file/{fileId}/{versionId}", configuration.base_path, fileId=crate::apis::urlencode(file_id), versionId=version_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) = 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 local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
|
||||||
|
Ok(())
|
||||||
|
} else {
|
||||||
|
let local_var_entity: Option<DownloadFileVersionError> = 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))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Finish an upload of a FileData. This will mark it as \"complete\". After uploading the `file` for Avatars and Worlds you then have to upload a `signature` file.
|
||||||
|
pub async fn finish_file_data_upload(configuration: &configuration::Configuration, file_id: &str, version_id: i32, file_type: &str, inline_object4: Option<crate::models::InlineObject4>) -> Result<crate::models::File, Error<FinishFileDataUploadError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/file/{fileId}/{versionId}/{fileType}/finish", 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());
|
||||||
|
|
||||||
|
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());
|
||||||
|
}
|
||||||
|
local_var_req_builder = local_var_req_builder.json(&inline_object4);
|
||||||
|
|
||||||
|
let local_var_req = local_var_req_builder.build()?;
|
||||||
|
let local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<FinishFileDataUploadError> = 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))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Shows general information about the \"File\" object. Each File can have several \"Version\"'s, and each Version can have multiple real files or \"Data\" blobs.
|
||||||
|
pub async fn get_file(configuration: &configuration::Configuration, file_id: &str) -> Result<crate::models::File, Error<GetFileError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/file/{fileId}", configuration.base_path, fileId=crate::apis::urlencode(file_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) = 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 local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<GetFileError> = 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))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Retrieves the upload status for file upload. Can currently only be accessed when `status` is `waiting`. Trying to access it on a file version already uploaded currently times out.
|
||||||
|
pub async fn get_file_data_upload_status(configuration: &configuration::Configuration, file_id: &str, version_id: i32, file_type: &str) -> Result<crate::models::InlineResponse2004, Error<GetFileDataUploadStatusError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/file/{fileId}/{versionId}/{fileType}/status", 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::GET, local_var_uri_str.as_str());
|
||||||
|
|
||||||
|
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 local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<GetFileDataUploadStatusError> = 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 a list of files
|
||||||
|
pub async fn get_files(configuration: &configuration::Configuration, tag: Option<&str>, user_id: Option<&str>, n: Option<i32>, offset: Option<i32>) -> Result<Vec<crate::models::File>, Error<GetFilesError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/files", 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) = tag {
|
||||||
|
local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
|
||||||
|
}
|
||||||
|
if let Some(ref local_var_str) = user_id {
|
||||||
|
local_var_req_builder = local_var_req_builder.query(&[("userId", &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_str) = offset {
|
||||||
|
local_var_req_builder = local_var_req_builder.query(&[("offset", &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 local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<GetFilesError> = 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))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 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 async fn start_file_data_upload(configuration: &configuration::Configuration, file_id: &str, version_id: i32, file_type: &str, part_number: i32) -> Result<crate::models::InlineResponse2005, Error<StartFileDataUploadError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/file/{fileId}/{versionId}/{fileType}/start", 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());
|
||||||
|
|
||||||
|
local_var_req_builder = local_var_req_builder.query(&[("partNumber", &part_number.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 local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<StartFileDataUploadError> = 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))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
205
src/apis/friends_api.rs
Normal file
205
src/apis/friends_api.rs
Normal file
@ -0,0 +1,205 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* 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 `delete_friend_request`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum DeleteFriendRequestError {
|
||||||
|
Status401(crate::models::InlineResponse401),
|
||||||
|
Status404(crate::models::Error),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method `friend`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum FriendError {
|
||||||
|
Status401(crate::models::InlineResponse401),
|
||||||
|
Status404(crate::models::Error),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method `get_friend_status`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum GetFriendStatusError {
|
||||||
|
Status401(crate::models::InlineResponse401),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method `get_friends`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum GetFriendsError {
|
||||||
|
Status401(crate::models::InlineResponse401),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method `unfriend`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum UnfriendError {
|
||||||
|
Status400(crate::models::Error),
|
||||||
|
Status401(crate::models::InlineResponse401),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Deletes an outgoing pending friend request to another user. To delete an incoming friend request, use the `deleteNotification` endpoint instead.
|
||||||
|
pub async fn delete_friend_request(configuration: &configuration::Configuration, user_id: &str) -> Result<crate::models::Success, Error<DeleteFriendRequestError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/user/{userId}/friendRequest", configuration.base_path, userId=crate::apis::urlencode(user_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) = 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 local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<DeleteFriendRequestError> = 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))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Send a friend request to another user.
|
||||||
|
pub async fn friend(configuration: &configuration::Configuration, user_id: &str) -> Result<crate::models::Notification, Error<FriendError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/user/{userId}/friendRequest", configuration.base_path, userId=crate::apis::urlencode(user_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) = 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 local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<FriendError> = 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))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Retrieve if the user is currently a friend with a given user, if they have an outgoing friend request, and if they have an incoming friend request. The proper way to receive and accept friend request is by checking if the user has an incoming `Notification` of type `friendRequest`, and then accepting that notification.
|
||||||
|
pub async fn get_friend_status(configuration: &configuration::Configuration, user_id: &str) -> Result<crate::models::InlineResponse2003, Error<GetFriendStatusError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/user/{userId}/friendStatus", configuration.base_path, userId=crate::apis::urlencode(user_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) = 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 local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<GetFriendStatusError> = 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))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// List information about friends.
|
||||||
|
pub async fn get_friends(configuration: &configuration::Configuration, offset: Option<i32>, n: Option<i32>, offline: Option<bool>) -> Result<Vec<crate::models::LimitedUser>, Error<GetFriendsError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/auth/user/friends", 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) = 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_str) = offline {
|
||||||
|
local_var_req_builder = local_var_req_builder.query(&[("offline", &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 local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<GetFriendsError> = 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))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Unfriend a user by ID.
|
||||||
|
pub async fn unfriend(configuration: &configuration::Configuration, user_id: &str) -> Result<crate::models::Success, Error<UnfriendError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/auth/user/friends/{userId}", configuration.base_path, userId=crate::apis::urlencode(user_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) = 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 local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<UnfriendError> = 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))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
72
src/apis/mod.rs
Normal file
72
src/apis/mod.rs
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
use std::error;
|
||||||
|
use std::fmt;
|
||||||
|
|
||||||
|
#[derive(Debug, Clone)]
|
||||||
|
pub struct ResponseContent<T> {
|
||||||
|
pub status: reqwest::StatusCode,
|
||||||
|
pub content: String,
|
||||||
|
pub entity: Option<T>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub enum Error<T> {
|
||||||
|
Reqwest(reqwest::Error),
|
||||||
|
Serde(serde_json::Error),
|
||||||
|
Io(std::io::Error),
|
||||||
|
ResponseError(ResponseContent<T>),
|
||||||
|
}
|
||||||
|
|
||||||
|
impl <T> fmt::Display for Error<T> {
|
||||||
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
|
let (module, e) = match self {
|
||||||
|
Error::Reqwest(e) => ("reqwest", e.to_string()),
|
||||||
|
Error::Serde(e) => ("serde", e.to_string()),
|
||||||
|
Error::Io(e) => ("IO", e.to_string()),
|
||||||
|
Error::ResponseError(e) => ("response", format!("status code {}", e.status)),
|
||||||
|
};
|
||||||
|
write!(f, "error in {}: {}", module, e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl <T: fmt::Debug> error::Error for Error<T> {
|
||||||
|
fn source(&self) -> Option<&(dyn error::Error + 'static)> {
|
||||||
|
Some(match self {
|
||||||
|
Error::Reqwest(e) => e,
|
||||||
|
Error::Serde(e) => e,
|
||||||
|
Error::Io(e) => e,
|
||||||
|
Error::ResponseError(_) => return None,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl <T> From<reqwest::Error> for Error<T> {
|
||||||
|
fn from(e: reqwest::Error) -> Self {
|
||||||
|
Error::Reqwest(e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl <T> From<serde_json::Error> for Error<T> {
|
||||||
|
fn from(e: serde_json::Error) -> Self {
|
||||||
|
Error::Serde(e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl <T> From<std::io::Error> for Error<T> {
|
||||||
|
fn from(e: std::io::Error) -> Self {
|
||||||
|
Error::Io(e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn urlencode<T: AsRef<str>>(s: T) -> String {
|
||||||
|
::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect()
|
||||||
|
}
|
||||||
|
|
||||||
|
pub mod authentication_api;
|
||||||
|
pub mod files_api;
|
||||||
|
pub mod friends_api;
|
||||||
|
pub mod notifications_api;
|
||||||
|
pub mod system_api;
|
||||||
|
pub mod users_api;
|
||||||
|
pub mod worlds_api;
|
||||||
|
|
||||||
|
pub mod configuration;
|
212
src/apis/notifications_api.rs
Normal file
212
src/apis/notifications_api.rs
Normal file
@ -0,0 +1,212 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* 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 `accept_friend_request`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum AcceptFriendRequestError {
|
||||||
|
Status401(crate::models::InlineResponse401),
|
||||||
|
Status404(crate::models::Error),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method `clear_notifications`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum ClearNotificationsError {
|
||||||
|
Status401(crate::models::InlineResponse401),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method `delete_notification`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum DeleteNotificationError {
|
||||||
|
Status401(crate::models::InlineResponse401),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method `get_notifications`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum GetNotificationsError {
|
||||||
|
Status401(crate::models::InlineResponse401),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method `mark_notification_as_read`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum MarkNotificationAsReadError {
|
||||||
|
Status401(crate::models::InlineResponse401),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Accept a friend request by notification `frq_` ID. Friend requests can be found using the NotificationsAPI `getNotifications` by filtering of type `friendRequest`.
|
||||||
|
pub async fn accept_friend_request(configuration: &configuration::Configuration, notification_id: &str) -> Result<crate::models::Success, Error<AcceptFriendRequestError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/auth/user/notifications/{notificationId}/accept", configuration.base_path, notificationId=crate::apis::urlencode(notification_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) = 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 local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<AcceptFriendRequestError> = 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))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Clear **all** notifications.
|
||||||
|
pub async fn clear_notifications(configuration: &configuration::Configuration, ) -> Result<crate::models::Success, Error<ClearNotificationsError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/auth/user/notifications/clear", configuration.base_path);
|
||||||
|
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) = 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 local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<ClearNotificationsError> = 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))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Delete a notification.
|
||||||
|
pub async fn delete_notification(configuration: &configuration::Configuration, notification_id: &str) -> Result<crate::models::Notification, Error<DeleteNotificationError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/auth/user/notifications/{notificationId}/hide", configuration.base_path, notificationId=crate::apis::urlencode(notification_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) = 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 local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<DeleteNotificationError> = 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))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Retrieve all of the current user's notifications.
|
||||||
|
pub async fn get_notifications(configuration: &configuration::Configuration, _type: Option<&str>, sent: Option<bool>, hidden: Option<bool>, after: Option<&str>, n: Option<i32>, offset: Option<i32>) -> Result<Vec<crate::models::Notification>, Error<GetNotificationsError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/auth/user/notifications", 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) = _type {
|
||||||
|
local_var_req_builder = local_var_req_builder.query(&[("type", &local_var_str.to_string())]);
|
||||||
|
}
|
||||||
|
if let Some(ref local_var_str) = sent {
|
||||||
|
local_var_req_builder = local_var_req_builder.query(&[("sent", &local_var_str.to_string())]);
|
||||||
|
}
|
||||||
|
if let Some(ref local_var_str) = hidden {
|
||||||
|
local_var_req_builder = local_var_req_builder.query(&[("hidden", &local_var_str.to_string())]);
|
||||||
|
}
|
||||||
|
if let Some(ref local_var_str) = after {
|
||||||
|
local_var_req_builder = local_var_req_builder.query(&[("after", &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_str) = offset {
|
||||||
|
local_var_req_builder = local_var_req_builder.query(&[("offset", &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 local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<GetNotificationsError> = 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))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Mark a notification as seen.
|
||||||
|
pub async fn mark_notification_as_read(configuration: &configuration::Configuration, notification_id: &str) -> Result<crate::models::Notification, Error<MarkNotificationAsReadError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/auth/user/notifications/{notificationId}/see", configuration.base_path, notificationId=crate::apis::urlencode(notification_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) = 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 local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<MarkNotificationAsReadError> = 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))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
154
src/apis/system_api.rs
Normal file
154
src/apis/system_api.rs
Normal file
@ -0,0 +1,154 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* 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_config`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum GetConfigError {
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method `get_current_online_users`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum GetCurrentOnlineUsersError {
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method `get_health`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum GetHealthError {
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method `get_system_time`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum GetSystemTimeError {
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// API config contains configuration that the clients needs to work properly. Currently the most important value here is `clientApiKey` which is used for all other API endpoints.
|
||||||
|
pub async fn get_config(configuration: &configuration::Configuration, ) -> Result<crate::models::Config, Error<GetConfigError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/config", 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_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 local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<GetConfigError> = 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 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 async fn get_current_online_users(configuration: &configuration::Configuration, ) -> Result<i32, Error<GetCurrentOnlineUsersError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/visits", 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_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 local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<GetCurrentOnlineUsersError> = 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))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Gets the overall health status, the server name, and the current build version tag of the API.
|
||||||
|
pub async fn get_health(configuration: &configuration::Configuration, ) -> Result<crate::models::InlineResponse2002, Error<GetHealthError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/health", 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_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 local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<GetHealthError> = 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 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 async fn get_system_time(configuration: &configuration::Configuration, ) -> Result<String, Error<GetSystemTimeError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/time", 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_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 local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<GetSystemTimeError> = 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))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
215
src/apis/users_api.rs
Normal file
215
src/apis/users_api.rs
Normal file
@ -0,0 +1,215 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* 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_user`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum GetUserError {
|
||||||
|
Status401(crate::models::InlineResponse401),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method `get_user_by_name`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum GetUserByNameError {
|
||||||
|
Status401(crate::models::InlineResponse401),
|
||||||
|
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::InlineResponse401),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method `search_users`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum SearchUsersError {
|
||||||
|
Status401(crate::models::InlineResponse401),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
/// struct for typed errors of method `update_user`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum UpdateUserError {
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Get public user information about a specific user using their ID.
|
||||||
|
pub async fn get_user(configuration: &configuration::Configuration, user_id: &str) -> Result<crate::models::User, Error<GetUserError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/users/{userId}", configuration.base_path, userId=crate::apis::urlencode(user_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) = 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 local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<GetUserError> = 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))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Get public user information about a specific user using their name.
|
||||||
|
pub async fn get_user_by_name(configuration: &configuration::Configuration, username: &str) -> Result<crate::models::User, Error<GetUserByNameError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/users/{username}/name", configuration.base_path, username=crate::apis::urlencode(username));
|
||||||
|
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) = 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 local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<GetUserByNameError> = 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 Active users by text query. **Has been locked down and now always respond with \"Invalid Admin Credentials\".**
|
||||||
|
pub async 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 local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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 async 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>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/users", 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) = search {
|
||||||
|
local_var_req_builder = local_var_req_builder.query(&[("search", &local_var_str.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) = n {
|
||||||
|
local_var_req_builder = local_var_req_builder.query(&[("n", &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_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 local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<SearchUsersError> = 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))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Update a users information such as the email and birthday.
|
||||||
|
pub async fn update_user(configuration: &configuration::Configuration, user_id: &str, inline_object2: Option<crate::models::InlineObject2>) -> Result<crate::models::CurrentUser, Error<UpdateUserError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/users/{userId}", configuration.base_path, userId=crate::apis::urlencode(user_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) = 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(&inline_object2);
|
||||||
|
|
||||||
|
let local_var_req = local_var_req_builder.build()?;
|
||||||
|
let local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<UpdateUserError> = 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))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
101
src/apis/worlds_api.rs
Normal file
101
src/apis/worlds_api.rs
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* 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 `search_worlds`
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum SearchWorldsError {
|
||||||
|
Status401(crate::models::InlineResponse401),
|
||||||
|
UnknownValue(serde_json::Value),
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Search and list any worlds by text query
|
||||||
|
pub async fn search_worlds(configuration: &configuration::Configuration, featured: Option<bool>, sort: Option<&str>, user: Option<&str>, user_id: Option<&str>, n: Option<i32>, order: Option<&str>, offset: Option<i32>, search: Option<&str>, tag: Option<Vec<String>>, notag: Option<Vec<String>>, release_status: Option<&str>, max_unity_version: Option<&str>, min_unity_version: Option<&str>, max_asset_version: Option<&str>, min_asset_version: Option<&str>, platform: Option<&str>) -> Result<Vec<crate::models::LimitedWorld>, Error<SearchWorldsError>> {
|
||||||
|
|
||||||
|
let local_var_client = &configuration.client;
|
||||||
|
|
||||||
|
let local_var_uri_str = format!("{}/worlds", 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) = featured {
|
||||||
|
local_var_req_builder = local_var_req_builder.query(&[("featured", &local_var_str.to_string())]);
|
||||||
|
}
|
||||||
|
if let Some(ref local_var_str) = sort {
|
||||||
|
local_var_req_builder = local_var_req_builder.query(&[("sort", &local_var_str.to_string())]);
|
||||||
|
}
|
||||||
|
if let Some(ref local_var_str) = user {
|
||||||
|
local_var_req_builder = local_var_req_builder.query(&[("user", &local_var_str.to_string())]);
|
||||||
|
}
|
||||||
|
if let Some(ref local_var_str) = user_id {
|
||||||
|
local_var_req_builder = local_var_req_builder.query(&[("userId", &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_str) = order {
|
||||||
|
local_var_req_builder = local_var_req_builder.query(&[("order", &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) = search {
|
||||||
|
local_var_req_builder = local_var_req_builder.query(&[("search", &local_var_str.to_string())]);
|
||||||
|
}
|
||||||
|
if let Some(ref local_var_str) = tag {
|
||||||
|
local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.into_iter().map(|p| p.to_string()).collect::<Vec<String>>().join(",").to_string())]);
|
||||||
|
}
|
||||||
|
if let Some(ref local_var_str) = notag {
|
||||||
|
local_var_req_builder = local_var_req_builder.query(&[("notag", &local_var_str.into_iter().map(|p| p.to_string()).collect::<Vec<String>>().join(",").to_string())]);
|
||||||
|
}
|
||||||
|
if let Some(ref local_var_str) = release_status {
|
||||||
|
local_var_req_builder = local_var_req_builder.query(&[("releaseStatus", &local_var_str.to_string())]);
|
||||||
|
}
|
||||||
|
if let Some(ref local_var_str) = max_unity_version {
|
||||||
|
local_var_req_builder = local_var_req_builder.query(&[("maxUnityVersion", &local_var_str.to_string())]);
|
||||||
|
}
|
||||||
|
if let Some(ref local_var_str) = min_unity_version {
|
||||||
|
local_var_req_builder = local_var_req_builder.query(&[("minUnityVersion", &local_var_str.to_string())]);
|
||||||
|
}
|
||||||
|
if let Some(ref local_var_str) = max_asset_version {
|
||||||
|
local_var_req_builder = local_var_req_builder.query(&[("maxAssetVersion", &local_var_str.to_string())]);
|
||||||
|
}
|
||||||
|
if let Some(ref local_var_str) = min_asset_version {
|
||||||
|
local_var_req_builder = local_var_req_builder.query(&[("minAssetVersion", &local_var_str.to_string())]);
|
||||||
|
}
|
||||||
|
if let Some(ref local_var_str) = platform {
|
||||||
|
local_var_req_builder = local_var_req_builder.query(&[("platform", &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 local_var_resp = local_var_client.execute(local_var_req).await?;
|
||||||
|
|
||||||
|
let local_var_status = local_var_resp.status();
|
||||||
|
let local_var_content = local_var_resp.text().await?;
|
||||||
|
|
||||||
|
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<SearchWorldsError> = 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))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
10
src/lib.rs
Normal file
10
src/lib.rs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#[macro_use]
|
||||||
|
extern crate serde_derive;
|
||||||
|
|
||||||
|
extern crate serde;
|
||||||
|
extern crate serde_json;
|
||||||
|
extern crate url;
|
||||||
|
extern crate reqwest;
|
||||||
|
|
||||||
|
pub mod apis;
|
||||||
|
pub mod models;
|
317
src/models/config.rs
Normal file
317
src/models/config.rs
Normal file
@ -0,0 +1,317 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct Config {
|
||||||
|
/// VRChat's office address
|
||||||
|
#[serde(rename = "address")]
|
||||||
|
pub address: String,
|
||||||
|
/// PSA, Public Announcements
|
||||||
|
#[serde(rename = "announcements")]
|
||||||
|
pub announcements: Vec<crate::models::ConfigAnnouncements>,
|
||||||
|
/// apiKey to be used for all other requests
|
||||||
|
#[serde(rename = "apiKey")]
|
||||||
|
pub api_key: String,
|
||||||
|
/// Game name
|
||||||
|
#[serde(rename = "appName")]
|
||||||
|
pub app_name: String,
|
||||||
|
/// Build tag of the API server
|
||||||
|
#[serde(rename = "buildVersionTag")]
|
||||||
|
pub build_version_tag: String,
|
||||||
|
/// apiKey to be used for all other requests
|
||||||
|
#[serde(rename = "clientApiKey")]
|
||||||
|
pub client_api_key: String,
|
||||||
|
/// Unknown
|
||||||
|
#[serde(rename = "clientBPSCeiling", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub client_bps_ceiling: Option<f32>,
|
||||||
|
/// Unknown
|
||||||
|
#[serde(rename = "clientDisconnectTimeout", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub client_disconnect_timeout: Option<f32>,
|
||||||
|
/// Unknown
|
||||||
|
#[serde(rename = "clientReservedPlayerBPS", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub client_reserved_player_bps: Option<f32>,
|
||||||
|
/// Unknown
|
||||||
|
#[serde(rename = "clientSentCountAllowance", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub client_sent_count_allowance: Option<f32>,
|
||||||
|
/// VRChat's contact email
|
||||||
|
#[serde(rename = "contactEmail")]
|
||||||
|
pub contact_email: String,
|
||||||
|
/// VRChat's copyright-issues-related email
|
||||||
|
#[serde(rename = "copyrightEmail")]
|
||||||
|
pub copyright_email: String,
|
||||||
|
/// Current version number of the Terms of Service
|
||||||
|
#[serde(rename = "currentTOSVersion")]
|
||||||
|
pub current_tos_version: f32,
|
||||||
|
#[serde(rename = "defaultAvatar")]
|
||||||
|
pub default_avatar: String,
|
||||||
|
#[serde(rename = "deploymentGroup")]
|
||||||
|
pub deployment_group: crate::models::DeploymentGroup,
|
||||||
|
/// Version number for game development build
|
||||||
|
#[serde(rename = "devAppVersionStandalone")]
|
||||||
|
pub dev_app_version_standalone: String,
|
||||||
|
/// Developer Download link
|
||||||
|
#[serde(rename = "devDownloadLinkWindows")]
|
||||||
|
pub dev_download_link_windows: String,
|
||||||
|
/// Link to download the development SDK, use downloadUrls instead
|
||||||
|
#[serde(rename = "devSdkUrl")]
|
||||||
|
pub dev_sdk_url: String,
|
||||||
|
/// Version of the development SDK
|
||||||
|
#[serde(rename = "devSdkVersion")]
|
||||||
|
pub dev_sdk_version: String,
|
||||||
|
/// Version number for server development build
|
||||||
|
#[serde(rename = "devServerVersionStandalone")]
|
||||||
|
pub dev_server_version_standalone: String,
|
||||||
|
/// Toggles if copying avatars should be disabled
|
||||||
|
#[serde(rename = "disableAvatarCopying")]
|
||||||
|
pub disable_avatar_copying: bool,
|
||||||
|
/// Toggles if avatar gating should be disabled. Avatar gating restricts uploading of avatars to people with the `system_avatar_access` Tag or `admin_avatar_access` Tag
|
||||||
|
#[serde(rename = "disableAvatarGating")]
|
||||||
|
pub disable_avatar_gating: bool,
|
||||||
|
/// Toggles if the Community Labs should be disabled
|
||||||
|
#[serde(rename = "disableCommunityLabs")]
|
||||||
|
pub disable_community_labs: bool,
|
||||||
|
/// Toggles if promotion out of Community Labs should be disabled
|
||||||
|
#[serde(rename = "disableCommunityLabsPromotion")]
|
||||||
|
pub disable_community_labs_promotion: bool,
|
||||||
|
/// Unknown
|
||||||
|
#[serde(rename = "disableEmail", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub disable_email: Option<bool>,
|
||||||
|
/// Toggles if Analytics should be disabled (this sreportedly not used in the Client)
|
||||||
|
#[serde(rename = "disableEventStream")]
|
||||||
|
pub disable_event_stream: bool,
|
||||||
|
/// Toggles if feedback gating should be disabled. Feedback gating restricts submission of feedback (reporting a World or User) to people with the `system_feedback_access` Tag.
|
||||||
|
#[serde(rename = "disableFeedbackGating")]
|
||||||
|
pub disable_feedback_gating: bool,
|
||||||
|
/// Unknown
|
||||||
|
#[serde(rename = "disableHello", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub disable_hello: Option<bool>,
|
||||||
|
/// Toggles if new user account registration should be disabled
|
||||||
|
#[serde(rename = "disableRegistration")]
|
||||||
|
pub disable_registration: bool,
|
||||||
|
/// Toggles if Steam Networking should be disabled. VRChat these days uses Photon Unity Networking (PUN) instead.
|
||||||
|
#[serde(rename = "disableSteamNetworking")]
|
||||||
|
pub disable_steam_networking: bool,
|
||||||
|
/// Toggles if 2FA should be disabled.
|
||||||
|
#[serde(rename = "disableTwoFactorAuth")]
|
||||||
|
pub disable_two_factor_auth: bool,
|
||||||
|
/// Toggles if Udon should be universally disabled in-game.
|
||||||
|
#[serde(rename = "disableUdon")]
|
||||||
|
pub disable_udon: bool,
|
||||||
|
/// Toggles if account upgrading \"linking with Steam/Oculus\" should be disabled.
|
||||||
|
#[serde(rename = "disableUpgradeAccount")]
|
||||||
|
pub disable_upgrade_account: bool,
|
||||||
|
/// Download link for game on the Oculus Rift website.
|
||||||
|
#[serde(rename = "downloadLinkWindows")]
|
||||||
|
pub download_link_windows: String,
|
||||||
|
#[serde(rename = "downloadUrls")]
|
||||||
|
pub download_urls: Box<crate::models::ConfigDownloadUrls>,
|
||||||
|
/// Array of DynamicWorldRow objects, used by the game to display the list of world rows
|
||||||
|
#[serde(rename = "dynamicWorldRows")]
|
||||||
|
pub dynamic_world_rows: Vec<crate::models::ConfigDynamicWorldRows>,
|
||||||
|
#[serde(rename = "events")]
|
||||||
|
pub events: Box<crate::models::ConfigEvents>,
|
||||||
|
/// Unknown
|
||||||
|
#[serde(rename = "gearDemoRoomId")]
|
||||||
|
pub gear_demo_room_id: String,
|
||||||
|
/// Redirect target if you try to open the base API domain in your browser
|
||||||
|
#[serde(rename = "homepageRedirectTarget")]
|
||||||
|
pub homepage_redirect_target: String,
|
||||||
|
#[serde(rename = "homeWorldId")]
|
||||||
|
pub home_world_id: String,
|
||||||
|
#[serde(rename = "hubWorldId")]
|
||||||
|
pub hub_world_id: String,
|
||||||
|
/// VRChat's job application email
|
||||||
|
#[serde(rename = "jobsEmail")]
|
||||||
|
pub jobs_email: String,
|
||||||
|
/// MOTD
|
||||||
|
#[serde(rename = "messageOfTheDay")]
|
||||||
|
pub message_of_the_day: String,
|
||||||
|
/// VRChat's moderation related email
|
||||||
|
#[serde(rename = "moderationEmail")]
|
||||||
|
pub moderation_email: String,
|
||||||
|
/// Unknown
|
||||||
|
#[serde(rename = "moderationQueryPeriod")]
|
||||||
|
pub moderation_query_period: f32,
|
||||||
|
/// Used in-game to notify a user they aren't allowed to select avatars in private worlds
|
||||||
|
#[serde(rename = "notAllowedToSelectAvatarInPrivateWorldMessage")]
|
||||||
|
pub not_allowed_to_select_avatar_in_private_world_message: String,
|
||||||
|
/// Extra [plugin](https://doc.photonengine.com/en-us/server/current/plugins/manual) to run in each instance
|
||||||
|
#[serde(rename = "plugin")]
|
||||||
|
pub plugin: String,
|
||||||
|
/// Version number for game release build
|
||||||
|
#[serde(rename = "releaseAppVersionStandalone")]
|
||||||
|
pub release_app_version_standalone: String,
|
||||||
|
/// Link to download the release SDK
|
||||||
|
#[serde(rename = "releaseSdkUrl")]
|
||||||
|
pub release_sdk_url: String,
|
||||||
|
/// Version of the release SDK
|
||||||
|
#[serde(rename = "releaseSdkVersion")]
|
||||||
|
pub release_sdk_version: String,
|
||||||
|
/// Version number for server release build
|
||||||
|
#[serde(rename = "releaseServerVersionStandalone")]
|
||||||
|
pub release_server_version_standalone: String,
|
||||||
|
/// Link to the developer FAQ
|
||||||
|
#[serde(rename = "sdkDeveloperFaqUrl")]
|
||||||
|
pub sdk_developer_faq_url: String,
|
||||||
|
/// Link to the official VRChat Discord
|
||||||
|
#[serde(rename = "sdkDiscordUrl")]
|
||||||
|
pub sdk_discord_url: String,
|
||||||
|
/// Used in the SDK to notify a user they aren't allowed to upload avatars/worlds yet
|
||||||
|
#[serde(rename = "sdkNotAllowedToPublishMessage")]
|
||||||
|
pub sdk_not_allowed_to_publish_message: String,
|
||||||
|
/// Unity version supported by the SDK
|
||||||
|
#[serde(rename = "sdkUnityVersion")]
|
||||||
|
pub sdk_unity_version: String,
|
||||||
|
/// Server name of the API server currently responding
|
||||||
|
#[serde(rename = "serverName")]
|
||||||
|
pub server_name: String,
|
||||||
|
/// VRChat's support email
|
||||||
|
#[serde(rename = "supportEmail")]
|
||||||
|
pub support_email: String,
|
||||||
|
#[serde(rename = "timeOutWorldId")]
|
||||||
|
pub time_out_world_id: String,
|
||||||
|
#[serde(rename = "tutorialWorldId")]
|
||||||
|
pub tutorial_world_id: String,
|
||||||
|
/// Unknown
|
||||||
|
#[serde(rename = "updateRateMsMaximum")]
|
||||||
|
pub update_rate_ms_maximum: f32,
|
||||||
|
/// Unknown
|
||||||
|
#[serde(rename = "updateRateMsMinimum")]
|
||||||
|
pub update_rate_ms_minimum: f32,
|
||||||
|
/// Unknown
|
||||||
|
#[serde(rename = "updateRateMsNormal")]
|
||||||
|
pub update_rate_ms_normal: f32,
|
||||||
|
/// Unknown
|
||||||
|
#[serde(rename = "updateRateMsUdonManual")]
|
||||||
|
pub update_rate_ms_udon_manual: f32,
|
||||||
|
/// Unknown
|
||||||
|
#[serde(rename = "uploadAnalysisPercent")]
|
||||||
|
pub upload_analysis_percent: f32,
|
||||||
|
/// List of allowed URLs that bypass the \"Allow untrusted URL's\" setting in-game
|
||||||
|
#[serde(rename = "urlList")]
|
||||||
|
pub url_list: Vec<String>,
|
||||||
|
/// Unknown
|
||||||
|
#[serde(rename = "useReliableUdpForVoice")]
|
||||||
|
pub use_reliable_udp_for_voice: bool,
|
||||||
|
/// Unknown
|
||||||
|
#[serde(rename = "userUpdatePeriod")]
|
||||||
|
pub user_update_period: f32,
|
||||||
|
/// Unknown
|
||||||
|
#[serde(rename = "userVerificationDelay")]
|
||||||
|
pub user_verification_delay: f32,
|
||||||
|
/// Unknown
|
||||||
|
#[serde(rename = "userVerificationRetry")]
|
||||||
|
pub user_verification_retry: f32,
|
||||||
|
/// Unknown
|
||||||
|
#[serde(rename = "userVerificationTimeout")]
|
||||||
|
pub user_verification_timeout: f32,
|
||||||
|
/// Download link for game on the Steam website.
|
||||||
|
#[serde(rename = "viveWindowsUrl")]
|
||||||
|
pub vive_windows_url: String,
|
||||||
|
/// List of allowed URLs that are allowed to host avatar assets
|
||||||
|
#[serde(rename = "whiteListedAssetUrls")]
|
||||||
|
pub white_listed_asset_urls: Vec<String>,
|
||||||
|
/// Unknown
|
||||||
|
#[serde(rename = "worldUpdatePeriod")]
|
||||||
|
pub world_update_period: f32,
|
||||||
|
/// Currently used youtube-dl.exe hash in SHA-256-delimited format
|
||||||
|
#[serde(rename = "youtubedl-hash")]
|
||||||
|
pub youtubedl_hash: String,
|
||||||
|
/// Currently used youtube-dl.exe version
|
||||||
|
#[serde(rename = "youtubedl-version")]
|
||||||
|
pub youtubedl_version: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Config {
|
||||||
|
pub fn new(address: String, announcements: Vec<crate::models::ConfigAnnouncements>, api_key: String, app_name: String, build_version_tag: String, client_api_key: String, contact_email: String, copyright_email: String, current_tos_version: f32, default_avatar: String, deployment_group: crate::models::DeploymentGroup, dev_app_version_standalone: String, dev_download_link_windows: String, dev_sdk_url: String, dev_sdk_version: String, dev_server_version_standalone: String, disable_avatar_copying: bool, disable_avatar_gating: bool, disable_community_labs: bool, disable_community_labs_promotion: bool, disable_event_stream: bool, disable_feedback_gating: bool, disable_registration: bool, disable_steam_networking: bool, disable_two_factor_auth: bool, disable_udon: bool, disable_upgrade_account: bool, download_link_windows: String, download_urls: crate::models::ConfigDownloadUrls, dynamic_world_rows: Vec<crate::models::ConfigDynamicWorldRows>, events: crate::models::ConfigEvents, gear_demo_room_id: String, homepage_redirect_target: String, home_world_id: String, hub_world_id: String, jobs_email: String, message_of_the_day: String, moderation_email: String, moderation_query_period: f32, not_allowed_to_select_avatar_in_private_world_message: String, plugin: String, release_app_version_standalone: String, release_sdk_url: String, release_sdk_version: String, release_server_version_standalone: String, sdk_developer_faq_url: String, sdk_discord_url: String, sdk_not_allowed_to_publish_message: String, sdk_unity_version: String, server_name: String, support_email: String, time_out_world_id: String, tutorial_world_id: String, update_rate_ms_maximum: f32, update_rate_ms_minimum: f32, update_rate_ms_normal: f32, update_rate_ms_udon_manual: f32, upload_analysis_percent: f32, url_list: Vec<String>, use_reliable_udp_for_voice: bool, user_update_period: f32, user_verification_delay: f32, user_verification_retry: f32, user_verification_timeout: f32, vive_windows_url: String, white_listed_asset_urls: Vec<String>, world_update_period: f32, youtubedl_hash: String, youtubedl_version: String) -> Config {
|
||||||
|
Config {
|
||||||
|
address,
|
||||||
|
announcements,
|
||||||
|
api_key,
|
||||||
|
app_name,
|
||||||
|
build_version_tag,
|
||||||
|
client_api_key,
|
||||||
|
client_bps_ceiling: None,
|
||||||
|
client_disconnect_timeout: None,
|
||||||
|
client_reserved_player_bps: None,
|
||||||
|
client_sent_count_allowance: None,
|
||||||
|
contact_email,
|
||||||
|
copyright_email,
|
||||||
|
current_tos_version,
|
||||||
|
default_avatar,
|
||||||
|
deployment_group,
|
||||||
|
dev_app_version_standalone,
|
||||||
|
dev_download_link_windows,
|
||||||
|
dev_sdk_url,
|
||||||
|
dev_sdk_version,
|
||||||
|
dev_server_version_standalone,
|
||||||
|
disable_avatar_copying,
|
||||||
|
disable_avatar_gating,
|
||||||
|
disable_community_labs,
|
||||||
|
disable_community_labs_promotion,
|
||||||
|
disable_email: None,
|
||||||
|
disable_event_stream,
|
||||||
|
disable_feedback_gating,
|
||||||
|
disable_hello: None,
|
||||||
|
disable_registration,
|
||||||
|
disable_steam_networking,
|
||||||
|
disable_two_factor_auth,
|
||||||
|
disable_udon,
|
||||||
|
disable_upgrade_account,
|
||||||
|
download_link_windows,
|
||||||
|
download_urls: Box::new(download_urls),
|
||||||
|
dynamic_world_rows,
|
||||||
|
events: Box::new(events),
|
||||||
|
gear_demo_room_id,
|
||||||
|
homepage_redirect_target,
|
||||||
|
home_world_id,
|
||||||
|
hub_world_id,
|
||||||
|
jobs_email,
|
||||||
|
message_of_the_day,
|
||||||
|
moderation_email,
|
||||||
|
moderation_query_period,
|
||||||
|
not_allowed_to_select_avatar_in_private_world_message,
|
||||||
|
plugin,
|
||||||
|
release_app_version_standalone,
|
||||||
|
release_sdk_url,
|
||||||
|
release_sdk_version,
|
||||||
|
release_server_version_standalone,
|
||||||
|
sdk_developer_faq_url,
|
||||||
|
sdk_discord_url,
|
||||||
|
sdk_not_allowed_to_publish_message,
|
||||||
|
sdk_unity_version,
|
||||||
|
server_name,
|
||||||
|
support_email,
|
||||||
|
time_out_world_id,
|
||||||
|
tutorial_world_id,
|
||||||
|
update_rate_ms_maximum,
|
||||||
|
update_rate_ms_minimum,
|
||||||
|
update_rate_ms_normal,
|
||||||
|
update_rate_ms_udon_manual,
|
||||||
|
upload_analysis_percent,
|
||||||
|
url_list,
|
||||||
|
use_reliable_udp_for_voice,
|
||||||
|
user_update_period,
|
||||||
|
user_verification_delay,
|
||||||
|
user_verification_retry,
|
||||||
|
user_verification_timeout,
|
||||||
|
vive_windows_url,
|
||||||
|
white_listed_asset_urls,
|
||||||
|
world_update_period,
|
||||||
|
youtubedl_hash,
|
||||||
|
youtubedl_version,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
35
src/models/config_announcements.rs
Normal file
35
src/models/config_announcements.rs
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
/// ConfigAnnouncements : Public Announcement
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct ConfigAnnouncements {
|
||||||
|
/// Announcement name
|
||||||
|
#[serde(rename = "name")]
|
||||||
|
pub name: String,
|
||||||
|
/// Announcement text
|
||||||
|
#[serde(rename = "text")]
|
||||||
|
pub text: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ConfigAnnouncements {
|
||||||
|
/// Public Announcement
|
||||||
|
pub fn new(name: String, text: String) -> ConfigAnnouncements {
|
||||||
|
ConfigAnnouncements {
|
||||||
|
name,
|
||||||
|
text,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
39
src/models/config_download_urls.rs
Normal file
39
src/models/config_download_urls.rs
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
/// ConfigDownloadUrls : Download links for various development assets
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct ConfigDownloadUrls {
|
||||||
|
/// Download link for legacy SDK2
|
||||||
|
#[serde(rename = "sdk2")]
|
||||||
|
pub sdk2: String,
|
||||||
|
/// Download link for SDK3 for Avatars
|
||||||
|
#[serde(rename = "sdk3-avatars")]
|
||||||
|
pub sdk3_avatars: String,
|
||||||
|
/// Download link for SDK3 for Worlds
|
||||||
|
#[serde(rename = "sdk3-worlds")]
|
||||||
|
pub sdk3_worlds: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ConfigDownloadUrls {
|
||||||
|
/// Download links for various development assets
|
||||||
|
pub fn new(sdk2: String, sdk3_avatars: String, sdk3_worlds: String) -> ConfigDownloadUrls {
|
||||||
|
ConfigDownloadUrls {
|
||||||
|
sdk2,
|
||||||
|
sdk3_avatars,
|
||||||
|
sdk3_worlds,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
47
src/models/config_dynamic_world_rows.rs
Normal file
47
src/models/config_dynamic_world_rows.rs
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct ConfigDynamicWorldRows {
|
||||||
|
#[serde(rename = "index")]
|
||||||
|
pub index: f32,
|
||||||
|
#[serde(rename = "name")]
|
||||||
|
pub name: String,
|
||||||
|
#[serde(rename = "platform")]
|
||||||
|
pub platform: String,
|
||||||
|
#[serde(rename = "sortHeading")]
|
||||||
|
pub sort_heading: String,
|
||||||
|
#[serde(rename = "sortOrder")]
|
||||||
|
pub sort_order: String,
|
||||||
|
#[serde(rename = "sortOwnership")]
|
||||||
|
pub sort_ownership: String,
|
||||||
|
/// Tag to filter worlds for this row
|
||||||
|
#[serde(rename = "tag", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub tag: Option<String>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ConfigDynamicWorldRows {
|
||||||
|
pub fn new(index: f32, name: String, platform: String, sort_heading: String, sort_order: String, sort_ownership: String) -> ConfigDynamicWorldRows {
|
||||||
|
ConfigDynamicWorldRows {
|
||||||
|
index,
|
||||||
|
name,
|
||||||
|
platform,
|
||||||
|
sort_heading,
|
||||||
|
sort_order,
|
||||||
|
sort_ownership,
|
||||||
|
tag: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
65
src/models/config_events.rs
Normal file
65
src/models/config_events.rs
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct ConfigEvents {
|
||||||
|
/// Unknown
|
||||||
|
#[serde(rename = "distanceClose")]
|
||||||
|
pub distance_close: f32,
|
||||||
|
/// Unknown
|
||||||
|
#[serde(rename = "distanceFactor")]
|
||||||
|
pub distance_factor: f32,
|
||||||
|
/// Unknown
|
||||||
|
#[serde(rename = "distanceFar")]
|
||||||
|
pub distance_far: f32,
|
||||||
|
/// Unknown
|
||||||
|
#[serde(rename = "groupDistance")]
|
||||||
|
pub group_distance: f32,
|
||||||
|
/// Unknown
|
||||||
|
#[serde(rename = "maximumBunchSize")]
|
||||||
|
pub maximum_bunch_size: f32,
|
||||||
|
/// Unknown
|
||||||
|
#[serde(rename = "notVisibleFactor")]
|
||||||
|
pub not_visible_factor: f32,
|
||||||
|
/// Unknown
|
||||||
|
#[serde(rename = "playerOrderBucketSize")]
|
||||||
|
pub player_order_bucket_size: f32,
|
||||||
|
/// Unknown
|
||||||
|
#[serde(rename = "playerOrderFactor")]
|
||||||
|
pub player_order_factor: f32,
|
||||||
|
/// Unknown
|
||||||
|
#[serde(rename = "slowUpdateFactorThreshold")]
|
||||||
|
pub slow_update_factor_threshold: f32,
|
||||||
|
/// Unknown
|
||||||
|
#[serde(rename = "viewSegmentLength")]
|
||||||
|
pub view_segment_length: f32,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ConfigEvents {
|
||||||
|
pub fn new(distance_close: f32, distance_factor: f32, distance_far: f32, group_distance: f32, maximum_bunch_size: f32, not_visible_factor: f32, player_order_bucket_size: f32, player_order_factor: f32, slow_update_factor_threshold: f32, view_segment_length: f32) -> ConfigEvents {
|
||||||
|
ConfigEvents {
|
||||||
|
distance_close,
|
||||||
|
distance_factor,
|
||||||
|
distance_far,
|
||||||
|
group_distance,
|
||||||
|
maximum_bunch_size,
|
||||||
|
not_visible_factor,
|
||||||
|
player_order_bucket_size,
|
||||||
|
player_order_factor,
|
||||||
|
slow_update_factor_threshold,
|
||||||
|
view_segment_length,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
163
src/models/current_user.rs
Normal file
163
src/models/current_user.rs
Normal file
@ -0,0 +1,163 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct CurrentUser {
|
||||||
|
#[serde(rename = "id")]
|
||||||
|
pub id: String,
|
||||||
|
#[serde(rename = "username")]
|
||||||
|
pub username: String,
|
||||||
|
#[serde(rename = "displayName")]
|
||||||
|
pub display_name: String,
|
||||||
|
#[serde(rename = "userIcon")]
|
||||||
|
pub user_icon: String,
|
||||||
|
#[serde(rename = "bio")]
|
||||||
|
pub bio: String,
|
||||||
|
#[serde(rename = "bioLinks")]
|
||||||
|
pub bio_links: Vec<String>,
|
||||||
|
#[serde(rename = "profilePicOverride")]
|
||||||
|
pub profile_pic_override: String,
|
||||||
|
#[serde(rename = "statusDescription")]
|
||||||
|
pub status_description: String,
|
||||||
|
#[serde(rename = "pastDisplayNames")]
|
||||||
|
pub past_display_names: Vec<String>,
|
||||||
|
#[serde(rename = "hasEmail")]
|
||||||
|
pub has_email: bool,
|
||||||
|
#[serde(rename = "hasPendingEmail")]
|
||||||
|
pub has_pending_email: bool,
|
||||||
|
#[serde(rename = "obfuscatedEmail")]
|
||||||
|
pub obfuscated_email: String,
|
||||||
|
#[serde(rename = "obfuscatedPendingEmail")]
|
||||||
|
pub obfuscated_pending_email: String,
|
||||||
|
#[serde(rename = "emailVerified")]
|
||||||
|
pub email_verified: bool,
|
||||||
|
#[serde(rename = "hasBirthday")]
|
||||||
|
pub has_birthday: bool,
|
||||||
|
#[serde(rename = "unsubscribe")]
|
||||||
|
pub unsubscribe: bool,
|
||||||
|
#[serde(rename = "statusHistory")]
|
||||||
|
pub status_history: Vec<String>,
|
||||||
|
#[serde(rename = "statusFirstTime")]
|
||||||
|
pub status_first_time: bool,
|
||||||
|
#[serde(rename = "friends")]
|
||||||
|
pub friends: Vec<String>,
|
||||||
|
#[serde(rename = "friendGroupNames")]
|
||||||
|
pub friend_group_names: Vec<String>,
|
||||||
|
#[serde(rename = "currentAvatarImageUrl")]
|
||||||
|
pub current_avatar_image_url: String,
|
||||||
|
#[serde(rename = "currentAvatarThumbnailImageUrl")]
|
||||||
|
pub current_avatar_thumbnail_image_url: String,
|
||||||
|
#[serde(rename = "fallbackAvatar")]
|
||||||
|
pub fallback_avatar: String,
|
||||||
|
#[serde(rename = "currentAvatar")]
|
||||||
|
pub current_avatar: String,
|
||||||
|
#[serde(rename = "currentAvatarAssetUrl")]
|
||||||
|
pub current_avatar_asset_url: String,
|
||||||
|
#[serde(rename = "accountDeletionDate", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub account_deletion_date: Option<String>,
|
||||||
|
#[serde(rename = "acceptedTOSVersion")]
|
||||||
|
pub accepted_tos_version: f32,
|
||||||
|
#[serde(rename = "steamId")]
|
||||||
|
pub steam_id: String,
|
||||||
|
#[serde(rename = "steamDetails")]
|
||||||
|
pub steam_details: serde_json::Value,
|
||||||
|
#[serde(rename = "oculusId")]
|
||||||
|
pub oculus_id: String,
|
||||||
|
#[serde(rename = "hasLoggedInFromClient")]
|
||||||
|
pub has_logged_in_from_client: bool,
|
||||||
|
#[serde(rename = "homeLocation")]
|
||||||
|
pub home_location: String,
|
||||||
|
#[serde(rename = "twoFactorAuthEnabled")]
|
||||||
|
pub two_factor_auth_enabled: bool,
|
||||||
|
#[serde(rename = "state")]
|
||||||
|
pub state: crate::models::UserState,
|
||||||
|
#[serde(rename = "tags")]
|
||||||
|
pub tags: Vec<String>,
|
||||||
|
#[serde(rename = "developerType")]
|
||||||
|
pub developer_type: crate::models::DeveloperType,
|
||||||
|
#[serde(rename = "last_login")]
|
||||||
|
pub last_login: String,
|
||||||
|
#[serde(rename = "last_platform")]
|
||||||
|
pub last_platform: String,
|
||||||
|
#[serde(rename = "allowAvatarCopying")]
|
||||||
|
pub allow_avatar_copying: bool,
|
||||||
|
#[serde(rename = "status")]
|
||||||
|
pub status: crate::models::UserStatus,
|
||||||
|
#[serde(rename = "date_joined")]
|
||||||
|
pub date_joined: String,
|
||||||
|
#[serde(rename = "isFriend")]
|
||||||
|
pub is_friend: bool,
|
||||||
|
#[serde(rename = "friendKey")]
|
||||||
|
pub friend_key: String,
|
||||||
|
#[serde(rename = "onlineFriends")]
|
||||||
|
pub online_friends: Vec<String>,
|
||||||
|
#[serde(rename = "activeFriends")]
|
||||||
|
pub active_friends: Vec<String>,
|
||||||
|
#[serde(rename = "offlineFriends")]
|
||||||
|
pub offline_friends: Vec<String>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl CurrentUser {
|
||||||
|
pub fn new(id: String, username: String, display_name: String, user_icon: String, bio: String, bio_links: Vec<String>, profile_pic_override: String, status_description: String, past_display_names: Vec<String>, has_email: bool, has_pending_email: bool, obfuscated_email: String, obfuscated_pending_email: String, email_verified: bool, has_birthday: bool, unsubscribe: bool, status_history: Vec<String>, status_first_time: bool, friends: Vec<String>, friend_group_names: Vec<String>, current_avatar_image_url: String, current_avatar_thumbnail_image_url: String, fallback_avatar: String, current_avatar: String, current_avatar_asset_url: String, accepted_tos_version: f32, steam_id: String, steam_details: serde_json::Value, oculus_id: String, has_logged_in_from_client: bool, home_location: String, two_factor_auth_enabled: bool, state: crate::models::UserState, tags: Vec<String>, developer_type: crate::models::DeveloperType, last_login: String, last_platform: String, allow_avatar_copying: bool, status: crate::models::UserStatus, date_joined: String, is_friend: bool, friend_key: String, online_friends: Vec<String>, active_friends: Vec<String>, offline_friends: Vec<String>) -> CurrentUser {
|
||||||
|
CurrentUser {
|
||||||
|
id,
|
||||||
|
username,
|
||||||
|
display_name,
|
||||||
|
user_icon,
|
||||||
|
bio,
|
||||||
|
bio_links,
|
||||||
|
profile_pic_override,
|
||||||
|
status_description,
|
||||||
|
past_display_names,
|
||||||
|
has_email,
|
||||||
|
has_pending_email,
|
||||||
|
obfuscated_email,
|
||||||
|
obfuscated_pending_email,
|
||||||
|
email_verified,
|
||||||
|
has_birthday,
|
||||||
|
unsubscribe,
|
||||||
|
status_history,
|
||||||
|
status_first_time,
|
||||||
|
friends,
|
||||||
|
friend_group_names,
|
||||||
|
current_avatar_image_url,
|
||||||
|
current_avatar_thumbnail_image_url,
|
||||||
|
fallback_avatar,
|
||||||
|
current_avatar,
|
||||||
|
current_avatar_asset_url,
|
||||||
|
account_deletion_date: None,
|
||||||
|
accepted_tos_version,
|
||||||
|
steam_id,
|
||||||
|
steam_details,
|
||||||
|
oculus_id,
|
||||||
|
has_logged_in_from_client,
|
||||||
|
home_location,
|
||||||
|
two_factor_auth_enabled,
|
||||||
|
state,
|
||||||
|
tags,
|
||||||
|
developer_type,
|
||||||
|
last_login,
|
||||||
|
last_platform,
|
||||||
|
allow_avatar_copying,
|
||||||
|
status,
|
||||||
|
date_joined,
|
||||||
|
is_friend,
|
||||||
|
friend_key,
|
||||||
|
online_friends,
|
||||||
|
active_friends,
|
||||||
|
offline_friends,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
40
src/models/deployment_group.rs
Normal file
40
src/models/deployment_group.rs
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
/// DeploymentGroup : Used to identify which API deployment cluster is currently responding. `blue` and `green` are used by Production. `grape`and `cherry` are used during Development. [Blue Green Deployment by Martin Fowler](https://martinfowler.com/bliki/BlueGreenDeployment.html)
|
||||||
|
|
||||||
|
/// Used to identify which API deployment cluster is currently responding. `blue` and `green` are used by Production. `grape`and `cherry` are used during Development. [Blue Green Deployment by Martin Fowler](https://martinfowler.com/bliki/BlueGreenDeployment.html)
|
||||||
|
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
|
||||||
|
pub enum DeploymentGroup {
|
||||||
|
#[serde(rename = "blue")]
|
||||||
|
Blue,
|
||||||
|
#[serde(rename = "green")]
|
||||||
|
Green,
|
||||||
|
#[serde(rename = "grape")]
|
||||||
|
Grape,
|
||||||
|
#[serde(rename = "cherry")]
|
||||||
|
Cherry,
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ToString for DeploymentGroup {
|
||||||
|
fn to_string(&self) -> String {
|
||||||
|
match self {
|
||||||
|
Self::Blue => String::from("blue"),
|
||||||
|
Self::Green => String::from("green"),
|
||||||
|
Self::Grape => String::from("grape"),
|
||||||
|
Self::Cherry => String::from("cherry"),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
40
src/models/developer_type.rs
Normal file
40
src/models/developer_type.rs
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
/// DeveloperType : \"none\" User is a normal user \"trusted\" Unknown \"internal\" Is a VRChat Developer \"moderator\" Is a VRChat Moderator Staff can hide their developerType at will.
|
||||||
|
|
||||||
|
/// \"none\" User is a normal user \"trusted\" Unknown \"internal\" Is a VRChat Developer \"moderator\" Is a VRChat Moderator Staff can hide their developerType at will.
|
||||||
|
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
|
||||||
|
pub enum DeveloperType {
|
||||||
|
#[serde(rename = "none")]
|
||||||
|
None,
|
||||||
|
#[serde(rename = "trusted")]
|
||||||
|
Trusted,
|
||||||
|
#[serde(rename = "internal")]
|
||||||
|
Internal,
|
||||||
|
#[serde(rename = "moderator")]
|
||||||
|
Moderator,
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ToString for DeveloperType {
|
||||||
|
fn to_string(&self) -> String {
|
||||||
|
match self {
|
||||||
|
Self::None => String::from("none"),
|
||||||
|
Self::Trusted => String::from("trusted"),
|
||||||
|
Self::Internal => String::from("internal"),
|
||||||
|
Self::Moderator => String::from("moderator"),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
28
src/models/error.rs
Normal file
28
src/models/error.rs
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct Error {
|
||||||
|
#[serde(rename = "error", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub error: Option<Box<crate::models::Response>>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Error {
|
||||||
|
pub fn new() -> Error {
|
||||||
|
Error {
|
||||||
|
error: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
49
src/models/file.rs
Normal file
49
src/models/file.rs
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
/// File :
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct File {
|
||||||
|
#[serde(rename = "id")]
|
||||||
|
pub id: String,
|
||||||
|
///
|
||||||
|
#[serde(rename = "name")]
|
||||||
|
pub name: String,
|
||||||
|
#[serde(rename = "ownerId")]
|
||||||
|
pub owner_id: String,
|
||||||
|
#[serde(rename = "mimeType")]
|
||||||
|
pub mime_type: crate::models::MimeType,
|
||||||
|
#[serde(rename = "extension")]
|
||||||
|
pub extension: String,
|
||||||
|
#[serde(rename = "tags")]
|
||||||
|
pub tags: Vec<String>,
|
||||||
|
#[serde(rename = "versions")]
|
||||||
|
pub versions: Vec<crate::models::FileVersion>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl File {
|
||||||
|
///
|
||||||
|
pub fn new(id: String, name: String, owner_id: String, mime_type: crate::models::MimeType, extension: String, tags: Vec<String>, versions: Vec<crate::models::FileVersion>) -> File {
|
||||||
|
File {
|
||||||
|
id,
|
||||||
|
name,
|
||||||
|
owner_id,
|
||||||
|
mime_type,
|
||||||
|
extension,
|
||||||
|
tags,
|
||||||
|
versions,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
58
src/models/file_data.rs
Normal file
58
src/models/file_data.rs
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
/// FileData :
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct FileData {
|
||||||
|
#[serde(rename = "fileName")]
|
||||||
|
pub file_name: String,
|
||||||
|
#[serde(rename = "url")]
|
||||||
|
pub url: String,
|
||||||
|
#[serde(rename = "md5")]
|
||||||
|
pub md5: String,
|
||||||
|
#[serde(rename = "sizeInBytes")]
|
||||||
|
pub size_in_bytes: f32,
|
||||||
|
#[serde(rename = "status")]
|
||||||
|
pub status: crate::models::FileStatus,
|
||||||
|
#[serde(rename = "category")]
|
||||||
|
pub category: Category,
|
||||||
|
#[serde(rename = "uploadId")]
|
||||||
|
pub upload_id: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl FileData {
|
||||||
|
///
|
||||||
|
pub fn new(file_name: String, url: String, md5: String, size_in_bytes: f32, status: crate::models::FileStatus, category: Category, upload_id: String) -> FileData {
|
||||||
|
FileData {
|
||||||
|
file_name,
|
||||||
|
url,
|
||||||
|
md5,
|
||||||
|
size_in_bytes,
|
||||||
|
status,
|
||||||
|
category,
|
||||||
|
upload_id,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
|
||||||
|
pub enum Category {
|
||||||
|
#[serde(rename = "multipart")]
|
||||||
|
Multipart,
|
||||||
|
#[serde(rename = "queued")]
|
||||||
|
Queued,
|
||||||
|
#[serde(rename = "simple")]
|
||||||
|
Simple,
|
||||||
|
}
|
||||||
|
|
36
src/models/file_status.rs
Normal file
36
src/models/file_status.rs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
///
|
||||||
|
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
|
||||||
|
pub enum FileStatus {
|
||||||
|
#[serde(rename = "waiting")]
|
||||||
|
Waiting,
|
||||||
|
#[serde(rename = "complete")]
|
||||||
|
Complete,
|
||||||
|
#[serde(rename = "none")]
|
||||||
|
None,
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ToString for FileStatus {
|
||||||
|
fn to_string(&self) -> String {
|
||||||
|
match self {
|
||||||
|
Self::Waiting => String::from("waiting"),
|
||||||
|
Self::Complete => String::from("complete"),
|
||||||
|
Self::None => String::from("none"),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
50
src/models/file_version.rs
Normal file
50
src/models/file_version.rs
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
/// FileVersion :
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct FileVersion {
|
||||||
|
/// Incremental version counter, can only be increased.
|
||||||
|
#[serde(rename = "version")]
|
||||||
|
pub version: f32,
|
||||||
|
#[serde(rename = "status")]
|
||||||
|
pub status: crate::models::FileStatus,
|
||||||
|
#[serde(rename = "created_at")]
|
||||||
|
pub created_at: String,
|
||||||
|
#[serde(rename = "file", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub file: Option<Box<crate::models::FileData>>,
|
||||||
|
#[serde(rename = "delta", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub delta: Option<Box<crate::models::FileData>>,
|
||||||
|
#[serde(rename = "signature", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub signature: Option<Box<crate::models::FileData>>,
|
||||||
|
/// Usually only present if `true`
|
||||||
|
#[serde(rename = "deleted", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub deleted: Option<bool>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl FileVersion {
|
||||||
|
///
|
||||||
|
pub fn new(version: f32, status: crate::models::FileStatus, created_at: String) -> FileVersion {
|
||||||
|
FileVersion {
|
||||||
|
version,
|
||||||
|
status,
|
||||||
|
created_at,
|
||||||
|
file: None,
|
||||||
|
delta: None,
|
||||||
|
signature: None,
|
||||||
|
deleted: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
28
src/models/inline_object.rs
Normal file
28
src/models/inline_object.rs
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct InlineObject {
|
||||||
|
#[serde(rename = "code")]
|
||||||
|
pub code: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl InlineObject {
|
||||||
|
pub fn new(code: String) -> InlineObject {
|
||||||
|
InlineObject {
|
||||||
|
code,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
28
src/models/inline_object_1.rs
Normal file
28
src/models/inline_object_1.rs
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct InlineObject1 {
|
||||||
|
#[serde(rename = "code")]
|
||||||
|
pub code: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl InlineObject1 {
|
||||||
|
pub fn new(code: String) -> InlineObject1 {
|
||||||
|
InlineObject1 {
|
||||||
|
code,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
53
src/models/inline_object_2.rs
Normal file
53
src/models/inline_object_2.rs
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct InlineObject2 {
|
||||||
|
#[serde(rename = "email", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub email: Option<String>,
|
||||||
|
#[serde(rename = "birthday", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub birthday: Option<String>,
|
||||||
|
#[serde(rename = "acceptedTOSVersion", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub accepted_tos_version: Option<f32>,
|
||||||
|
#[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub tags: Option<Vec<String>>,
|
||||||
|
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub status: Option<crate::models::UserStatus>,
|
||||||
|
#[serde(rename = "statusDescription", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub status_description: Option<String>,
|
||||||
|
#[serde(rename = "bio", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub bio: Option<String>,
|
||||||
|
#[serde(rename = "bioLinks", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub bio_links: Option<Vec<String>>,
|
||||||
|
/// MUST be a valid VRChat /file/ url.
|
||||||
|
#[serde(rename = "userIcon", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub user_icon: Option<String>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl InlineObject2 {
|
||||||
|
pub fn new() -> InlineObject2 {
|
||||||
|
InlineObject2 {
|
||||||
|
email: None,
|
||||||
|
birthday: None,
|
||||||
|
accepted_tos_version: None,
|
||||||
|
tags: None,
|
||||||
|
status: None,
|
||||||
|
status_description: None,
|
||||||
|
bio: None,
|
||||||
|
bio_links: None,
|
||||||
|
user_icon: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
37
src/models/inline_object_3.rs
Normal file
37
src/models/inline_object_3.rs
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct InlineObject3 {
|
||||||
|
#[serde(rename = "name")]
|
||||||
|
pub name: String,
|
||||||
|
#[serde(rename = "mimeType")]
|
||||||
|
pub mime_type: crate::models::MimeType,
|
||||||
|
#[serde(rename = "extension")]
|
||||||
|
pub extension: String,
|
||||||
|
#[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub tags: Option<Vec<String>>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl InlineObject3 {
|
||||||
|
pub fn new(name: String, mime_type: crate::models::MimeType, extension: String) -> InlineObject3 {
|
||||||
|
InlineObject3 {
|
||||||
|
name,
|
||||||
|
mime_type,
|
||||||
|
extension,
|
||||||
|
tags: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
49
src/models/inline_object_4.rs
Normal file
49
src/models/inline_object_4.rs
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct InlineObject4 {
|
||||||
|
/// Array of ETags uploaded.
|
||||||
|
#[serde(rename = "etags", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub etags: Option<Vec<String>>,
|
||||||
|
/// Always a zero in string form, despite how many parts uploaded.
|
||||||
|
#[serde(rename = "nextPartNumber")]
|
||||||
|
pub next_part_number: NextPartNumber,
|
||||||
|
/// Always a zero in string form, despite how many parts uploaded.
|
||||||
|
#[serde(rename = "maxParts")]
|
||||||
|
pub max_parts: MaxParts,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl InlineObject4 {
|
||||||
|
pub fn new(next_part_number: NextPartNumber, max_parts: MaxParts) -> InlineObject4 {
|
||||||
|
InlineObject4 {
|
||||||
|
etags: None,
|
||||||
|
next_part_number,
|
||||||
|
max_parts,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Always a zero in string form, despite how many parts uploaded.
|
||||||
|
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
|
||||||
|
pub enum NextPartNumber {
|
||||||
|
#[serde(rename = "0")]
|
||||||
|
_0,
|
||||||
|
}
|
||||||
|
/// Always a zero in string form, despite how many parts uploaded.
|
||||||
|
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
|
||||||
|
pub enum MaxParts {
|
||||||
|
#[serde(rename = "0")]
|
||||||
|
_0,
|
||||||
|
}
|
||||||
|
|
31
src/models/inline_response_200.rs
Normal file
31
src/models/inline_response_200.rs
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct InlineResponse200 {
|
||||||
|
#[serde(rename = "ok")]
|
||||||
|
pub ok: bool,
|
||||||
|
#[serde(rename = "token")]
|
||||||
|
pub token: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl InlineResponse200 {
|
||||||
|
pub fn new(ok: bool, token: String) -> InlineResponse200 {
|
||||||
|
InlineResponse200 {
|
||||||
|
ok,
|
||||||
|
token,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
28
src/models/inline_response_200_1.rs
Normal file
28
src/models/inline_response_200_1.rs
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct InlineResponse2001 {
|
||||||
|
#[serde(rename = "verified")]
|
||||||
|
pub verified: bool,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl InlineResponse2001 {
|
||||||
|
pub fn new(verified: bool) -> InlineResponse2001 {
|
||||||
|
InlineResponse2001 {
|
||||||
|
verified,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
34
src/models/inline_response_200_2.rs
Normal file
34
src/models/inline_response_200_2.rs
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct InlineResponse2002 {
|
||||||
|
#[serde(rename = "ok")]
|
||||||
|
pub ok: bool,
|
||||||
|
#[serde(rename = "serverName")]
|
||||||
|
pub server_name: String,
|
||||||
|
#[serde(rename = "buildVersionTag")]
|
||||||
|
pub build_version_tag: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl InlineResponse2002 {
|
||||||
|
pub fn new(ok: bool, server_name: String, build_version_tag: String) -> InlineResponse2002 {
|
||||||
|
InlineResponse2002 {
|
||||||
|
ok,
|
||||||
|
server_name,
|
||||||
|
build_version_tag,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
34
src/models/inline_response_200_3.rs
Normal file
34
src/models/inline_response_200_3.rs
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct InlineResponse2003 {
|
||||||
|
#[serde(rename = "isFriend")]
|
||||||
|
pub is_friend: bool,
|
||||||
|
#[serde(rename = "outgoingRequest")]
|
||||||
|
pub outgoing_request: bool,
|
||||||
|
#[serde(rename = "incomingRequest")]
|
||||||
|
pub incoming_request: bool,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl InlineResponse2003 {
|
||||||
|
pub fn new(is_friend: bool, outgoing_request: bool, incoming_request: bool) -> InlineResponse2003 {
|
||||||
|
InlineResponse2003 {
|
||||||
|
is_friend,
|
||||||
|
outgoing_request,
|
||||||
|
incoming_request,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
44
src/models/inline_response_200_4.rs
Normal file
44
src/models/inline_response_200_4.rs
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct InlineResponse2004 {
|
||||||
|
#[serde(rename = "uploadId")]
|
||||||
|
pub upload_id: String,
|
||||||
|
#[serde(rename = "fileName")]
|
||||||
|
pub file_name: String,
|
||||||
|
#[serde(rename = "nextPartNumber")]
|
||||||
|
pub next_part_number: f32,
|
||||||
|
#[serde(rename = "maxParts")]
|
||||||
|
pub max_parts: f32,
|
||||||
|
#[serde(rename = "parts")]
|
||||||
|
pub parts: Vec<serde_json::Value>,
|
||||||
|
/// Unknown
|
||||||
|
#[serde(rename = "etags")]
|
||||||
|
pub etags: Vec<serde_json::Value>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl InlineResponse2004 {
|
||||||
|
pub fn new(upload_id: String, file_name: String, next_part_number: f32, max_parts: f32, parts: Vec<serde_json::Value>, etags: Vec<serde_json::Value>) -> InlineResponse2004 {
|
||||||
|
InlineResponse2004 {
|
||||||
|
upload_id,
|
||||||
|
file_name,
|
||||||
|
next_part_number,
|
||||||
|
max_parts,
|
||||||
|
parts,
|
||||||
|
etags,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
28
src/models/inline_response_200_5.rs
Normal file
28
src/models/inline_response_200_5.rs
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct InlineResponse2005 {
|
||||||
|
#[serde(rename = "url")]
|
||||||
|
pub url: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl InlineResponse2005 {
|
||||||
|
pub fn new(url: String) -> InlineResponse2005 {
|
||||||
|
InlineResponse2005 {
|
||||||
|
url,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
28
src/models/inline_response_401.rs
Normal file
28
src/models/inline_response_401.rs
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct InlineResponse401 {
|
||||||
|
#[serde(rename = "error")]
|
||||||
|
pub error: Box<crate::models::Error>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl InlineResponse401 {
|
||||||
|
pub fn new(error: crate::models::Error) -> InlineResponse401 {
|
||||||
|
InlineResponse401 {
|
||||||
|
error: Box::new(error),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
74
src/models/limited_user.rs
Normal file
74
src/models/limited_user.rs
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct LimitedUser {
|
||||||
|
#[serde(rename = "id")]
|
||||||
|
pub id: String,
|
||||||
|
#[serde(rename = "username")]
|
||||||
|
pub username: String,
|
||||||
|
#[serde(rename = "displayName")]
|
||||||
|
pub display_name: String,
|
||||||
|
#[serde(rename = "bio", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub bio: Option<String>,
|
||||||
|
#[serde(rename = "userIcon")]
|
||||||
|
pub user_icon: String,
|
||||||
|
#[serde(rename = "profilePicOverride")]
|
||||||
|
pub profile_pic_override: String,
|
||||||
|
#[serde(rename = "statusDescription")]
|
||||||
|
pub status_description: String,
|
||||||
|
#[serde(rename = "currentAvatarImageUrl")]
|
||||||
|
pub current_avatar_image_url: String,
|
||||||
|
#[serde(rename = "currentAvatarThumbnailImageUrl")]
|
||||||
|
pub current_avatar_thumbnail_image_url: String,
|
||||||
|
#[serde(rename = "fallbackAvatar")]
|
||||||
|
pub fallback_avatar: String,
|
||||||
|
#[serde(rename = "developerType")]
|
||||||
|
pub developer_type: crate::models::DeveloperType,
|
||||||
|
#[serde(rename = "last_platform")]
|
||||||
|
pub last_platform: String,
|
||||||
|
#[serde(rename = "status")]
|
||||||
|
pub status: crate::models::UserStatus,
|
||||||
|
#[serde(rename = "isFriend")]
|
||||||
|
pub is_friend: bool,
|
||||||
|
#[serde(rename = "location")]
|
||||||
|
pub location: String,
|
||||||
|
/// Always empty
|
||||||
|
#[serde(rename = "tags")]
|
||||||
|
pub tags: Vec<String>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl LimitedUser {
|
||||||
|
pub fn new(id: String, username: String, display_name: String, user_icon: String, profile_pic_override: String, status_description: String, current_avatar_image_url: String, current_avatar_thumbnail_image_url: String, fallback_avatar: String, developer_type: crate::models::DeveloperType, last_platform: String, status: crate::models::UserStatus, is_friend: bool, location: String, tags: Vec<String>) -> LimitedUser {
|
||||||
|
LimitedUser {
|
||||||
|
id,
|
||||||
|
username,
|
||||||
|
display_name,
|
||||||
|
bio: None,
|
||||||
|
user_icon,
|
||||||
|
profile_pic_override,
|
||||||
|
status_description,
|
||||||
|
current_avatar_image_url,
|
||||||
|
current_avatar_thumbnail_image_url,
|
||||||
|
fallback_avatar,
|
||||||
|
developer_type,
|
||||||
|
last_platform,
|
||||||
|
status,
|
||||||
|
is_friend,
|
||||||
|
location,
|
||||||
|
tags,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
82
src/models/limited_world.rs
Normal file
82
src/models/limited_world.rs
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct LimitedWorld {
|
||||||
|
#[serde(rename = "authorId")]
|
||||||
|
pub author_id: String,
|
||||||
|
#[serde(rename = "authorName")]
|
||||||
|
pub author_name: String,
|
||||||
|
#[serde(rename = "capacity")]
|
||||||
|
pub capacity: f32,
|
||||||
|
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub created_at: Option<String>,
|
||||||
|
#[serde(rename = "favorites")]
|
||||||
|
pub favorites: f32,
|
||||||
|
#[serde(rename = "heat")]
|
||||||
|
pub heat: f32,
|
||||||
|
#[serde(rename = "id")]
|
||||||
|
pub id: String,
|
||||||
|
#[serde(rename = "imageUrl")]
|
||||||
|
pub image_url: String,
|
||||||
|
#[serde(rename = "labsPublicationDate", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub labs_publication_date: Option<String>,
|
||||||
|
#[serde(rename = "name")]
|
||||||
|
pub name: String,
|
||||||
|
#[serde(rename = "occupants", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub occupants: Option<f32>,
|
||||||
|
#[serde(rename = "organization")]
|
||||||
|
pub organization: String,
|
||||||
|
#[serde(rename = "popularity")]
|
||||||
|
pub popularity: f32,
|
||||||
|
#[serde(rename = "publicationDate")]
|
||||||
|
pub publication_date: String,
|
||||||
|
#[serde(rename = "releaseStatus")]
|
||||||
|
pub release_status: crate::models::ReleaseStatus,
|
||||||
|
#[serde(rename = "tags")]
|
||||||
|
pub tags: Vec<String>,
|
||||||
|
#[serde(rename = "thumbnailImageUrl")]
|
||||||
|
pub thumbnail_image_url: String,
|
||||||
|
#[serde(rename = "unityPackages")]
|
||||||
|
pub unity_packages: Vec<serde_json::Value>,
|
||||||
|
#[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub updated_at: Option<String>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl LimitedWorld {
|
||||||
|
pub fn new(author_id: String, author_name: String, capacity: f32, favorites: f32, heat: f32, id: String, image_url: String, name: String, organization: String, popularity: f32, publication_date: String, release_status: crate::models::ReleaseStatus, tags: Vec<String>, thumbnail_image_url: String, unity_packages: Vec<serde_json::Value>) -> LimitedWorld {
|
||||||
|
LimitedWorld {
|
||||||
|
author_id,
|
||||||
|
author_name,
|
||||||
|
capacity,
|
||||||
|
created_at: None,
|
||||||
|
favorites,
|
||||||
|
heat,
|
||||||
|
id,
|
||||||
|
image_url,
|
||||||
|
labs_publication_date: None,
|
||||||
|
name,
|
||||||
|
occupants: None,
|
||||||
|
organization,
|
||||||
|
popularity,
|
||||||
|
publication_date,
|
||||||
|
release_status,
|
||||||
|
tags,
|
||||||
|
thumbnail_image_url,
|
||||||
|
unity_packages,
|
||||||
|
updated_at: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
69
src/models/mime_type.rs
Normal file
69
src/models/mime_type.rs
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
///
|
||||||
|
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
|
||||||
|
pub enum MimeType {
|
||||||
|
#[serde(rename = "image⁄jpeg")]
|
||||||
|
Imagejpeg,
|
||||||
|
#[serde(rename = "image⁄jpg")]
|
||||||
|
Imagejpg,
|
||||||
|
#[serde(rename = "image⁄png")]
|
||||||
|
Imagepng,
|
||||||
|
#[serde(rename = "image⁄webp")]
|
||||||
|
Imagewebp,
|
||||||
|
#[serde(rename = "image⁄gif")]
|
||||||
|
Imagegif,
|
||||||
|
#[serde(rename = "image⁄bmp")]
|
||||||
|
Imagebmp,
|
||||||
|
#[serde(rename = "image⁄svg+xml")]
|
||||||
|
Imagesvgxml,
|
||||||
|
#[serde(rename = "image⁄tiff")]
|
||||||
|
Imagetiff,
|
||||||
|
#[serde(rename = "application⁄x-avatar")]
|
||||||
|
ApplicationxAvatar,
|
||||||
|
#[serde(rename = "application⁄x-world")]
|
||||||
|
ApplicationxWorld,
|
||||||
|
#[serde(rename = "application⁄gzip")]
|
||||||
|
Applicationgzip,
|
||||||
|
#[serde(rename = "application/x-rsync-signature")]
|
||||||
|
ApplicationXRsyncSignature,
|
||||||
|
#[serde(rename = "application/x-rsync-delta")]
|
||||||
|
ApplicationXRsyncDelta,
|
||||||
|
#[serde(rename = "application/octet-stream")]
|
||||||
|
ApplicationOctetStream,
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ToString for MimeType {
|
||||||
|
fn to_string(&self) -> String {
|
||||||
|
match self {
|
||||||
|
Self::Imagejpeg => String::from("image⁄jpeg"),
|
||||||
|
Self::Imagejpg => String::from("image⁄jpg"),
|
||||||
|
Self::Imagepng => String::from("image⁄png"),
|
||||||
|
Self::Imagewebp => String::from("image⁄webp"),
|
||||||
|
Self::Imagegif => String::from("image⁄gif"),
|
||||||
|
Self::Imagebmp => String::from("image⁄bmp"),
|
||||||
|
Self::Imagesvgxml => String::from("image⁄svg+xml"),
|
||||||
|
Self::Imagetiff => String::from("image⁄tiff"),
|
||||||
|
Self::ApplicationxAvatar => String::from("application⁄x-avatar"),
|
||||||
|
Self::ApplicationxWorld => String::from("application⁄x-world"),
|
||||||
|
Self::Applicationgzip => String::from("application⁄gzip"),
|
||||||
|
Self::ApplicationXRsyncSignature => String::from("application/x-rsync-signature"),
|
||||||
|
Self::ApplicationXRsyncDelta => String::from("application/x-rsync-delta"),
|
||||||
|
Self::ApplicationOctetStream => String::from("application/octet-stream"),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
72
src/models/mod.rs
Normal file
72
src/models/mod.rs
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
pub mod config;
|
||||||
|
pub use self::config::Config;
|
||||||
|
pub mod config_announcements;
|
||||||
|
pub use self::config_announcements::ConfigAnnouncements;
|
||||||
|
pub mod config_download_urls;
|
||||||
|
pub use self::config_download_urls::ConfigDownloadUrls;
|
||||||
|
pub mod config_dynamic_world_rows;
|
||||||
|
pub use self::config_dynamic_world_rows::ConfigDynamicWorldRows;
|
||||||
|
pub mod config_events;
|
||||||
|
pub use self::config_events::ConfigEvents;
|
||||||
|
pub mod current_user;
|
||||||
|
pub use self::current_user::CurrentUser;
|
||||||
|
pub mod deployment_group;
|
||||||
|
pub use self::deployment_group::DeploymentGroup;
|
||||||
|
pub mod developer_type;
|
||||||
|
pub use self::developer_type::DeveloperType;
|
||||||
|
pub mod error;
|
||||||
|
pub use self::error::Error;
|
||||||
|
pub mod file;
|
||||||
|
pub use self::file::File;
|
||||||
|
pub mod file_data;
|
||||||
|
pub use self::file_data::FileData;
|
||||||
|
pub mod file_status;
|
||||||
|
pub use self::file_status::FileStatus;
|
||||||
|
pub mod file_version;
|
||||||
|
pub use self::file_version::FileVersion;
|
||||||
|
pub mod inline_object;
|
||||||
|
pub use self::inline_object::InlineObject;
|
||||||
|
pub mod inline_object_1;
|
||||||
|
pub use self::inline_object_1::InlineObject1;
|
||||||
|
pub mod inline_object_2;
|
||||||
|
pub use self::inline_object_2::InlineObject2;
|
||||||
|
pub mod inline_object_3;
|
||||||
|
pub use self::inline_object_3::InlineObject3;
|
||||||
|
pub mod inline_object_4;
|
||||||
|
pub use self::inline_object_4::InlineObject4;
|
||||||
|
pub mod inline_response_200;
|
||||||
|
pub use self::inline_response_200::InlineResponse200;
|
||||||
|
pub mod inline_response_200_1;
|
||||||
|
pub use self::inline_response_200_1::InlineResponse2001;
|
||||||
|
pub mod inline_response_200_2;
|
||||||
|
pub use self::inline_response_200_2::InlineResponse2002;
|
||||||
|
pub mod inline_response_200_3;
|
||||||
|
pub use self::inline_response_200_3::InlineResponse2003;
|
||||||
|
pub mod inline_response_200_4;
|
||||||
|
pub use self::inline_response_200_4::InlineResponse2004;
|
||||||
|
pub mod inline_response_200_5;
|
||||||
|
pub use self::inline_response_200_5::InlineResponse2005;
|
||||||
|
pub mod inline_response_401;
|
||||||
|
pub use self::inline_response_401::InlineResponse401;
|
||||||
|
pub mod limited_user;
|
||||||
|
pub use self::limited_user::LimitedUser;
|
||||||
|
pub mod limited_world;
|
||||||
|
pub use self::limited_world::LimitedWorld;
|
||||||
|
pub mod mime_type;
|
||||||
|
pub use self::mime_type::MimeType;
|
||||||
|
pub mod notification;
|
||||||
|
pub use self::notification::Notification;
|
||||||
|
pub mod notification_type;
|
||||||
|
pub use self::notification_type::NotificationType;
|
||||||
|
pub mod release_status;
|
||||||
|
pub use self::release_status::ReleaseStatus;
|
||||||
|
pub mod response;
|
||||||
|
pub use self::response::Response;
|
||||||
|
pub mod success;
|
||||||
|
pub use self::success::Success;
|
||||||
|
pub mod user;
|
||||||
|
pub use self::user::User;
|
||||||
|
pub mod user_state;
|
||||||
|
pub use self::user_state::UserState;
|
||||||
|
pub mod user_status;
|
||||||
|
pub use self::user_status::UserStatus;
|
53
src/models/notification.rs
Normal file
53
src/models/notification.rs
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
/// Notification :
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct Notification {
|
||||||
|
#[serde(rename = "id")]
|
||||||
|
pub id: String,
|
||||||
|
#[serde(rename = "senderUserId")]
|
||||||
|
pub sender_user_id: String,
|
||||||
|
#[serde(rename = "senderUsername")]
|
||||||
|
pub sender_username: String,
|
||||||
|
#[serde(rename = "type")]
|
||||||
|
pub _type: crate::models::NotificationType,
|
||||||
|
///
|
||||||
|
#[serde(rename = "message")]
|
||||||
|
pub message: String,
|
||||||
|
/// **NOTICE:** This is not a JSON object, this is a json **encoded** object, meaning you have to json-de-encode to get the NotificationDetail object depending on the NotificationType.
|
||||||
|
#[serde(rename = "details")]
|
||||||
|
pub details: String,
|
||||||
|
#[serde(rename = "seen")]
|
||||||
|
pub seen: bool,
|
||||||
|
#[serde(rename = "created_at")]
|
||||||
|
pub created_at: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Notification {
|
||||||
|
///
|
||||||
|
pub fn new(id: String, sender_user_id: String, sender_username: String, _type: crate::models::NotificationType, message: String, details: String, seen: bool, created_at: String) -> Notification {
|
||||||
|
Notification {
|
||||||
|
id,
|
||||||
|
sender_user_id,
|
||||||
|
sender_username,
|
||||||
|
_type,
|
||||||
|
message,
|
||||||
|
details,
|
||||||
|
seen,
|
||||||
|
created_at,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
48
src/models/notification_type.rs
Normal file
48
src/models/notification_type.rs
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
///
|
||||||
|
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
|
||||||
|
pub enum NotificationType {
|
||||||
|
#[serde(rename = "all")]
|
||||||
|
All,
|
||||||
|
#[serde(rename = "broadcast")]
|
||||||
|
Broadcast,
|
||||||
|
#[serde(rename = "friendRequest")]
|
||||||
|
FriendRequest,
|
||||||
|
#[serde(rename = "invite")]
|
||||||
|
Invite,
|
||||||
|
#[serde(rename = "message")]
|
||||||
|
Message,
|
||||||
|
#[serde(rename = "RequestInvite")]
|
||||||
|
RequestInvite,
|
||||||
|
#[serde(rename = "votetokick")]
|
||||||
|
Votetokick,
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ToString for NotificationType {
|
||||||
|
fn to_string(&self) -> String {
|
||||||
|
match self {
|
||||||
|
Self::All => String::from("all"),
|
||||||
|
Self::Broadcast => String::from("broadcast"),
|
||||||
|
Self::FriendRequest => String::from("friendRequest"),
|
||||||
|
Self::Invite => String::from("invite"),
|
||||||
|
Self::Message => String::from("message"),
|
||||||
|
Self::RequestInvite => String::from("RequestInvite"),
|
||||||
|
Self::Votetokick => String::from("votetokick"),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
36
src/models/release_status.rs
Normal file
36
src/models/release_status.rs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
///
|
||||||
|
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
|
||||||
|
pub enum ReleaseStatus {
|
||||||
|
#[serde(rename = "public")]
|
||||||
|
Public,
|
||||||
|
#[serde(rename = "private")]
|
||||||
|
Private,
|
||||||
|
#[serde(rename = "hidden")]
|
||||||
|
Hidden,
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ToString for ReleaseStatus {
|
||||||
|
fn to_string(&self) -> String {
|
||||||
|
match self {
|
||||||
|
Self::Public => String::from("public"),
|
||||||
|
Self::Private => String::from("private"),
|
||||||
|
Self::Hidden => String::from("hidden"),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
31
src/models/response.rs
Normal file
31
src/models/response.rs
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct Response {
|
||||||
|
#[serde(rename = "message")]
|
||||||
|
pub message: String,
|
||||||
|
#[serde(rename = "status_code")]
|
||||||
|
pub status_code: f32,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Response {
|
||||||
|
pub fn new(message: String, status_code: f32) -> Response {
|
||||||
|
Response {
|
||||||
|
message,
|
||||||
|
status_code,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
28
src/models/success.rs
Normal file
28
src/models/success.rs
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct Success {
|
||||||
|
#[serde(rename = "success", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub success: Option<Box<crate::models::Response>>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Success {
|
||||||
|
pub fn new() -> Success {
|
||||||
|
Success {
|
||||||
|
success: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
97
src/models/user.rs
Normal file
97
src/models/user.rs
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct User {
|
||||||
|
#[serde(rename = "id")]
|
||||||
|
pub id: String,
|
||||||
|
#[serde(rename = "username")]
|
||||||
|
pub username: String,
|
||||||
|
#[serde(rename = "displayName")]
|
||||||
|
pub display_name: String,
|
||||||
|
#[serde(rename = "userIcon")]
|
||||||
|
pub user_icon: String,
|
||||||
|
#[serde(rename = "bio")]
|
||||||
|
pub bio: String,
|
||||||
|
#[serde(rename = "bioLinks")]
|
||||||
|
pub bio_links: Vec<String>,
|
||||||
|
#[serde(rename = "profilePicOverride")]
|
||||||
|
pub profile_pic_override: String,
|
||||||
|
#[serde(rename = "statusDescription")]
|
||||||
|
pub status_description: String,
|
||||||
|
#[serde(rename = "currentAvatarImageUrl")]
|
||||||
|
pub current_avatar_image_url: String,
|
||||||
|
#[serde(rename = "currentAvatarThumbnailImageUrl")]
|
||||||
|
pub current_avatar_thumbnail_image_url: String,
|
||||||
|
#[serde(rename = "fallbackAvatar")]
|
||||||
|
pub fallback_avatar: String,
|
||||||
|
#[serde(rename = "state")]
|
||||||
|
pub state: crate::models::UserState,
|
||||||
|
#[serde(rename = "tags")]
|
||||||
|
pub tags: Vec<String>,
|
||||||
|
#[serde(rename = "developerType")]
|
||||||
|
pub developer_type: crate::models::DeveloperType,
|
||||||
|
#[serde(rename = "last_login")]
|
||||||
|
pub last_login: String,
|
||||||
|
#[serde(rename = "last_platform")]
|
||||||
|
pub last_platform: String,
|
||||||
|
#[serde(rename = "allowAvatarCopying")]
|
||||||
|
pub allow_avatar_copying: bool,
|
||||||
|
#[serde(rename = "status")]
|
||||||
|
pub status: crate::models::UserStatus,
|
||||||
|
#[serde(rename = "date_joined")]
|
||||||
|
pub date_joined: String,
|
||||||
|
#[serde(rename = "isFriend")]
|
||||||
|
pub is_friend: bool,
|
||||||
|
#[serde(rename = "friendKey")]
|
||||||
|
pub friend_key: String,
|
||||||
|
#[serde(rename = "worldId", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub world_id: Option<String>,
|
||||||
|
#[serde(rename = "instanceId", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub instance_id: Option<String>,
|
||||||
|
#[serde(rename = "location", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub location: Option<String>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl User {
|
||||||
|
pub fn new(id: String, username: String, display_name: String, user_icon: String, bio: String, bio_links: Vec<String>, profile_pic_override: String, status_description: String, current_avatar_image_url: String, current_avatar_thumbnail_image_url: String, fallback_avatar: String, state: crate::models::UserState, tags: Vec<String>, developer_type: crate::models::DeveloperType, last_login: String, last_platform: String, allow_avatar_copying: bool, status: crate::models::UserStatus, date_joined: String, is_friend: bool, friend_key: String) -> User {
|
||||||
|
User {
|
||||||
|
id,
|
||||||
|
username,
|
||||||
|
display_name,
|
||||||
|
user_icon,
|
||||||
|
bio,
|
||||||
|
bio_links,
|
||||||
|
profile_pic_override,
|
||||||
|
status_description,
|
||||||
|
current_avatar_image_url,
|
||||||
|
current_avatar_thumbnail_image_url,
|
||||||
|
fallback_avatar,
|
||||||
|
state,
|
||||||
|
tags,
|
||||||
|
developer_type,
|
||||||
|
last_login,
|
||||||
|
last_platform,
|
||||||
|
allow_avatar_copying,
|
||||||
|
status,
|
||||||
|
date_joined,
|
||||||
|
is_friend,
|
||||||
|
friend_key,
|
||||||
|
world_id: None,
|
||||||
|
instance_id: None,
|
||||||
|
location: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
37
src/models/user_state.rs
Normal file
37
src/models/user_state.rs
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
/// UserState : * \"online\" User is online in VRChat * \"active\" User is online, but not in VRChat * \"offline\" User is offline
|
||||||
|
|
||||||
|
/// * \"online\" User is online in VRChat * \"active\" User is online, but not in VRChat * \"offline\" User is offline
|
||||||
|
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
|
||||||
|
pub enum UserState {
|
||||||
|
#[serde(rename = "offline")]
|
||||||
|
Offline,
|
||||||
|
#[serde(rename = "active")]
|
||||||
|
Active,
|
||||||
|
#[serde(rename = "online")]
|
||||||
|
Online,
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ToString for UserState {
|
||||||
|
fn to_string(&self) -> String {
|
||||||
|
match self {
|
||||||
|
Self::Offline => String::from("offline"),
|
||||||
|
Self::Active => String::from("active"),
|
||||||
|
Self::Online => String::from("online"),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
43
src/models/user_status.rs
Normal file
43
src/models/user_status.rs
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
* VRChat API Documentation
|
||||||
|
*
|
||||||
|
*  # VRChat API Documentation This project is an [OPEN Open Source Project](https://openopensource.org) Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. ## Disclaimer This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API. > **Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:** > * We do not provide documentation or support for the API. > * Do not make queries to the API more than once per 60 seconds. > * Abuse of the API may result in account termination. > * Access to API endpoints may break at any given time, with no warning. As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it. ## Get in touch with us! [https://discord.gg/qjZE9C9fkB#vrchat-api](https://discord.gg/qjZE9C9fkB)
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
* Contact: me@ruby.js.org
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
/// UserStatus : Defines the User's current status, for example \"ask me\", \"join me\" or \"offline. This status is a combined indicator of their online activity and privacy preference.
|
||||||
|
|
||||||
|
/// Defines the User's current status, for example \"ask me\", \"join me\" or \"offline. This status is a combined indicator of their online activity and privacy preference.
|
||||||
|
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
|
||||||
|
pub enum UserStatus {
|
||||||
|
#[serde(rename = "active")]
|
||||||
|
Active,
|
||||||
|
#[serde(rename = "join me")]
|
||||||
|
JoinMe,
|
||||||
|
#[serde(rename = "ask me")]
|
||||||
|
AskMe,
|
||||||
|
#[serde(rename = "busy")]
|
||||||
|
Busy,
|
||||||
|
#[serde(rename = "offline")]
|
||||||
|
Offline,
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ToString for UserStatus {
|
||||||
|
fn to_string(&self) -> String {
|
||||||
|
match self {
|
||||||
|
Self::Active => String::from("active"),
|
||||||
|
Self::JoinMe => String::from("join me"),
|
||||||
|
Self::AskMe => String::from("ask me"),
|
||||||
|
Self::Busy => String::from("busy"),
|
||||||
|
Self::Offline => String::from("offline"),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user