Event
The class which represents event
Returns LViS event id.
id: String
Returns LViS event name.
name: String
Returns start time as UNIX time in seconds. Time interval from Jan 01, 1970.
startAt: Int64
Returns end time as UNIX time in seconds. Time interval from Jan 01, 1970.
endAt: Int64
Returns current state of event.
state : State?
Where event state is:
enum State {
case Pending
case Upcoming
case Active
case Finished
}
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 event's changes.
onUpdated: ((Void) -> Void)?
onStateChanged: ((Event.State) -> Void)?
onElementPublished: ((Element) -> Void)?
onElementRevoked: ((Element) -> Void)?
Last modified 4yr ago