NotificationService#
- class NotificationService[source]#
Methods
Get all notifications for the current user.
Update the read status of multiple notifications.
Get a summary of the user's notifications.
Update the read status for the given notification.
- get_all(*, read=Nothing, page_size=20)[source]#
Get all notifications for the current user.
- Parameters:
read (
Union[Just[bool],_Nothing[bool]]) – If passed only return notifications that have this read status.page_size (
int) – The size of a single page, maximum is 50.self (NotificationService[AuthenticatedClient]) –
- Returns:
A list of notifications.
- Return type:
Response[NotificationCommentReplyNotificationAsJSON | NotificationGeneralFeedbackReplyNotificationAsJSON]
- patch_all(json_body)[source]#
Update the read status of multiple notifications.
- Parameters:
json_body (
PatchAllNotificationData) – The body of the request. SeePatchAllNotificationDatafor information about the possible fields. You can provide this data as aPatchAllNotificationDataor as a dictionary.self (NotificationService[AuthenticatedClient]) –
- Returns:
The updated notifications in the same order as given in the body.
- Return type:
Sequence[NotificationCommentReplyNotificationAsJSON | NotificationGeneralFeedbackReplyNotificationAsJSON]
- get_summary()[source]#
Get a summary of the user’s notifications.
Provides a capped count of unread notifications for performance.
- Returns:
A summary object with unread counts.
- Parameters:
self (NotificationService[AuthenticatedClient]) –
- Return type:
- patch(json_body, *, notification_id)[source]#
Update the read status for the given notification.
- Parameters:
json_body (
PatchNotificationData) – The body of the request. SeePatchNotificationDatafor information about the possible fields. You can provide this data as aPatchNotificationDataor as a dictionary.notification_id (
int) – The id of the notification to update.self (NotificationService[AuthenticatedClient]) –
- Returns:
The updated notification.
- Return type:
NotificationCommentReplyNotificationAsJSON | NotificationGeneralFeedbackReplyNotificationAsJSON