View Source VRChat.Notifications (vrchat v1.11.1)

API calls for all endpoints tagged Notifications.

Link to this section Summary

Functions

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.

Clear All Notifications Clear all notifications.

Delete Notification Delete a notification.

List Notifications Retrieve all of the current user's notifications.

Mark Notification As Read Mark a notification as seen.

Link to this section Functions

Link to this function

accept_friend_request(connection, notification_id, opts \\ [])

View Source
@spec accept_friend_request(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, VRChat.Model.Success.t()}
  | {:ok, VRChat.Model.Error.t()}
  | {:error, Tesla.Env.t()}

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.

parameters

Parameters

  • connection (VRChat.Connection): Connection to server
  • notification_id (String.t): Must be a valid notification ID.
  • opts (keyword): Optional parameters

returns

Returns

  • {:ok, VRChat.Model.Success.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

clear_notifications(connection, opts \\ [])

View Source
@spec clear_notifications(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, VRChat.Model.Success.t()}
  | {:ok, VRChat.Model.Error.t()}
  | {:error, Tesla.Env.t()}

Clear All Notifications Clear all notifications.

parameters

Parameters

  • connection (VRChat.Connection): Connection to server
  • opts (keyword): Optional parameters

returns

Returns

  • {:ok, VRChat.Model.Success.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

delete_notification(connection, notification_id, opts \\ [])

View Source
@spec delete_notification(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, VRChat.Model.Notification.t()}
  | {:ok, VRChat.Model.Error.t()}
  | {:error, Tesla.Env.t()}

Delete Notification Delete a notification.

parameters

Parameters

  • connection (VRChat.Connection): Connection to server
  • notification_id (String.t): Must be a valid notification ID.
  • opts (keyword): Optional parameters

returns

Returns

  • {:ok, VRChat.Model.Notification.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

get_notifications(connection, opts \\ [])

View Source
@spec get_notifications(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, [VRChat.Model.Notification.t()]}
  | {:ok, VRChat.Model.Error.t()}
  | {:error, Tesla.Env.t()}

List Notifications Retrieve all of the current user's notifications.

parameters

Parameters

  • connection (VRChat.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :type (String.t): Only send notifications of this type (can use all for all). This parameter no longer does anything, and is deprecated.
    • :sent (boolean()): Return notifications sent by the user. Must be false or omitted.
    • :hidden (boolean()): Whether to return hidden or non-hidden notifications. True only allowed on type friendRequest.
    • :after (String.t): Only return notifications sent after this Date. Ignored if type is friendRequest.
    • :n (integer()): The number of objects to return.
    • :offset (integer()): A zero-based offset from the default object sorting from where search results start.

returns

Returns

  • {:ok, [%Notification{}, ...]} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

mark_notification_as_read(connection, notification_id, opts \\ [])

View Source
@spec mark_notification_as_read(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, VRChat.Model.Notification.t()}
  | {:ok, VRChat.Model.Error.t()}
  | {:error, Tesla.Env.t()}

Mark Notification As Read Mark a notification as seen.

parameters

Parameters

  • connection (VRChat.Connection): Connection to server
  • notification_id (String.t): Must be a valid notification ID.
  • opts (keyword): Optional parameters

returns

Returns

  • {:ok, VRChat.Model.Notification.t} on success
  • {:error, Tesla.Env.t} on failure