import 'package:vrchat_dart_generated/api.dart';
All URIs are relative to https://api.vrchat.cloud/api/1
Method | HTTP request | Description |
---|---|---|
deleteFriendRequest | DELETE /user/{userId}/friendRequest | Delete Friend Request |
friend | POST /user/{userId}/friendRequest | Send Friend Request |
getFriendStatus | GET /user/{userId}/friendStatus | Check Friend Status |
getFriends | GET /auth/user/friends | List Friends |
unfriend | DELETE /auth/user/friends/{userId} | Unfriend |
Success deleteFriendRequest(userId)
Delete Friend Request
Deletes an outgoing pending friend request to another user. To delete an incoming friend request, use the deleteNotification
endpoint instead.
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().getFriendsApi();
final String userId = userId_example; // String | Must be a valid user ID.
try {
final response = api.deleteFriendRequest(userId);
print(response);
} catch on DioException (e) {
print('Exception when calling FriendsApi->deleteFriendRequest: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
userId | String | Must be a valid user ID. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Notification friend(userId)
Send Friend Request
Send a friend request to another user.
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().getFriendsApi();
final String userId = userId_example; // String | Must be a valid user ID.
try {
final response = api.friend(userId);
print(response);
} catch on DioException (e) {
print('Exception when calling FriendsApi->friend: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
userId | String | Must be a valid user ID. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FriendStatus getFriendStatus(userId)
Check Friend Status
Retrieve if the user is currently a friend with a given user, if they have an outgoing friend request, and if they have an incoming friend request. The proper way to receive and accept friend request is by checking if the user has an incoming Notification
of type friendRequest
, and then accepting that notification.
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().getFriendsApi();
final String userId = userId_example; // String | Must be a valid user ID.
try {
final response = api.getFriendStatus(userId);
print(response);
} catch on DioException (e) {
print('Exception when calling FriendsApi->getFriendStatus: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
userId | String | Must be a valid user ID. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List getFriends(offset, n, offline)
List Friends
List information about friends.
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().getFriendsApi();
final int offset = 56; // int | A zero-based offset from the default object sorting from where search results start.
final int n = 56; // int | The number of objects to return.
final bool offline = true; // bool | Returns *only* offline users if true, returns only online and active users if false
try {
final response = api.getFriends(offset, n, offline);
print(response);
} catch on DioException (e) {
print('Exception when calling FriendsApi->getFriends: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
offset | int | A zero-based offset from the default object sorting from where search results start. | [optional] |
n | int | The number of objects to return. | [optional] [default to 60] |
offline | bool | Returns only offline users if true, returns only online and active users if false | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Success unfriend(userId)
Unfriend
Unfriend a user by ID.
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().getFriendsApi();
final String userId = userId_example; // String | Must be a valid user ID.
try {
final response = api.unfriend(userId);
print(response);
} catch on DioException (e) {
print('Exception when calling FriendsApi->unfriend: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
userId | String | Must be a valid user ID. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]