EventData
public struct EventData : Content
Used to obtain an event’s details.
Returned by:
GET /api/v3/events
GET /api/v3/events/favorites
See EventController.eventsHandler(_:)
, EventController.favoritesHandler(_:)
.
-
The event’s ID. This is the Swiftarr database record for this event.
Declaration
Swift
var eventID: UUID
-
The event’s UID. This is the VCALENDAR/ICS File/sched.com identifier for this event–what calendar software uses to correllate whether 2 events are the same event.
Declaration
Swift
var uid: String
-
The event’s title.
Declaration
Swift
var title: String
-
A description of the event.
Declaration
Swift
var description: String
-
Starting time of the event
Declaration
Swift
var startTime: Date
-
Ending time of the event.
Declaration
Swift
var endTime: Date
-
The timezone that the ship is going to be in when the event occurs. Delivered as an abbreviation e.g. “EST”.
Declaration
Swift
var timeZone: String
-
The timezone ID that the ship is going to be in when the event occurs. Example: “America/New_York”.
Declaration
Swift
var timeZoneID: String
-
The location of the event.
Declaration
Swift
var location: String
-
The event category.
Declaration
Swift
var eventType: String
-
The last time data for this event was modified. Used for change management.
Declaration
Swift
var lastUpdateTime: Date
-
The event’s associated
Forum
.Declaration
Swift
var forum: UUID?
-
Whether user has favorited event.
Declaration
Swift
var isFavorite: Bool
-
The performers who will be at the event.
Declaration
Swift
var performers: [PerformerHeaderData]
-
Makes an eventData.
The startTime, endTime, and timeZone are the corrected Date values for the event, given the time zone the ship was/will be in at the event start time. The Performers field will be filled in if Performers are eager loaded using
.with(\.$performers)
or similar. Else it’s [].Declaration
Swift
init(_ event: Event, isFavorite: Bool = false) throws