Skip to content

Commit 1df6163

Browse files
committed
Upgrade Python SDK to spec 1.11.0
1 parent 8efcff0 commit 1df6163

File tree

147 files changed

+660
-148
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+660
-148
lines changed

.openapi-generator/FILES

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ docs/TransactionStatus.md
111111
docs/TransactionSteamInfo.md
112112
docs/TransactionSteamWalletInfo.md
113113
docs/TwoFactorAuthCode.md
114+
docs/TwoFactorEmailCode.md
114115
docs/UnityPackage.md
115116
docs/UpdateAvatarRequest.md
116117
docs/UpdateFavoriteGroupRequest.md
@@ -127,6 +128,7 @@ docs/UserState.md
127128
docs/UserStatus.md
128129
docs/UserSubscription.md
129130
docs/UsersApi.md
131+
docs/Verify2FAEmailCodeResult.md
130132
docs/Verify2FAResult.md
131133
docs/VerifyAuthTokenResult.md
132134
docs/World.md
@@ -259,6 +261,7 @@ vrchatapi/models/transaction_status.py
259261
vrchatapi/models/transaction_steam_info.py
260262
vrchatapi/models/transaction_steam_wallet_info.py
261263
vrchatapi/models/two_factor_auth_code.py
264+
vrchatapi/models/two_factor_email_code.py
262265
vrchatapi/models/unity_package.py
263266
vrchatapi/models/update_avatar_request.py
264267
vrchatapi/models/update_favorite_group_request.py
@@ -274,6 +277,7 @@ vrchatapi/models/user_exists.py
274277
vrchatapi/models/user_state.py
275278
vrchatapi/models/user_status.py
276279
vrchatapi/models/user_subscription.py
280+
vrchatapi/models/verify2_fa_email_code_result.py
277281
vrchatapi/models/verify2_fa_result.py
278282
vrchatapi/models/verify_auth_token_result.py
279283
vrchatapi/models/world.py

docs/AuthenticationApi.md

Lines changed: 76 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ All URIs are relative to *https://api.vrchat.cloud/api/1*
55
Method | HTTP request | Description
66
------------- | ------------- | -------------
77
[**check_user_exists**](AuthenticationApi.md#check_user_exists) | **GET** /auth/exists | Check User Exists
8-
[**delete_user**](AuthenticationApi.md#delete_user) | **PUT** /user/{userId}/delete | Delete User
8+
[**delete_user**](AuthenticationApi.md#delete_user) | **PUT** /users/{userId}/delete | Delete User
99
[**get_current_user**](AuthenticationApi.md#get_current_user) | **GET** /auth/user | Login and/or Get Current User Info
1010
[**logout**](AuthenticationApi.md#logout) | **PUT** /logout | Logout
1111
[**verify2_fa**](AuthenticationApi.md#verify2_fa) | **POST** /auth/twofactorauth/totp/verify | Verify 2FA code
12+
[**verify2_fa_email_code**](AuthenticationApi.md#verify2_fa_email_code) | **POST** /auth/twofactorauth/emailotp/verify | Verify 2FA email code
1213
[**verify_auth_token**](AuthenticationApi.md#verify_auth_token) | **GET** /auth | Verify Auth Token
1314
[**verify_recovery_code**](AuthenticationApi.md#verify_recovery_code) | **POST** /auth/twofactorauth/otp/verify | Verify 2FA code with Recovery code
1415

@@ -541,6 +542,80 @@ Name | Type | Description | Notes
541542

542543
[[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)
543544

545+
# **verify2_fa_email_code**
546+
> Verify2FAEmailCodeResult verify2_fa_email_code(two_factor_email_code=two_factor_email_code)
547+
548+
Verify 2FA email code
549+
550+
Finishes the login sequence with an 2FA email code.
551+
552+
### Example
553+
554+
* Api Key Authentication (authCookie):
555+
```python
556+
from __future__ import print_function
557+
import time
558+
import vrchatapi
559+
from vrchatapi.rest import ApiException
560+
from pprint import pprint
561+
# Defining the host is optional and defaults to https://api.vrchat.cloud/api/1
562+
# See configuration.py for a list of all supported configuration parameters.
563+
configuration = vrchatapi.Configuration(
564+
host = "https://api.vrchat.cloud/api/1"
565+
)
566+
567+
# The client must configure the authentication and authorization parameters
568+
# in accordance with the API server security policy.
569+
# Examples for each auth method are provided below, use the example that
570+
# satisfies your auth use case.
571+
572+
# Configure API key authorization: authCookie
573+
configuration.api_key['authCookie'] = 'YOUR_API_KEY'
574+
575+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
576+
# configuration.api_key_prefix['authCookie'] = 'Bearer'
577+
578+
# Enter a context with an instance of the API client
579+
with vrchatapi.ApiClient(configuration) as api_client:
580+
# Create an instance of the API class
581+
api_instance = vrchatapi.AuthenticationApi(api_client)
582+
two_factor_email_code = vrchatapi.TwoFactorEmailCode() # TwoFactorEmailCode | (optional)
583+
584+
try:
585+
# Verify 2FA email code
586+
api_response = api_instance.verify2_fa_email_code(two_factor_email_code=two_factor_email_code)
587+
pprint(api_response)
588+
except ApiException as e:
589+
print("Exception when calling AuthenticationApi->verify2_fa_email_code: %s\n" % e)
590+
```
591+
592+
### Parameters
593+
594+
Name | Type | Description | Notes
595+
------------- | ------------- | ------------- | -------------
596+
**two_factor_email_code** | [**TwoFactorEmailCode**](TwoFactorEmailCode.md)| | [optional]
597+
598+
### Return type
599+
600+
[**Verify2FAEmailCodeResult**](Verify2FAEmailCodeResult.md)
601+
602+
### Authorization
603+
604+
[authCookie](../README.md#authCookie)
605+
606+
### HTTP request headers
607+
608+
- **Content-Type**: application/json
609+
- **Accept**: application/json
610+
611+
### HTTP response details
612+
| Status code | Description | Response headers |
613+
|-------------|-------------|------------------|
614+
**200** | OK | * Set-Cookie - Provides a &#x60;twoFactorAuth&#x60; cookie, which can be used to bypasses the 2FA requirement for future logins on the same device. <br> |
615+
**401** | Error response due to missing apiKey or auth cookie. | - |
616+
617+
[[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)
618+
544619
# **verify_auth_token**
545620
> VerifyAuthTokenResult verify_auth_token()
546621

docs/TwoFactorEmailCode.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# TwoFactorEmailCode
2+
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**code** | **str** | |
8+
9+
[[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+
11+

docs/Verify2FAEmailCodeResult.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Verify2FAEmailCodeResult
2+
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**verified** | **bool** | |
8+
9+
[[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+
11+

setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
import vrchatapi
3737
from vrchatapi.api import authentication_api
3838
from vrchatapi.exceptions import UnauthorizedException
39-
from vrchatapi.model.two_factor_auth_code import TwoFactorAuthCode
39+
from vrchatapi.models.two_factor_auth_code import TwoFactorAuthCode
4040
4141
configuration = vrchatapi.Configuration(
4242
username = 'username',
@@ -76,7 +76,7 @@
7676
7777
Join the [Discord server](https://discord.gg/Ge2APMhPfD) to get in touch with us.
7878
79-
The version of the OpenAPI document: 1.10.1
79+
The version of the OpenAPI document: 1.11.0
8080
Contact: me@ariesclark.com
8181
Generated by: https://openapi-generator.tech
8282
"""
@@ -85,7 +85,7 @@
8585
from setuptools import setup, find_packages # noqa: H301
8686

8787
NAME = "vrchatapi"
88-
VERSION = "1.10.1"
88+
VERSION = "1.11.0"
8989
# To install the library, run the following
9090
#
9191
# python setup.py install
@@ -106,7 +106,7 @@
106106
install_requires=REQUIRES,
107107
packages=find_packages(exclude=["test", "tests"]),
108108
include_package_data=True,
109-
license="The MIT License (MIT)",
109+
license="MIT",
110110
long_description_content_type='text/markdown',
111111
long_description="""\
112112
@@ -142,7 +142,7 @@
142142
import vrchatapi
143143
from vrchatapi.api import authentication_api
144144
from vrchatapi.exceptions import UnauthorizedException
145-
from vrchatapi.model.two_factor_auth_code import TwoFactorAuthCode
145+
from vrchatapi.models.two_factor_auth_code import TwoFactorAuthCode
146146
147147
configuration = vrchatapi.Configuration(
148148
username = 'username',

vrchatapi/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
VRChat API Documentation
77
88
9-
The version of the OpenAPI document: 1.10.1
9+
The version of the OpenAPI document: 1.11.0
1010
Contact: me@ariesclark.com
1111
Generated by: https://openapi-generator.tech
1212
"""
@@ -142,6 +142,7 @@
142142
from vrchatapi.models.transaction_steam_info import TransactionSteamInfo
143143
from vrchatapi.models.transaction_steam_wallet_info import TransactionSteamWalletInfo
144144
from vrchatapi.models.two_factor_auth_code import TwoFactorAuthCode
145+
from vrchatapi.models.two_factor_email_code import TwoFactorEmailCode
145146
from vrchatapi.models.unity_package import UnityPackage
146147
from vrchatapi.models.update_avatar_request import UpdateAvatarRequest
147148
from vrchatapi.models.update_favorite_group_request import UpdateFavoriteGroupRequest
@@ -157,6 +158,7 @@
157158
from vrchatapi.models.user_state import UserState
158159
from vrchatapi.models.user_status import UserStatus
159160
from vrchatapi.models.user_subscription import UserSubscription
161+
from vrchatapi.models.verify2_fa_email_code_result import Verify2FAEmailCodeResult
160162
from vrchatapi.models.verify2_fa_result import Verify2FAResult
161163
from vrchatapi.models.verify_auth_token_result import VerifyAuthTokenResult
162164
from vrchatapi.models.world import World

vrchatapi/api/authentication_api.py

Lines changed: 145 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
VRChat API Documentation
55
66
7-
The version of the OpenAPI document: 1.10.1
7+
The version of the OpenAPI document: 1.11.0
88
Contact: me@ariesclark.com
99
Generated by: https://openapi-generator.tech
1010
"""
@@ -314,7 +314,7 @@ def delete_user_with_http_info(self, user_id, **kwargs): # noqa: E501
314314
}
315315

316316
return self.api_client.call_api(
317-
'/user/{userId}/delete', 'PUT',
317+
'/users/{userId}/delete', 'PUT',
318318
path_params,
319319
query_params,
320320
header_params,
@@ -729,6 +729,149 @@ def verify2_fa_with_http_info(self, **kwargs): # noqa: E501
729729
collection_formats=collection_formats,
730730
_request_auth=local_var_params.get('_request_auth'))
731731

732+
def verify2_fa_email_code(self, **kwargs): # noqa: E501
733+
"""Verify 2FA email code # noqa: E501
734+
735+
Finishes the login sequence with an 2FA email code. # noqa: E501
736+
This method makes a synchronous HTTP request by default. To make an
737+
asynchronous HTTP request, please pass async_req=True
738+
739+
>>> thread = api.verify2_fa_email_code(async_req=True)
740+
>>> result = thread.get()
741+
742+
:param two_factor_email_code:
743+
:type two_factor_email_code: TwoFactorEmailCode
744+
:param async_req: Whether to execute the request asynchronously.
745+
:type async_req: bool, optional
746+
:param _preload_content: if False, the urllib3.HTTPResponse object will
747+
be returned without reading/decoding response
748+
data. Default is True.
749+
:type _preload_content: bool, optional
750+
:param _request_timeout: timeout setting for this request. If one
751+
number provided, it will be total request
752+
timeout. It can also be a pair (tuple) of
753+
(connection, read) timeouts.
754+
:return: Returns the result object.
755+
If the method is called asynchronously,
756+
returns the request thread.
757+
:rtype: Verify2FAEmailCodeResult
758+
"""
759+
kwargs['_return_http_data_only'] = True
760+
return self.verify2_fa_email_code_with_http_info(**kwargs) # noqa: E501
761+
762+
def verify2_fa_email_code_with_http_info(self, **kwargs): # noqa: E501
763+
"""Verify 2FA email code # noqa: E501
764+
765+
Finishes the login sequence with an 2FA email code. # noqa: E501
766+
This method makes a synchronous HTTP request by default. To make an
767+
asynchronous HTTP request, please pass async_req=True
768+
769+
>>> thread = api.verify2_fa_email_code_with_http_info(async_req=True)
770+
>>> result = thread.get()
771+
772+
:param two_factor_email_code:
773+
:type two_factor_email_code: TwoFactorEmailCode
774+
:param async_req: Whether to execute the request asynchronously.
775+
:type async_req: bool, optional
776+
:param _return_http_data_only: response data without head status code
777+
and headers
778+
:type _return_http_data_only: bool, optional
779+
:param _preload_content: if False, the urllib3.HTTPResponse object will
780+
be returned without reading/decoding response
781+
data. Default is True.
782+
:type _preload_content: bool, optional
783+
:param _request_timeout: timeout setting for this request. If one
784+
number provided, it will be total request
785+
timeout. It can also be a pair (tuple) of
786+
(connection, read) timeouts.
787+
:param _request_auth: set to override the auth_settings for an a single
788+
request; this effectively ignores the authentication
789+
in the spec for a single request.
790+
:type _request_auth: dict, optional
791+
:type _content_type: string, optional: force content-type for the request
792+
:return: Returns the result object.
793+
If the method is called asynchronously,
794+
returns the request thread.
795+
:rtype: tuple(Verify2FAEmailCodeResult, status_code(int), headers(HTTPHeaderDict))
796+
"""
797+
798+
local_var_params = locals()
799+
800+
all_params = [
801+
'two_factor_email_code'
802+
]
803+
all_params.extend(
804+
[
805+
'async_req',
806+
'_return_http_data_only',
807+
'_preload_content',
808+
'_request_timeout',
809+
'_request_auth',
810+
'_content_type',
811+
'_headers'
812+
]
813+
)
814+
815+
for key, val in six.iteritems(local_var_params['kwargs']):
816+
if key not in all_params:
817+
raise ApiTypeError(
818+
"Got an unexpected keyword argument '%s'"
819+
" to method verify2_fa_email_code" % key
820+
)
821+
local_var_params[key] = val
822+
del local_var_params['kwargs']
823+
824+
collection_formats = {}
825+
826+
path_params = {}
827+
828+
query_params = []
829+
830+
header_params = dict(local_var_params.get('_headers', {}))
831+
832+
form_params = []
833+
local_var_files = {}
834+
835+
body_params = None
836+
if 'two_factor_email_code' in local_var_params:
837+
body_params = local_var_params['two_factor_email_code']
838+
# HTTP header `Accept`
839+
header_params['Accept'] = self.api_client.select_header_accept(
840+
['application/json']) # noqa: E501
841+
842+
# HTTP header `Content-Type`
843+
content_types_list = local_var_params.get('_content_type',
844+
self.api_client.select_header_content_type(
845+
['application/json'],
846+
'POST', body_params)) # noqa: E501
847+
if content_types_list:
848+
header_params['Content-Type'] = content_types_list
849+
850+
# Authentication setting
851+
auth_settings = ['authCookie'] # noqa: E501
852+
853+
response_types_map = {
854+
200: "Verify2FAEmailCodeResult",
855+
401: "Error",
856+
}
857+
858+
return self.api_client.call_api(
859+
'/auth/twofactorauth/emailotp/verify', 'POST',
860+
path_params,
861+
query_params,
862+
header_params,
863+
body=body_params,
864+
post_params=form_params,
865+
files=local_var_files,
866+
response_types_map=response_types_map,
867+
auth_settings=auth_settings,
868+
async_req=local_var_params.get('async_req'),
869+
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
870+
_preload_content=local_var_params.get('_preload_content', True),
871+
_request_timeout=local_var_params.get('_request_timeout'),
872+
collection_formats=collection_formats,
873+
_request_auth=local_var_params.get('_request_auth'))
874+
732875
def verify_auth_token(self, **kwargs): # noqa: E501
733876
"""Verify Auth Token # noqa: E501
734877

vrchatapi/api/avatars_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
VRChat API Documentation
55
66
7-
The version of the OpenAPI document: 1.10.1
7+
The version of the OpenAPI document: 1.11.0
88
Contact: me@ariesclark.com
99
Generated by: https://openapi-generator.tech
1010
"""

0 commit comments

Comments
 (0)