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
@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 servernotification_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
@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 serveropts
(keyword): Optional parameters
returns
Returns
{:ok, VRChat.Model.Success.t}
on success{:error, Tesla.Env.t}
on failure
@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 servernotification_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
@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 serveropts
(keyword): Optional parameters:type
(String.t): Only send notifications of this type (can useall
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 typefriendRequest
.:after
(String.t): Only return notifications sent after this Date. Ignored if type isfriendRequest
.: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
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 servernotification_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