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:
- 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.
- 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:
- 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.
- Returns:
The updated notification.
- Return type:
NotificationCommentReplyNotificationAsJSON | NotificationGeneralFeedbackReplyNotificationAsJSON