Event

Get id

Returns LViS event id.

String getId();

Get name

Returns LViS event name.

String getName();

Get start time

Returns start time as UNIX time in seconds.

long getStartAt();

Get end time

Returns end time as UNIX time in seconds.

long getEndAt();

Get state

Returns current state of event.

State getState()

Where event state is:

enum State {
PENDING,
UPCOMING,
ACTIVE,
FINISHED
}

Get all elements

Returns a list of all published elements.

List<Element> getHistory();

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.

event.registerCallback(eventCallback);

Where event callback is:

interface Callback {
void onUpdated();
void onStateChanged(State state);
void onElementPublished(Element element);
void onElementRevoked(Element element);
}