Links

Event

The class which represents event

Get id

Returns LViS event id.
id: String

Get name

Returns LViS event name.
name: String

Get start time

Returns start time as UNIX time in seconds. Time interval from Jan 01, 1970.
startAt: Int64

Get end time

Returns end time as UNIX time in seconds. Time interval from Jan 01, 1970.
endAt: Int64

Get state

Returns current state of event.
state : State?
Where event state is:
enum State {
case Pending
case Upcoming
case Active
case Finished
}

All events

All events are returned in the following method:
public func getHistory() -> [Element]
Do not call this method until Subscribe to event callback is invoked as history might not be available until then.

Subscribe to changes

Subscribe to event's changes.
onUpdated: ((Void) -> Void)?
onStateChanged: ((Event.State) -> Void)?
onElementPublished: ((Element) -> Void)?
onElementRevoked: ((Element) -> Void)?