pub struct NotificationsService<'a> { /* private fields */ }Expand description
The Notifications operations.
Implementations§
Source§impl<'a> NotificationsService<'a>
impl<'a> NotificationsService<'a>
Sourcepub async fn bulk_read(
&self,
body: &BulkReadNotificationsRequestContent,
) -> Result<(), Error>
pub async fn bulk_read( &self, body: &BulkReadNotificationsRequestContent, ) -> Result<(), Error>
BulkReadNotifications — POST /{accountId}/notifications/bulk_reading.json.
Sent once and never resent.
Sourcepub async fn get_settings(&self) -> Result<NotificationSettings, Error>
pub async fn get_settings(&self) -> Result<NotificationSettings, Error>
GetNotificationSettings — GET /{accountId}/notifications/settings.json.
Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503.
Sourcepub async fn get_tray(
&self,
params: &GetNotificationTrayParams,
) -> Result<Vec<Notification>, Error>
pub async fn get_tray( &self, params: &GetNotificationTrayParams, ) -> Result<Vec<Notification>, Error>
GetNotificationTray — GET /{accountId}/notifications/tray.json.
Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503.
Sourcepub async fn list(
&self,
params: &ListNotificationsParams,
) -> Result<Page<Vec<Notification>>, Error>
pub async fn list( &self, params: &ListNotificationsParams, ) -> Result<Page<Vec<Notification>>, Error>
ListNotifications — GET /{accountId}/notifications.json.
Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503.
Paginated: the answer is a page with page as its cursor, and the next one is read with next_page.
Sourcepub async fn read(&self, notification_id: &str) -> Result<(), Error>
pub async fn read(&self, notification_id: &str) -> Result<(), Error>
ReadNotification — POST /{accountId}/notifications/{notificationId}/reading.json.
Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503. Idempotent, so a resend is safe.
Sourcepub async fn unread(&self, notification_id: &str) -> Result<(), Error>
pub async fn unread(&self, notification_id: &str) -> Result<(), Error>
UnreadNotification — DELETE /{accountId}/notifications/{notificationId}/reading.json.
Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503.
Sourcepub async fn update_settings(
&self,
body: &UpdateNotificationSettingsRequestContent,
) -> Result<(), Error>
pub async fn update_settings( &self, body: &UpdateNotificationSettingsRequestContent, ) -> Result<(), Error>
UpdateNotificationSettings — PATCH /{accountId}/notifications/settings.json.
Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503.