NotificationLogData
public struct NotificationLogData : Content
A single entry from a user’s history of received notifications.
Returned by: GET /api/v3/notification/log
See AlertController.notificationLogHandler(_:).
-
Matches the
notificationIDsent in the liveSocketNotificationDatapush for this event, so clients can de-dupe a notification they already saw live against this log.Declaration
Swift
var id: UUID -
The type of event that happened. See
SocketNotificationData.NotificationTypeDatafor values.Declaration
Swift
var type: SocketNotificationData.NotificationTypeData -
A string describing what happened, suitable for adding to a notification alert.
Declaration
Swift
var info: String -
An ID of an Announcement, Fez, Twarrt, ForumPost, or Event.
Declaration
Swift
var contentID: String -
An ID of a related parent object, when one exists. See
SocketNotificationData.secondaryContentID.Declaration
Swift
var secondaryContentID: String? -
When the notification was sent.
Declaration
Swift
var createdAt: Date -
Returns nil if
entry.typeKeydoesn’t match any knownNotificationTypeDatacase (e.g. the case was renamed after the row was written). The caller should skip the row rather than fail the whole log – one stale row must not take down every future fetch of a user’s notification history.Declaration
Swift
init?(_ entry: NotificationLogEntry) throws
View on GitHub