UserNotificationData
public struct UserNotificationData : Content
Provides updates about server global state and the logged in user’s notifications.
userNotificationHandler() is intended to be called frequently by clients (I mean, don’t call it once a second).
Returned by AlertController.userNotificationHandler()
-
Always an ISO 8601 date in UTC, like “2020-03-07T12:00:00Z”
Declaration
Swift
var serverTime: String -
Server Time Zone offset, in seconds from UTC. One hour before UTC is -3600. EST timezone is -18000.
Declaration
Swift
var serverTimeOffset: Int -
Human-readable time zone name, like “EDT”
Declaration
Swift
var serverTimeZone: String -
Features that are turned off by the server. If the
appNamefor a feature isall, the feature is disabled at the API layer. For all other appName values, the disable is just a notification that the client should not show the feature to users. If the list is empty, no features have been disabled.Declaration
Swift
var disabledFeatures: [DisabledFeature] -
The name of the shipboard Wifi network
Declaration
Swift
var shipWifiSSID: String? -
IDs of all active announcements
Declaration
Swift
var activeAnnouncementIDs: [Int] -
All fields below this line will be 0 or null if called when not logged in. Count of announcements the user has not yet seen. 0 if not logged in.
Declaration
Swift
var newAnnouncementCount: Int -
Number of twarrts that @mention the user. 0 if not logged in.
Declaration
Swift
var twarrtMentionCount: Int -
Number of twarrt @mentions that the user has not read (by visiting the twarrt mentions endpoint; reading twarrts in the regular feed doesn’t count). 0 if not logged in.
Declaration
Swift
var newTwarrtMentionCount: Int -
Number of forum posts that @mention the user. 0 if not logged in.
Declaration
Swift
var forumMentionCount: Int -
Number of forum post @mentions the user has not read. 0 if not logged in.
Declaration
Swift
var newForumMentionCount: Int -
Count of # of Seamail threads with new messages. NOT total # of new messages-a single seamail thread with 10 new messages counts as 1. 0 if not logged in.
Declaration
Swift
var newSeamailMessageCount: Int -
Count of # of Fezzes with new messages. 0 if not logged in.
Declaration
Swift
var newFezMessageCount: Int -
The start time of the earliest event that the user has followed with a start time > now. nil if not logged in or no matching event.
Declaration
Swift
var nextFollowedEventTime: Date? -
The event ID of the the next future event the user has followed. This event’s start time should always be == nextFollowedEventTime. If the user has favorited multiple events that start at the same time, this will be random among them.
Declaration
Swift
var nextFollowedEventID: UUID? -
The number of Micro Karaoke songs the user has contributed to and can now view.
Declaration
Swift
var microKaraokeFinishedSongCount: Int -
The start time of the earliest LFG that the user has joined with a start time > now. nil if not logged in or no matching LFG.
Declaration
Swift
var nextJoinedLFGTime: Date? -
The LFG ID of the the next future LFG the user has joined. This LFGs’s start time should always be == nextJoinedLFGTime. If the user has joined multiple LFGs that start at the same time, this will be random among them.
Declaration
Swift
var nextJoinedLFGID: UUID? -
For each alertword the user has, this returns data on hit counts for that word.
Declaration
Swift
var alertWords: [UserNotificationAlertwordData] -
Notification counts that are only relevant for Moderators (and TwitarrTeam).
See moreDeclaration
Swift
public struct ModeratorNotificationData : Content -
Will be nil for non-moderator accounts.
Declaration
Swift
var moderatorData: ModeratorNotificationData? -
init(newFezCount:newSeamailCount: activeAnnouncementIDs: newAnnouncementCount: nextEventTime: nextEvent: nextLFGTime: nextLFG: microKaraokeFinishedSongCount: ) Declaration
Swift
init( newFezCount: Int, newSeamailCount: Int, activeAnnouncementIDs: [Int], newAnnouncementCount: Int, nextEventTime: Date?, nextEvent: UUID?, nextLFGTime: Date?, nextLFG: UUID?, microKaraokeFinishedSongCount: Int ) -
Declaration
Swift
init()
View on GitHub
UserNotificationData Structure Reference