Skip to content

Commit

Permalink
Upgrade Python SDK to spec 1.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
VRCCat committed Apr 15, 2024
1 parent c1b4560 commit 06b44f5
Show file tree
Hide file tree
Showing 155 changed files with 665 additions and 165 deletions.
2 changes: 2 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ docs/FinishFileDataUploadRequest.md
docs/FriendStatus.md
docs/FriendsApi.md
docs/Group.md
docs/GroupAccessType.md
docs/GroupAnnouncement.md
docs/GroupAuditLogEntry.md
docs/GroupGallery.md
Expand Down Expand Up @@ -206,6 +207,7 @@ vrchatapi/models/file_version_upload_status.py
vrchatapi/models/finish_file_data_upload_request.py
vrchatapi/models/friend_status.py
vrchatapi/models/group.py
vrchatapi/models/group_access_type.py
vrchatapi/models/group_announcement.py
vrchatapi/models/group_audit_log_entry.py
vrchatapi/models/group_gallery.py
Expand Down
1 change: 1 addition & 0 deletions docs/FriendsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ Name | Type | Description | Notes
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Returns a single Notifcation object. | - |
**400** | Bad request error response when sending a friend request | - |
**401** | Error response due to missing auth cookie. | - |
**404** | Error response when trying to send a friend request to a user which doesn't exist. | - |

Expand Down
11 changes: 11 additions & 0 deletions docs/GroupAccessType.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# GroupAccessType

Group access type when the instance type is \"group\"

## 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)


4 changes: 3 additions & 1 deletion docs/GroupsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -652,8 +652,9 @@ void (empty response body)
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**400** | User <displayName> is already invited | - |
**400** | Bad request error response when creating a group invite. | - |
**401** | Error response due to missing auth cookie. | - |
**403** | Forbidden error response when creating a group invite. | - |
**404** | Error response when trying to perform operations on a non-existing group. | - |

[[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)
Expand Down Expand Up @@ -1980,6 +1981,7 @@ Name | Type | Description | Notes
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Returns a list of GroupMember objects. | - |
**400** | Bad request error response when responding to a group join request | - |
**403** | Error response when trying to perform operations on a group you are not member of. | - |
**404** | Error response when trying to perform operations on a non-existing group. | - |

Expand Down
9 changes: 7 additions & 2 deletions docs/Instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Name | Type | Description | Notes
**location** | **str** | InstanceID can be \"offline\" on User profiles if you are not friends with that user and \"private\" if you are friends and user is in private instance. |
**n_users** | **int** | |
**name** | **str** | |
**owner_id** | **str** | A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. | [optional]
**owner_id** | **str** | A groupId if the instance type is \"group\", null if instance type is public, or a userId otherwise | [optional]
**permanent** | **bool** | | [default to False]
**photon_region** | [**Region**](Region.md) | |
**platforms** | [**InstancePlatforms**](InstancePlatforms.md) | |
Expand All @@ -31,11 +31,16 @@ Name | Type | Description | Notes
**queue_enabled** | **bool** | |
**queue_size** | **int** | |
**recommended_capacity** | **int** | |
**role_restricted** | **bool** | |
**role_restricted** | **bool** | | [optional]
**strict** | **bool** | |
**user_count** | **int** | |
**world** | [**World**](World.md) | |
**users** | [**list[LimitedUser]**](LimitedUser.md) | The users field is present on instances created by the requesting user. | [optional]
**group_access_type** | [**GroupAccessType**](GroupAccessType.md) | | [optional]
**has_capacity_for_you** | **bool** | | [optional]
**nonce** | **str** | | [optional]
**closed_at** | **datetime** | | [optional]
**hard_close** | **bool** | | [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)

Expand Down
81 changes: 81 additions & 0 deletions docs/InstancesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,93 @@ All URIs are relative to *https://api.vrchat.cloud/api/1*

Method | HTTP request | Description
------------- | ------------- | -------------
[**close_instance**](InstancesApi.md#close_instance) | **DELETE** /instances/{worldId}:{instanceId} | Close Instance
[**get_instance**](InstancesApi.md#get_instance) | **GET** /instances/{worldId}:{instanceId} | Get Instance
[**get_instance_by_short_name**](InstancesApi.md#get_instance_by_short_name) | **GET** /instances/s/{shortName} | Get Instance By Short Name
[**get_short_name**](InstancesApi.md#get_short_name) | **GET** /instances/{worldId}:{instanceId}/shortName | Get Instance Short Name
[**send_self_invite**](InstancesApi.md#send_self_invite) | **POST** /instances/{worldId}:{instanceId}/invite | Send Self Invite


# **close_instance**
> Instance close_instance(world_id, instance_id, hard_close=hard_close)
Close Instance

Close an instance. You can only close an instance if the ownerId is yourself or if the instance owner is a group and you have the `group-instance-moderate` permission.

### Example

* Api Key Authentication (authCookie):
```python
from __future__ import print_function
import time
import vrchatapi
from vrchatapi.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.vrchat.cloud/api/1
# See configuration.py for a list of all supported configuration parameters.
configuration = vrchatapi.Configuration(
host = "https://api.vrchat.cloud/api/1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: authCookie
configuration.api_key['authCookie'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['authCookie'] = 'Bearer'

# Enter a context with an instance of the API client
with vrchatapi.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = vrchatapi.InstancesApi(api_client)
world_id = 'world_id_example' # str | Must be a valid world ID.
instance_id = 'instance_id_example' # str | Must be a valid instance ID.
hard_close = True # bool | Whether to hard close the instance. Defaults to false. (optional)

try:
# Close Instance
api_response = api_instance.close_instance(world_id, instance_id, hard_close=hard_close)
pprint(api_response)
except ApiException as e:
print("Exception when calling InstancesApi->close_instance: %s\n" % e)
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**world_id** | **str**| Must be a valid world ID. |
**instance_id** | **str**| Must be a valid instance ID. |
**hard_close** | **bool**| Whether to hard close the instance. Defaults to false. | [optional]

### Return type

[**Instance**](Instance.md)

### Authorization

[authCookie](../README.md#authCookie)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Returns a single Instance object. | - |
**401** | Error response due to missing auth cookie. | - |
**403** | Error response due to not being allowed to close an instance | - |
**404** | Error response due to non existant instance | - |

[[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_instance**
> Instance get_instance(world_id, instance_id)
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
Join the [Discord server](https://discord.gg/Ge2APMhPfD) to get in touch with us.
The version of the OpenAPI document: 1.16.8
The version of the OpenAPI document: 1.17.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
"""
Expand All @@ -92,7 +92,7 @@
from setuptools import setup, find_packages # noqa: H301

NAME = "vrchatapi"
VERSION = "1.16.8"
VERSION = "1.17.0"
# To install the library, run the following
#
# python setup.py install
Expand Down
3 changes: 2 additions & 1 deletion vrchatapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
VRChat API Documentation
The version of the OpenAPI document: 1.16.8
The version of the OpenAPI document: 1.17.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
"""
Expand Down Expand Up @@ -82,6 +82,7 @@
from vrchatapi.models.finish_file_data_upload_request import FinishFileDataUploadRequest
from vrchatapi.models.friend_status import FriendStatus
from vrchatapi.models.group import Group
from vrchatapi.models.group_access_type import GroupAccessType
from vrchatapi.models.group_announcement import GroupAnnouncement
from vrchatapi.models.group_audit_log_entry import GroupAuditLogEntry
from vrchatapi.models.group_gallery import GroupGallery
Expand Down
2 changes: 1 addition & 1 deletion vrchatapi/api/authentication_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
VRChat API Documentation
The version of the OpenAPI document: 1.16.8
The version of the OpenAPI document: 1.17.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion vrchatapi/api/avatars_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
VRChat API Documentation
The version of the OpenAPI document: 1.16.8
The version of the OpenAPI document: 1.17.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion vrchatapi/api/economy_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
VRChat API Documentation
The version of the OpenAPI document: 1.16.8
The version of the OpenAPI document: 1.17.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion vrchatapi/api/favorites_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
VRChat API Documentation
The version of the OpenAPI document: 1.16.8
The version of the OpenAPI document: 1.17.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion vrchatapi/api/files_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
VRChat API Documentation
The version of the OpenAPI document: 1.16.8
The version of the OpenAPI document: 1.17.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
"""
Expand Down
3 changes: 2 additions & 1 deletion vrchatapi/api/friends_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
VRChat API Documentation
The version of the OpenAPI document: 1.16.8
The version of the OpenAPI document: 1.17.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
"""
Expand Down Expand Up @@ -293,6 +293,7 @@ def friend_with_http_info(self, user_id, **kwargs): # noqa: E501

response_types_map = {
200: "Notification",
400: "Error",
401: "Error",
404: "Error",
}
Expand Down
3 changes: 2 additions & 1 deletion vrchatapi/api/groups_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
VRChat API Documentation
The version of the OpenAPI document: 1.16.8
The version of the OpenAPI document: 1.17.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
"""
Expand Down Expand Up @@ -3852,6 +3852,7 @@ def get_group_requests_with_http_info(self, group_id, **kwargs): # noqa: E501

response_types_map = {
200: "list[GroupMember]",
400: "Error",
403: "Error",
404: "Error",
}
Expand Down
Loading

0 comments on commit 06b44f5

Please sign in to comment.