Skip to content

Latest commit

Β 

History

History
605 lines (420 loc) Β· 19.7 KB

File metadata and controls

605 lines (420 loc) Β· 19.7 KB

vrchat_dart_generated.api.UsersApi

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
getUser GET /users/{userId} Get User by ID
getUserByName GET /users/{username}/name Get User by Username
getUserFeedback GET /users/{userId}/feedback Get User Feedback
getUserGroupInstances GET /users/{userId}/instances/groups Get User Group Instances
getUserGroupRequests GET /users/{userId}/groups/requested Get User Group Requests
getUserGroups GET /users/{userId}/groups Get User Groups
getUserNote GET /userNotes/{userNoteId} Get User Note
getUserNotes GET /userNotes Get User Notes
getUserRepresentedGroup GET /users/{userId}/groups/represented Get user's current represented group
searchUsers GET /users Search All Users
updateUser PUT /users/{userId} Update User Info
updateUserNote POST /userNotes Update User Note

getUser

User getUser(userId)

Get User by ID

Get public user information about a specific user using their ID.

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().getUsersApi();
final String userId = userId_example; // String | Must be a valid user ID.

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

Parameters

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

Return type

User

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]

getUserByName

User getUserByName(username)

Get User by Username

Get public user information about a specific user using their name. DEPRECATED: VRChat API no longer return usernames of other users. See issue by Tupper for more information. This endpoint now require Admin Credentials.

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().getUsersApi();
final String username = username_example; // String | Username of the user

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

Parameters

Name Type Description Notes
username String Username of the user

Return type

User

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]

getUserFeedback

List getUserFeedback(userId, contentId, n, offset)

Get User Feedback

Get user's submitted feedback

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().getUsersApi();
final String userId = userId_example; // String | Must be a valid user ID.
final bool contentId = true; // bool | Filter for users' previously submitted feedback, e.g., a groupId, useeId, avatarId, etc.
final int n = 56; // int | The number of objects to return.
final int offset = 56; // int | A zero-based offset from the default object sorting from where search results start.

try {
    final response = api.getUserFeedback(userId, contentId, n, offset);
    print(response);
} catch on DioException (e) {
    print('Exception when calling UsersApi->getUserFeedback: $e\n');
}

Parameters

Name Type Description Notes
userId String Must be a valid user ID.
contentId bool Filter for users' previously submitted feedback, e.g., a groupId, useeId, avatarId, etc. [optional]
n int The number of objects to return. [optional] [default to 60]
offset int A zero-based offset from the default object sorting from where search results start. [optional]

Return type

List<Feedback>

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]

getUserGroupInstances

GetUserGroupInstances200Response getUserGroupInstances(userId)

Get User Group Instances

Returns a list of group instances for a user

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().getUsersApi();
final String userId = userId_example; // String | Must be a valid user ID.

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

Parameters

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

Return type

GetUserGroupInstances200Response

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]

getUserGroupRequests

List getUserGroupRequests(userId)

Get User Group Requests

Returns a list of Groups the user has requested to be invited into.

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().getUsersApi();
final String userId = userId_example; // String | Must be a valid user ID.

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

Parameters

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

Return type

List<Group>

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]

getUserGroups

List getUserGroups(userId)

Get User Groups

Get user's public groups

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().getUsersApi();
final String userId = userId_example; // String | Must be a valid user ID.

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

Parameters

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

Return type

List<LimitedUserGroups>

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]

getUserNote

UserNote getUserNote(userNoteId)

Get User Note

Get a particular user note

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().getUsersApi();
final String userNoteId = userNoteId_example; // String | Must be a valid user note ID.

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

Parameters

Name Type Description Notes
userNoteId String Must be a valid user note ID.

Return type

UserNote

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]

getUserNotes

List getUserNotes(n, offset)

Get User Notes

Get recently updated user notes

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().getUsersApi();
final int n = 56; // int | The number of objects to return.
final int offset = 56; // int | A zero-based offset from the default object sorting from where search results start.

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

Parameters

Name Type Description Notes
n int The number of objects to return. [optional] [default to 60]
offset int A zero-based offset from the default object sorting from where search results start. [optional]

Return type

List<UserNote>

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]

getUserRepresentedGroup

RepresentedGroup getUserRepresentedGroup(userId)

Get user's current represented group

Returns the current group that the user is currently representing

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

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]

searchUsers

List searchUsers(search, developerType, n, offset)

Search All Users

Search and list any users by text query

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().getUsersApi();
final String search = search_example; // String | Searches by `displayName`. Will return empty array if search query is empty or missing.
final String developerType = developerType_example; // String | Active user by developer type, none for normal users and internal for moderators
final int n = 56; // int | The number of objects to return.
final int offset = 56; // int | A zero-based offset from the default object sorting from where search results start.

try {
    final response = api.searchUsers(search, developerType, n, offset);
    print(response);
} catch on DioException (e) {
    print('Exception when calling UsersApi->searchUsers: $e\n');
}

Parameters

Name Type Description Notes
search String Searches by displayName. Will return empty array if search query is empty or missing. [optional]
developerType String Active user by developer type, none for normal users and internal for moderators [optional]
n int The number of objects to return. [optional] [default to 60]
offset int A zero-based offset from the default object sorting from where search results start. [optional]

Return type

List<LimitedUser>

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]

updateUser

CurrentUser updateUser(userId, updateUserRequest)

Update User Info

Update a users information such as the email and birthday.

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().getUsersApi();
final String userId = userId_example; // String | Must be a valid user ID.
final UpdateUserRequest updateUserRequest = ; // UpdateUserRequest | 

try {
    final response = api.updateUser(userId, updateUserRequest);
    print(response);
} catch on DioException (e) {
    print('Exception when calling UsersApi->updateUser: $e\n');
}

Parameters

Name Type Description Notes
userId String Must be a valid user ID.
updateUserRequest UpdateUserRequest [optional]

Return type

CurrentUser

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]

updateUserNote

UserNote updateUserNote(updateUserNoteRequest)

Update User Note

Updates the currently authenticated user's note on a user

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().getUsersApi();
final UpdateUserNoteRequest updateUserNoteRequest = ; // UpdateUserNoteRequest | 

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

Parameters

Name Type Description Notes
updateUserNoteRequest UpdateUserNoteRequest

Return type

UserNote

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]