v24
Event

Get id

Returns LViS event id.
1
String getId();
Copied!

Get name

Returns LViS event name.
1
String getName();
Copied!

Get start time

Returns start time as UNIX time in seconds.
1
long getStartAt();
Copied!

Get end time

Returns end time as UNIX time in seconds.
1
long getEndAt();
Copied!

Get state

Returns current state of event.
1
State getState()
Copied!
Where event state is:
1
enum State {
2
PENDING,
3
UPCOMING,
4
ACTIVE,
5
FINISHED
6
}
Copied!

Get all elements

Returns a list of all published elements.
1
List<Element> getHistory();
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
event.registerCallback(eventCallback);
Copied!
Where event callback is:
1
interface Callback {
2
void onUpdated();
3
void onStateChanged(State state);
4
void onElementPublished(Element element);
5
void onElementRevoked(Element element);
6
}
Copied!
Last modified 2yr ago