Skip to content

Latest commit

 

History

History
203 lines (139 loc) · 6.92 KB

PlayermoderationApi.md

File metadata and controls

203 lines (139 loc) · 6.92 KB

vrchat_dart_generated.api.PlayermoderationApi

Load the API package

import 'package:vrchat_dart_generated/api.dart';

All URIs are relative to https://api.vrchat.cloud/api/1

Method HTTP request Description
clearAllPlayerModerations DELETE /auth/user/playermoderations Clear All Player Moderations
getPlayerModerations GET /auth/user/playermoderations Search Player Moderations
moderateUser POST /auth/user/playermoderations Moderate User
unmoderateUser PUT /auth/user/unplayermoderate Unmoderate User

clearAllPlayerModerations

Success clearAllPlayerModerations()

Clear All Player Moderations

⚠️ This will delete every single player moderation you've ever made.

Example

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().getPlayermoderationApi();

try {
    final response = api.clearAllPlayerModerations();
    print(response);
} catch on DioException (e) {
    print('Exception when calling PlayermoderationApi->clearAllPlayerModerations: $e\n');
}

Parameters

This endpoint does not need any parameter.

Return type

Success

Authorization

authCookie

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getPlayerModerations

List getPlayerModerations(type, targetUserId)

Search Player Moderations

Returns a list of all player moderations made by you. This endpoint does not have pagination, and will return all results. Use query parameters to limit your query if needed.

Example

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().getPlayermoderationApi();
final String type = type_example; // String | Must be one of PlayerModerationType, except unblock. Unblocking simply removes a block.
final String targetUserId = targetUserId_example; // String | Must be valid UserID.

try {
    final response = api.getPlayerModerations(type, targetUserId);
    print(response);
} catch on DioException (e) {
    print('Exception when calling PlayermoderationApi->getPlayerModerations: $e\n');
}

Parameters

Name Type Description Notes
type String Must be one of PlayerModerationType, except unblock. Unblocking simply removes a block. [optional]
targetUserId String Must be valid UserID. [optional]

Return type

List<PlayerModeration>

Authorization

authCookie

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

moderateUser

PlayerModeration moderateUser(moderateUserRequest)

Moderate User

Moderate a user, e.g. unmute them or show their avatar. Please see the Player Moderation docs on what playerModerations are, and how they differ from staff moderations.

Example

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().getPlayermoderationApi();
final ModerateUserRequest moderateUserRequest = ; // ModerateUserRequest | 

try {
    final response = api.moderateUser(moderateUserRequest);
    print(response);
} catch on DioException (e) {
    print('Exception when calling PlayermoderationApi->moderateUser: $e\n');
}

Parameters

Name Type Description Notes
moderateUserRequest ModerateUserRequest

Return type

PlayerModeration

Authorization

authCookie

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

unmoderateUser

Success unmoderateUser(moderateUserRequest)

Unmoderate User

Removes a player moderation previously added through moderateUser. E.g if you previously have shown their avatar, but now want to reset it to default.

Example

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().getPlayermoderationApi();
final ModerateUserRequest moderateUserRequest = ; // ModerateUserRequest | 

try {
    final response = api.unmoderateUser(moderateUserRequest);
    print(response);
} catch on DioException (e) {
    print('Exception when calling PlayermoderationApi->unmoderateUser: $e\n');
}

Parameters

Name Type Description Notes
moderateUserRequest ModerateUserRequest

Return type

Success

Authorization

authCookie

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]