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
-
The geopolitical region identifier that identifies the time zone – e.g. “America/Los Angeles”
Declaration
Swift
var serverTimeZoneID: String
-
Human-readable time zone name, like “EDT”
Declaration
Swift
var serverTimeZone: String
-
Features that are turned off by the server. If the
appName
for 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
-
The number of Seamail chats the user’s been added to but not yet viewed. Does not include Seamails the user creates. Chats counted here will continue to be counted here and not in
newSeamailMessageCount
even if there are also new messages–until the user views the chat and clears the notification.Declaration
Swift
var addedToSeamailCount: Int
-
The number of LFGs the user’s been added to but not yet viewed. Doesn’t include LFGs the user created nor ones they Joined by their own action. If a chat the user was added to (but hasn’t yet viewed) gets new messages, that chat is counted in this total and not in
newFezMessageCount
.Declaration
Swift
var addedToLFGCount: Int
-
The number of Private Events the user’s been added to but not yet viewed. Doesn’t include PEs the user created. If a chat the user was added to (but hasn’t yet viewed) gets new messages, that chat is counted in this total and not in
newPrivateEventMessageCount
.Declaration
Swift
var addedToPrivateEventCount: 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 LFGs with new messages. 0 if not logged in.
Declaration
Swift
var newFezMessageCount: Int
-
Count of # of Private Events with new messages. 0 if not logged in.
Declaration
Swift
var newPrivateEventMessageCount: 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(seamailCounts:
lfgCounts: privateEventCounts: activeAnnouncementIDs: newAnnouncementCount: nextEventTime: nextEvent: nextLFGTime: nextLFG: microKaraokeFinishedSongCount: ) Declaration
Swift
init( seamailCounts: (Int, Int), lfgCounts: (Int, Int), privateEventCounts: (Int, Int), activeAnnouncementIDs: [Int], newAnnouncementCount: Int, nextEventTime: Date?, nextEvent: UUID?, nextLFGTime: Date?, nextLFG: UUID?, microKaraokeFinishedSongCount: Int )
-
Declaration
Swift
init()