A client to interact with events functionality.
Public Method Summary
abstract void | |
abstractTask<AnnotatedData<EventBuffer>> |
load(boolean forceReload)
Returns a
Task
which asynchronously loads an annotatedEventBuffer
that represents the event data for the currently signed-in player.
|
abstractTask<AnnotatedData<EventBuffer>> |
loadByIds(boolean forceReload,String...eventIds)
Returns a
Task
which asynchronously loads an annotatedEventBuffer
that represents the event data for the specified event IDs.
|
Public Methods
public abstract voidincrement(StringeventId, int incrementAmount)
Increments an event specified byeventId
by the given number of
steps.
This is the fire-and-forget API. Event increments are cached locally and flushed to the server in batches.
Parameters
eventId | The event ID to increment. |
---|---|
incrementAmount | The amount increment by. Must be greater than or equal to 0. |
public abstractTask<AnnotatedData<EventBuffer>> load(boolean forceReload)
Returns aTask
which
asynchronously loads an annotatedEventBuffer
that represents the event data for the currently signed-in player.
AbstractDataBuffer.release()
should be called to release resources after
usage.
Parameters
forceReload | Iftrue ,this call will clear any locally cached data and attempt
to fetch the latest data from the server. This would commonly be used for something
like a user-initiated refresh. Normally, this should be set tofalse
to gain advantages of data caching. |
---|
public abstractTask<AnnotatedData<EventBuffer>> loadByIds(boolean forceReload,String... eventIds)
Returns aTask
which
asynchronously loads an annotatedEventBuffer
that represents the event data for the specified event IDs.
AbstractDataBuffer.release()
should be called to release resources after
usage.
Parameters
forceReload | Iftrue ,this call will clear any locally cached data and attempt
to fetch the latest data from the server. This would commonly be used for something
like a user-initiated refresh. Normally, this should be set tofalse
to gain advantages of data caching. |
---|---|
eventIds | The IDs of the events to load. |