NotificationService#
- class NotificationService[source]#
- get_all(*, has_unread=False, extra_parameters=None)[source]#
Get all notifications for the current user.
- Parameters:
has_unread (
bool
) – If considered true a short digest will be sent, i.e. a single object with one key has_unread with a boolean value. Please use this if you simply want to check if there are unread notifications.extra_parameters (
Optional
[Mapping
[str
,Union
[str
,bool
,int
,float
]]]) – The extra query parameters you might want to add. By default no extra query parameters are added.self (NotificationService[AuthenticatedClient]) –
- Returns:
Either a list of notifications or a HasUnreadNotifcationJSON based on the has_unread query parameter.
- Return type:
- patch_all(json_body, *, extra_parameters=None)[source]#
Update the read status of multiple notifications.
- Parameters:
json_body (
Union
[dict
,list
,PatchAllNotificationData
]) – The body of the request. SeePatchAllNotificationData
for information about the possible fields. You can provide this data as aPatchAllNotificationData
or as a dictionary.extra_parameters (
Optional
[Mapping
[str
,Union
[str
,bool
,int
,float
]]]) – The extra query parameters you might want to add. By default no extra query parameters are added.self (NotificationService[AuthenticatedClient]) –
- Returns:
The updated notifications in the same order as given in the body.
- Return type:
- patch(json_body, *, notification_id, extra_parameters=None)[source]#
Update the read status for the given notification.
- Parameters:
json_body (
Union
[dict
,list
,PatchNotificationData
]) – The body of the request. SeePatchNotificationData
for information about the possible fields. You can provide this data as aPatchNotificationData
or as a dictionary.notification_id (
int
) – The id of the notification to update.extra_parameters (
Optional
[Mapping
[str
,Union
[str
,bool
,int
,float
]]]) – The extra query parameters you might want to add. By default no extra query parameters are added.self (NotificationService[AuthenticatedClient]) –
- Returns:
The updated notification.
- Return type:
NotificationCommentReplyNotificationAsJSON | NotificationGeneralFeedbackReplyNotificationAsJSON