Skip to content

Commit

Permalink
Regenerated to match spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexios80 committed Feb 24, 2024
1 parent 1096897 commit b84f5a5
Show file tree
Hide file tree
Showing 22 changed files with 413 additions and 21 deletions.
2 changes: 1 addition & 1 deletion vrchat_dart/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ packages:
path: "../../vrchat_dart_generated"
relative: true
source: path
version: "1.16.5"
version: "1.16.6"
web:
dependency: transitive
description:
Expand Down
10 changes: 5 additions & 5 deletions vrchat_dart/example_flutter/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -127,18 +127,18 @@ packages:
dependency: transitive
description:
name: material_color_utilities
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
url: "https://pub.dev"
source: hosted
version: "0.5.0"
version: "0.8.0"
meta:
dependency: transitive
description:
name: meta
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
url: "https://pub.dev"
source: hosted
version: "1.10.0"
version: "1.11.0"
package_info_plus:
dependency: "direct main"
description:
Expand Down Expand Up @@ -309,7 +309,7 @@ packages:
path: "../../vrchat_dart_generated"
relative: true
source: path
version: "1.16.5"
version: "1.16.6"
web:
dependency: transitive
description:
Expand Down
3 changes: 3 additions & 0 deletions vrchat_dart_generated/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ doc/PlayerModerationType.md
doc/PlayermoderationApi.md
doc/Region.md
doc/ReleaseStatus.md
doc/RepresentedGroup.md
doc/RequestInviteRequest.md
doc/RespondGroupJoinRequest.md
doc/Response.md
Expand Down Expand Up @@ -249,6 +250,7 @@ lib/src/model/player_moderation.dart
lib/src/model/player_moderation_type.dart
lib/src/model/region.dart
lib/src/model/release_status.dart
lib/src/model/represented_group.dart
lib/src/model/request_invite_request.dart
lib/src/model/respond_group_join_request.dart
lib/src/model/response.dart
Expand Down Expand Up @@ -386,6 +388,7 @@ test/player_moderation_type_test.dart
test/playermoderation_api_test.dart
test/region_test.dart
test/release_status_test.dart
test/represented_group_test.dart
test/request_invite_request_test.dart
test/respond_group_join_request_test.dart
test/response_test.dart
Expand Down
3 changes: 3 additions & 0 deletions vrchat_dart_generated/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 1.16.6
- Updated to match spec

## 1.16.5
- Updated to match spec

Expand Down
4 changes: 3 additions & 1 deletion vrchat_dart_generated/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ commit-access to the project. It also means we are very open and welcoming of ne

This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1.16.5
- API version: 1.16.6
- Build package: org.openapitools.codegen.languages.DartDioClientCodegen
For more information, please visit [https://github.com/VRChatAPI](https://github.com/VRChatAPI)

Expand Down Expand Up @@ -267,6 +267,7 @@ Class | Method | HTTP request | Description
[*UsersApi*](doc/UsersApi.md) | [**getUserByName**](doc/UsersApi.md#getuserbyname) | **GET** /users/{username}/name | Get User by Username
[*UsersApi*](doc/UsersApi.md) | [**getUserGroupRequests**](doc/UsersApi.md#getusergrouprequests) | **GET** /users/{userId}/groups/requested | Get User Group Requests
[*UsersApi*](doc/UsersApi.md) | [**getUserGroups**](doc/UsersApi.md#getusergroups) | **GET** /users/{userId}/groups | Get User Groups
[*UsersApi*](doc/UsersApi.md) | [**getUserRepresentedGroup**](doc/UsersApi.md#getuserrepresentedgroup) | **GET** /users/{userId}/groups/represented | Get user's current represented group
[*UsersApi*](doc/UsersApi.md) | [**searchUsers**](doc/UsersApi.md#searchusers) | **GET** /users | Search All Users
[*UsersApi*](doc/UsersApi.md) | [**updateUser**](doc/UsersApi.md#updateuser) | **PUT** /users/{userId} | Update User Info
[*WorldsApi*](doc/WorldsApi.md) | [**createWorld**](doc/WorldsApi.md#createworld) | **POST** /worlds | Create World
Expand Down Expand Up @@ -374,6 +375,7 @@ Class | Method | HTTP request | Description
- [PlayerModerationType](doc/PlayerModerationType.md)
- [Region](doc/Region.md)
- [ReleaseStatus](doc/ReleaseStatus.md)
- [RepresentedGroup](doc/RepresentedGroup.md)
- [RequestInviteRequest](doc/RequestInviteRequest.md)
- [RespondGroupJoinRequest](doc/RespondGroupJoinRequest.md)
- [Response](doc/Response.md)
Expand Down
1 change: 1 addition & 0 deletions vrchat_dart_generated/doc/CreateAvatarRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Name | Type | Description | Notes
**releaseStatus** | [**ReleaseStatus**](ReleaseStatus.md) | | [optional]
**version** | **num** | | [optional] [default to 1]
**unityPackageUrl** | **String** | | [optional]
**unityVersion** | **String** | | [optional] [default to '5.3.4p1']

[[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
2 changes: 1 addition & 1 deletion vrchat_dart_generated/doc/GroupAuditLogEntry.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Name | Type | Description | Notes
**createdAt** | [**DateTime**](DateTime.md) | | [optional]
**groupId** | **String** | | [optional]
**actorId** | **String** | 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]
**actorDisplayname** | **String** | | [optional]
**actorDisplayName** | **String** | | [optional]
**targetId** | **String** | Typically GroupID or GroupRoleID, but could be other types of IDs. | [optional]
**eventType** | **String** | The type of event that occurred. This is a string that is prefixed with the type of object that the event occurred on. For example, a group role update event would be prefixed with `group.role`. | [optional] [default to 'group.update']
**description** | **String** | A human-readable description of the event. | [optional]
Expand Down
28 changes: 28 additions & 0 deletions vrchat_dart_generated/doc/RepresentedGroup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# vrchat_dart_generated.model.RepresentedGroup

## Load the model package
```dart
import 'package:vrchat_dart_generated/api.dart';
```

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | | [optional]
**shortCode** | **String** | | [optional]
**discriminator** | **String** | | [optional]
**description** | **String** | | [optional]
**iconId** | **String** | | [optional]
**iconUrl** | **String** | | [optional]
**bannerId** | **String** | | [optional]
**bannerUrl** | **String** | | [optional]
**privacy** | [**GroupPrivacy**](GroupPrivacy.md) | | [optional]
**ownerId** | **String** | 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]
**memberCount** | **int** | | [optional]
**groupId** | **String** | | [optional]
**memberVisibility** | [**GroupUserVisibility**](GroupUserVisibility.md) | | [optional]
**isRepresenting** | **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)


1 change: 1 addition & 0 deletions vrchat_dart_generated/doc/UpdateAvatarRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Name | Type | Description | Notes
**releaseStatus** | [**ReleaseStatus**](ReleaseStatus.md) | | [optional]
**version** | **num** | | [optional] [default to 1]
**unityPackageUrl** | **String** | | [optional]
**unityVersion** | **String** | | [optional] [default to '5.3.4p1']

[[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
48 changes: 48 additions & 0 deletions vrchat_dart_generated/doc/UsersApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Method | HTTP request | Description
[**getUserByName**](UsersApi.md#getuserbyname) | **GET** /users/{username}/name | Get User by Username
[**getUserGroupRequests**](UsersApi.md#getusergrouprequests) | **GET** /users/{userId}/groups/requested | Get User Group Requests
[**getUserGroups**](UsersApi.md#getusergroups) | **GET** /users/{userId}/groups | Get User Groups
[**getUserRepresentedGroup**](UsersApi.md#getuserrepresentedgroup) | **GET** /users/{userId}/groups/represented | Get user's current represented group
[**searchUsers**](UsersApi.md#searchusers) | **GET** /users | Search All Users
[**updateUser**](UsersApi.md#updateuser) | **PUT** /users/{userId} | Update User Info

Expand Down Expand Up @@ -205,6 +206,53 @@ Name | Type | Description | Notes

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

# **getUserRepresentedGroup**
> RepresentedGroup getUserRepresentedGroup(userId)
Get user's current represented group

Returns the current group that the user is currently representing

### Example
```dart
import 'package:vrchat_dart_generated/api.dart';
// TODO Configure API key authorization: authCookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('authCookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('authCookie').apiKeyPrefix = 'Bearer';
final api = VrchatDartGenerated().getUsersApi();
final String userId = userId_example; // String | Must be a valid user ID.
try {
final response = api.getUserRepresentedGroup(userId);
print(response);
} catch on DioException (e) {
print('Exception when calling UsersApi->getUserRepresentedGroup: $e\n');
}
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userId** | **String**| Must be a valid user ID. |

### Return type

[**RepresentedGroup**](RepresentedGroup.md)

### Authorization

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

# **searchUsers**
> List<LimitedUser> searchUsers(search, developerType, n, offset)
Expand Down
84 changes: 84 additions & 0 deletions vrchat_dart_generated/lib/src/api/users_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import 'package:dio/dio.dart';
import 'package:vrchat_dart_generated/src/model/current_user.dart';
import 'package:vrchat_dart_generated/src/model/group.dart';
import 'package:vrchat_dart_generated/src/model/limited_user.dart';
import 'package:vrchat_dart_generated/src/model/represented_group.dart';
import 'package:vrchat_dart_generated/src/model/update_user_request.dart';
import 'package:vrchat_dart_generated/src/model/user.dart';

Expand Down Expand Up @@ -347,6 +348,89 @@ class UsersApi {
);
}

/// Get user&#39;s current represented group
/// Returns the current group that the user is currently representing
///
/// Parameters:
/// * [userId] - Must be a valid user ID.
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
/// * [headers] - Can be used to add additional headers to the request
/// * [extras] - Can be used to add flags to the request
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
///
/// Returns a [Future] containing a [Response] with a [RepresentedGroup] as data
/// Throws [DioException] if API call or serialization fails
Future<Response<RepresentedGroup>> getUserRepresentedGroup({
required String userId,
CancelToken? cancelToken,
Map<String, dynamic>? headers,
Map<String, dynamic>? extra,
ValidateStatus? validateStatus,
ProgressCallback? onSendProgress,
ProgressCallback? onReceiveProgress,
}) async {
final _path = r'/users/{userId}/groups/represented'
.replaceAll('{' r'userId' '}', userId.toString());
final _options = Options(
method: r'GET',
headers: <String, dynamic>{
...?headers,
},
extra: <String, dynamic>{
'secure': <Map<String, String>>[
{
'type': 'apiKey',
'name': 'authCookie',
'keyName': 'auth',
'where': '',
},
],
...?extra,
},
validateStatus: validateStatus,
);

final _response = await _dio.request<Object>(
_path,
options: _options,
cancelToken: cancelToken,
onSendProgress: onSendProgress,
onReceiveProgress: onReceiveProgress,
);

RepresentedGroup? _responseData;

try {
final rawData = _response.data;
_responseData = rawData == null
? null
: deserialize<RepresentedGroup, RepresentedGroup>(
rawData, 'RepresentedGroup',
growable: true);
} catch (error, stackTrace) {
throw DioException(
requestOptions: _response.requestOptions,
response: _response,
type: DioExceptionType.unknown,
error: error,
stackTrace: stackTrace,
);
}

return Response<RepresentedGroup>(
data: _responseData,
headers: _response.headers,
isRedirect: _response.isRedirect,
requestOptions: _response.requestOptions,
redirects: _response.redirects,
statusCode: _response.statusCode,
statusMessage: _response.statusMessage,
extra: _response.extra,
);
}

/// Search All Users
/// Search and list any users by text query
///
Expand Down
4 changes: 4 additions & 0 deletions vrchat_dart_generated/lib/src/deserialize.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ import 'package:vrchat_dart_generated/src/model/paginated_group_audit_log_entry_
import 'package:vrchat_dart_generated/src/model/past_display_name.dart';
import 'package:vrchat_dart_generated/src/model/permission.dart';
import 'package:vrchat_dart_generated/src/model/player_moderation.dart';
import 'package:vrchat_dart_generated/src/model/represented_group.dart';
import 'package:vrchat_dart_generated/src/model/request_invite_request.dart';
import 'package:vrchat_dart_generated/src/model/respond_group_join_request.dart';
import 'package:vrchat_dart_generated/src/model/response.dart';
Expand Down Expand Up @@ -316,6 +317,9 @@ ReturnType deserialize<ReturnType, BaseType>(dynamic value, String targetType,
case 'PlayerModerationType':
case 'Region':
case 'ReleaseStatus':
case 'RepresentedGroup':
return RepresentedGroup.fromJson(value as Map<String, dynamic>)
as ReturnType;
case 'RequestInviteRequest':
return RequestInviteRequest.fromJson(value as Map<String, dynamic>)
as ReturnType;
Expand Down
10 changes: 8 additions & 2 deletions vrchat_dart_generated/lib/src/model/create_avatar_request.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class CreateAvatarRequest {
this.releaseStatus,
this.version = 1,
this.unityPackageUrl,
this.unityVersion = '5.3.4p1',
});

@JsonKey(name: r'assetUrl', required: false, includeIfNull: false)
Expand Down Expand Up @@ -57,6 +58,9 @@ class CreateAvatarRequest {
@JsonKey(name: r'unityPackageUrl', required: false, includeIfNull: false)
final String? unityPackageUrl;

@JsonKey(name: r'unityVersion', required: false, includeIfNull: false)
final String? unityVersion;

@override
bool operator ==(Object other) =>
identical(this, other) ||
Expand All @@ -69,7 +73,8 @@ class CreateAvatarRequest {
other.imageUrl == imageUrl &&
other.releaseStatus == releaseStatus &&
other.version == version &&
other.unityPackageUrl == unityPackageUrl;
other.unityPackageUrl == unityPackageUrl &&
other.unityVersion == unityVersion;

@override
int get hashCode =>
Expand All @@ -81,7 +86,8 @@ class CreateAvatarRequest {
imageUrl.hashCode +
releaseStatus.hashCode +
version.hashCode +
unityPackageUrl.hashCode;
unityPackageUrl.hashCode +
unityVersion.hashCode;

factory CreateAvatarRequest.fromJson(Map<String, dynamic> json) =>
_$CreateAvatarRequestFromJson(json);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b84f5a5

Please sign in to comment.