Skip to content

Latest commit

Β 

History

History
307 lines (213 loc) Β· 10.6 KB

NotificationsApi.md

File metadata and controls

307 lines (213 loc) Β· 10.6 KB

vrchat_dart_generated.api.NotificationsApi

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
acceptFriendRequest PUT /auth/user/notifications/{notificationId}/accept Accept Friend Request
clearNotifications PUT /auth/user/notifications/clear Clear All Notifications
deleteNotification PUT /auth/user/notifications/{notificationId}/hide Delete Notification
getNotification GET /auth/user/notifications/{notificationId} Show notification
getNotifications GET /auth/user/notifications List Notifications
markNotificationAsRead PUT /auth/user/notifications/{notificationId}/see Mark Notification As Read

acceptFriendRequest

Success acceptFriendRequest(notificationId)

Accept Friend Request

Accept a friend request by notification frq_ ID. Friend requests can be found using the NotificationsAPI getNotifications by filtering of type friendRequest.

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().getNotificationsApi();
final String notificationId = notificationId_example; // String | Must be a valid notification ID.

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

Parameters

Name Type Description Notes
notificationId String Must be a valid notification ID.

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]

clearNotifications

Success clearNotifications()

Clear All Notifications

Clear all notifications.

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

try {
    final response = api.clearNotifications();
    print(response);
} catch on DioException (e) {
    print('Exception when calling NotificationsApi->clearNotifications: $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]

deleteNotification

Notification deleteNotification(notificationId)

Delete Notification

Delete a notification.

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().getNotificationsApi();
final String notificationId = notificationId_example; // String | Must be a valid notification ID.

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

Parameters

Name Type Description Notes
notificationId String Must be a valid notification ID.

Return type

Notification

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]

getNotification

Notification getNotification(notificationId)

Show notification

Get a notification by notification not_ 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().getNotificationsApi();
final String notificationId = notificationId_example; // String | Must be a valid notification ID.

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

Parameters

Name Type Description Notes
notificationId String Must be a valid notification ID.

Return type

Notification

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]

getNotifications

List getNotifications(type, sent, hidden, after, n, offset)

List Notifications

Retrieve all of the current user's notifications.

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().getNotificationsApi();
final String type = all; // String | Only send notifications of this type (can use `all` for all). This parameter no longer does anything, and is deprecated.
final bool sent = true; // bool | Return notifications sent by the user. Must be false or omitted.
final bool hidden = true; // bool | Whether to return hidden or non-hidden notifications. True only allowed on type `friendRequest`.
final String after = five_minutes_ago; // String | Only return notifications sent after this Date. Ignored if type is `friendRequest`.
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.getNotifications(type, sent, hidden, after, n, offset);
    print(response);
} catch on DioException (e) {
    print('Exception when calling NotificationsApi->getNotifications: $e\n');
}

Parameters

Name Type Description Notes
type String Only send notifications of this type (can use all for all). This parameter no longer does anything, and is deprecated. [optional]
sent bool Return notifications sent by the user. Must be false or omitted. [optional]
hidden bool Whether to return hidden or non-hidden notifications. True only allowed on type friendRequest. [optional]
after String Only return notifications sent after this Date. Ignored if type is friendRequest. [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<Notification>

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]

markNotificationAsRead

Notification markNotificationAsRead(notificationId)

Mark Notification As Read

Mark a notification as seen.

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().getNotificationsApi();
final String notificationId = notificationId_example; // String | Must be a valid notification ID.

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

Parameters

Name Type Description Notes
notificationId String Must be a valid notification ID.

Return type

Notification

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]