v24
COMPLIANCE
Event
The class which represents event

Get id

Returns LViS event id.
1
id: String
Copied!

Get name

Returns LViS event name.
1
name: String
Copied!

Get start time

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

Get end time

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

Get state

Returns current state of event.
1
state : State?
Copied!
Where event state is:
1
enum State {
2
case Pending
3
case Upcoming
4
case Active
5
case Finished
6
}
Copied!

All events

All events are returned in the following method:
1
public func getHistory() -> [Element]
Copied!
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.
1
onUpdated: ((Void) -> Void)?
2
onStateChanged: ((Event.State) -> Void)?
3
onElementPublished: ((Element) -> Void)?
4
onElementRevoked: ((Element) -> Void)?
Copied!