Skip to content

Commit b45307f

Browse files
committed
Upgrade Python SDK to spec 1.16.0
1 parent 438a4ea commit b45307f

File tree

7 files changed

+802
-0
lines changed

7 files changed

+802
-0
lines changed

.openapi-generator/FILES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ docs/License.md
7979
docs/LicenseAction.md
8080
docs/LicenseGroup.md
8181
docs/LicenseType.md
82+
docs/LimitedGroup.md
8283
docs/LimitedUnityPackage.md
8384
docs/LimitedUser.md
8485
docs/LimitedWorld.md
@@ -234,6 +235,7 @@ vrchatapi/models/license.py
234235
vrchatapi/models/license_action.py
235236
vrchatapi/models/license_group.py
236237
vrchatapi/models/license_type.py
238+
vrchatapi/models/limited_group.py
237239
vrchatapi/models/limited_unity_package.py
238240
vrchatapi/models/limited_user.py
239241
vrchatapi/models/limited_world.py

docs/GroupsApi.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Method | HTTP request | Description
3535
[**leave_group**](GroupsApi.md#leave_group) | **POST** /groups/{groupId}/leave | Leave Group
3636
[**remove_group_member_role**](GroupsApi.md#remove_group_member_role) | **DELETE** /groups/{groupId}/members/{userId}/roles/{groupRoleId} | Remove Role from GroupMember
3737
[**respond_group_join_request**](GroupsApi.md#respond_group_join_request) | **PUT** /groups/{groupId}/requests/{userId} | Respond Group Join request
38+
[**search_groups**](GroupsApi.md#search_groups) | **GET** /groups | Search Group
3839
[**unban_group_member**](GroupsApi.md#unban_group_member) | **DELETE** /groups/{groupId}/bans/{userId} | Unban Group Member
3940
[**update_group**](GroupsApi.md#update_group) | **PUT** /groups/{groupId} | Update Group
4041
[**update_group_gallery**](GroupsApi.md#update_group_gallery) | **PUT** /groups/{groupId}/galleries/{groupGalleryId} | Update Group Gallery
@@ -2433,6 +2434,73 @@ void (empty response body)
24332434

24342435
[[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)
24352436

2437+
# **search_groups**
2438+
> list[LimitedGroup] search_groups(query=query, offset=offset, n=n)
2439+
2440+
Search Group
2441+
2442+
Searches Groups by name or shortCode
2443+
2444+
### Example
2445+
2446+
```python
2447+
from __future__ import print_function
2448+
import time
2449+
import vrchatapi
2450+
from vrchatapi.rest import ApiException
2451+
from pprint import pprint
2452+
# Defining the host is optional and defaults to https://api.vrchat.cloud/api/1
2453+
# See configuration.py for a list of all supported configuration parameters.
2454+
configuration = vrchatapi.Configuration(
2455+
host = "https://api.vrchat.cloud/api/1"
2456+
)
2457+
2458+
2459+
# Enter a context with an instance of the API client
2460+
with vrchatapi.ApiClient() as api_client:
2461+
# Create an instance of the API class
2462+
api_instance = vrchatapi.GroupsApi(api_client)
2463+
query = 'query_example' # str | Query to search for, can be either Group Name or Group shortCode (optional)
2464+
offset = 56 # int | A zero-based offset from the default object sorting from where search results start. (optional)
2465+
n = 60 # int | The number of objects to return. (optional) (default to 60)
2466+
2467+
try:
2468+
# Search Group
2469+
api_response = api_instance.search_groups(query=query, offset=offset, n=n)
2470+
pprint(api_response)
2471+
except ApiException as e:
2472+
print("Exception when calling GroupsApi->search_groups: %s\n" % e)
2473+
```
2474+
2475+
### Parameters
2476+
2477+
Name | Type | Description | Notes
2478+
------------- | ------------- | ------------- | -------------
2479+
**query** | **str**| Query to search for, can be either Group Name or Group shortCode | [optional]
2480+
**offset** | **int**| A zero-based offset from the default object sorting from where search results start. | [optional]
2481+
**n** | **int**| The number of objects to return. | [optional] [default to 60]
2482+
2483+
### Return type
2484+
2485+
[**list[LimitedGroup]**](LimitedGroup.md)
2486+
2487+
### Authorization
2488+
2489+
No authorization required
2490+
2491+
### HTTP request headers
2492+
2493+
- **Content-Type**: Not defined
2494+
- **Accept**: application/json
2495+
2496+
### HTTP response details
2497+
| Status code | Description | Response headers |
2498+
|-------------|-------------|------------------|
2499+
**200** | Returns a list of LimitedGroup objects. | - |
2500+
**401** | Error response due to missing auth cookie. | - |
2501+
2502+
[[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)
2503+
24362504
# **unban_group_member**
24372505
> GroupMember unban_group_member(group_id, user_id)
24382506

docs/LimitedGroup.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# LimitedGroup
2+
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**id** | **str** | | [optional]
8+
**name** | **str** | | [optional]
9+
**short_code** | **str** | | [optional]
10+
**discriminator** | **str** | | [optional]
11+
**description** | **str** | | [optional]
12+
**icon_url** | **str** | | [optional]
13+
**banner_url** | **str** | | [optional]
14+
**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]
15+
**rules** | **str** | | [optional]
16+
**icon_id** | **str** | | [optional]
17+
**banner_id** | **str** | | [optional]
18+
**member_count** | **int** | | [optional]
19+
**tags** | **list[str]** | | [optional]
20+
**created_at** | **datetime** | | [optional]
21+
**membership_status** | [**GroupMemberStatus**](GroupMemberStatus.md) | | [optional]
22+
**is_searchable** | **bool** | | [optional]
23+
**galleries** | [**list[GroupGallery]**](GroupGallery.md) | | [optional]
24+
25+
[[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+
27+

vrchatapi/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@
114114
from vrchatapi.models.license_action import LicenseAction
115115
from vrchatapi.models.license_group import LicenseGroup
116116
from vrchatapi.models.license_type import LicenseType
117+
from vrchatapi.models.limited_group import LimitedGroup
117118
from vrchatapi.models.limited_unity_package import LimitedUnityPackage
118119
from vrchatapi.models.limited_user import LimitedUser
119120
from vrchatapi.models.limited_world import LimitedWorld

vrchatapi/api/groups_api.py

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4683,6 +4683,161 @@ def respond_group_join_request_with_http_info(self, group_id, user_id, **kwargs)
46834683
collection_formats=collection_formats,
46844684
_request_auth=local_var_params.get('_request_auth'))
46854685

4686+
def search_groups(self, **kwargs): # noqa: E501
4687+
"""Search Group # noqa: E501
4688+
4689+
Searches Groups by name or shortCode # noqa: E501
4690+
This method makes a synchronous HTTP request by default. To make an
4691+
asynchronous HTTP request, please pass async_req=True
4692+
4693+
>>> thread = api.search_groups(async_req=True)
4694+
>>> result = thread.get()
4695+
4696+
:param query: Query to search for, can be either Group Name or Group shortCode
4697+
:type query: str
4698+
:param offset: A zero-based offset from the default object sorting from where search results start.
4699+
:type offset: int
4700+
:param n: The number of objects to return.
4701+
:type n: int
4702+
:param async_req: Whether to execute the request asynchronously.
4703+
:type async_req: bool, optional
4704+
:param _preload_content: if False, the urllib3.HTTPResponse object will
4705+
be returned without reading/decoding response
4706+
data. Default is True.
4707+
:type _preload_content: bool, optional
4708+
:param _request_timeout: timeout setting for this request. If one
4709+
number provided, it will be total request
4710+
timeout. It can also be a pair (tuple) of
4711+
(connection, read) timeouts.
4712+
:return: Returns the result object.
4713+
If the method is called asynchronously,
4714+
returns the request thread.
4715+
:rtype: list[LimitedGroup]
4716+
"""
4717+
kwargs['_return_http_data_only'] = True
4718+
return self.search_groups_with_http_info(**kwargs) # noqa: E501
4719+
4720+
def search_groups_with_http_info(self, **kwargs): # noqa: E501
4721+
"""Search Group # noqa: E501
4722+
4723+
Searches Groups by name or shortCode # noqa: E501
4724+
This method makes a synchronous HTTP request by default. To make an
4725+
asynchronous HTTP request, please pass async_req=True
4726+
4727+
>>> thread = api.search_groups_with_http_info(async_req=True)
4728+
>>> result = thread.get()
4729+
4730+
:param query: Query to search for, can be either Group Name or Group shortCode
4731+
:type query: str
4732+
:param offset: A zero-based offset from the default object sorting from where search results start.
4733+
:type offset: int
4734+
:param n: The number of objects to return.
4735+
:type n: int
4736+
:param async_req: Whether to execute the request asynchronously.
4737+
:type async_req: bool, optional
4738+
:param _return_http_data_only: response data without head status code
4739+
and headers
4740+
:type _return_http_data_only: bool, optional
4741+
:param _preload_content: if False, the urllib3.HTTPResponse object will
4742+
be returned without reading/decoding response
4743+
data. Default is True.
4744+
:type _preload_content: bool, optional
4745+
:param _request_timeout: timeout setting for this request. If one
4746+
number provided, it will be total request
4747+
timeout. It can also be a pair (tuple) of
4748+
(connection, read) timeouts.
4749+
:param _request_auth: set to override the auth_settings for an a single
4750+
request; this effectively ignores the authentication
4751+
in the spec for a single request.
4752+
:type _request_auth: dict, optional
4753+
:type _content_type: string, optional: force content-type for the request
4754+
:return: Returns the result object.
4755+
If the method is called asynchronously,
4756+
returns the request thread.
4757+
:rtype: tuple(list[LimitedGroup], status_code(int), headers(HTTPHeaderDict))
4758+
"""
4759+
4760+
local_var_params = locals()
4761+
4762+
all_params = [
4763+
'query',
4764+
'offset',
4765+
'n'
4766+
]
4767+
all_params.extend(
4768+
[
4769+
'async_req',
4770+
'_return_http_data_only',
4771+
'_preload_content',
4772+
'_request_timeout',
4773+
'_request_auth',
4774+
'_content_type',
4775+
'_headers'
4776+
]
4777+
)
4778+
4779+
for key, val in six.iteritems(local_var_params['kwargs']):
4780+
if key not in all_params:
4781+
raise ApiTypeError(
4782+
"Got an unexpected keyword argument '%s'"
4783+
" to method search_groups" % key
4784+
)
4785+
local_var_params[key] = val
4786+
del local_var_params['kwargs']
4787+
4788+
if self.api_client.client_side_validation and 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501
4789+
raise ApiValueError("Invalid value for parameter `offset` when calling `search_groups`, must be a value greater than or equal to `0`") # noqa: E501
4790+
if self.api_client.client_side_validation and 'n' in local_var_params and local_var_params['n'] > 100: # noqa: E501
4791+
raise ApiValueError("Invalid value for parameter `n` when calling `search_groups`, must be a value less than or equal to `100`") # noqa: E501
4792+
if self.api_client.client_side_validation and 'n' in local_var_params and local_var_params['n'] < 1: # noqa: E501
4793+
raise ApiValueError("Invalid value for parameter `n` when calling `search_groups`, must be a value greater than or equal to `1`") # noqa: E501
4794+
collection_formats = {}
4795+
4796+
path_params = {}
4797+
4798+
query_params = []
4799+
if local_var_params.get('query') is not None: # noqa: E501
4800+
query_params.append(('query', local_var_params['query'])) # noqa: E501
4801+
if local_var_params.get('offset') is not None: # noqa: E501
4802+
query_params.append(('offset', local_var_params['offset'])) # noqa: E501
4803+
if local_var_params.get('n') is not None: # noqa: E501
4804+
query_params.append(('n', local_var_params['n'])) # noqa: E501
4805+
4806+
header_params = dict(local_var_params.get('_headers', {}))
4807+
4808+
form_params = []
4809+
local_var_files = {}
4810+
4811+
body_params = None
4812+
# HTTP header `Accept`
4813+
header_params['Accept'] = self.api_client.select_header_accept(
4814+
['application/json']) # noqa: E501
4815+
4816+
# Authentication setting
4817+
auth_settings = [] # noqa: E501
4818+
4819+
response_types_map = {
4820+
200: "list[LimitedGroup]",
4821+
401: "Error",
4822+
}
4823+
4824+
return self.api_client.call_api(
4825+
'/groups', 'GET',
4826+
path_params,
4827+
query_params,
4828+
header_params,
4829+
body=body_params,
4830+
post_params=form_params,
4831+
files=local_var_files,
4832+
response_types_map=response_types_map,
4833+
auth_settings=auth_settings,
4834+
async_req=local_var_params.get('async_req'),
4835+
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
4836+
_preload_content=local_var_params.get('_preload_content', True),
4837+
_request_timeout=local_var_params.get('_request_timeout'),
4838+
collection_formats=collection_formats,
4839+
_request_auth=local_var_params.get('_request_auth'))
4840+
46864841
def unban_group_member(self, group_id, user_id, **kwargs): # noqa: E501
46874842
"""Unban Group Member # noqa: E501
46884843

vrchatapi/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
from vrchatapi.models.license_action import LicenseAction
8686
from vrchatapi.models.license_group import LicenseGroup
8787
from vrchatapi.models.license_type import LicenseType
88+
from vrchatapi.models.limited_group import LimitedGroup
8889
from vrchatapi.models.limited_unity_package import LimitedUnityPackage
8990
from vrchatapi.models.limited_user import LimitedUser
9091
from vrchatapi.models.limited_world import LimitedWorld

0 commit comments

Comments
 (0)