GooglePlayGames.BasicApi.Events.IEventsClient

An interface for interacting with events.

Summary

See online documentation for Events for more information.

All callbacks in this interface must be invoked on the game thread.

Public functions

FetchAllEvents(DataSource source, Action< ResponseStatus, List< IEvent >> callback)
void
Fetches all events defined for this game.
FetchEvent(DataSource source, string eventId, Action< ResponseStatus, IEvent > callback)
void
Fetches the event with the specified ID.
IncrementEvent(string eventId, uint stepsToIncrement)
void
Increments the indicated event.

Public functions

FetchAllEvents

void FetchAllEvents(
  DataSource source,
  Action< ResponseStatus, List< IEvent >> callback
)

Fetches all events defined for this game.

Details
Parameters
source
The source of the event (i.e. whether we can return stale cached values).
callback
A callback for the results of the request. The passed list will only be non-empty if the request succeeded. This callback will be invoked on the game thread.

FetchEvent

void FetchEvent(
  DataSource source,
  string eventId,
  Action< ResponseStatus, IEvent > callback
)

Fetches the event with the specified ID.

Details
Parameters
source
The source of the event (i.e. whether we can return stale cached values).
eventId
The ID of the event.
callback
A callback for the result of the event. If the request failed, the passed event will be null. This callback will be invoked on the game thread.

IncrementEvent

void IncrementEvent(
  string eventId,
  uint stepsToIncrement
)

Increments the indicated event.

Details
Parameters
eventId
The ID of the event to increment.
stepsToIncrement
The number of steps to increment by.