|
virtual Promise< EventClaimResponse > | Claim (string eventId) |
| Claim the earned rewards for an event. This method will throw an exception if the player has never submitted a score to the event. More...
|
|
virtual Promise< Unit > | SetScore (string eventId, double score, bool incremental=false, IDictionary< string, object > stats=null) |
| Submit a score for the current player. Note that this is only allowed if the event has the write_self permission. More...
|
|
abstract Promise< EventsGetResponse > | GetCurrent (string scope="") |
|
Promise< TData > | GetCurrent (string scope="") |
| Manually fetch the available data. If the server hasn't delivered a new update, this method will not return the absolute latest data unless you pass forceRefresh as true. More...
|
|
|
const string | SERVICE_NAME = "event-players" |
|
◆ Claim()
Claim the earned rewards for an event. This method will throw an exception if the player has never submitted a score to the event.
- Parameters
-
eventId | The runtime id of the event you'd like to claim |
- Returns
- A promise representing the rewards the player earned
Implements Beamable.Common.Api.Events.IEventsApi.
Reimplemented in Beamable.Api.Events.EventsService.
◆ SetScore()
virtual Promise< Unit > Beamable.Common.Api.Events.AbsEventsApi.SetScore |
( |
string |
eventId, |
|
|
double |
score, |
|
|
bool |
incremental = false , |
|
|
IDictionary< string, object > |
stats = null |
|
) |
| |
|
inlinevirtual |
Submit a score for the current player. Note that this is only allowed if the event has the write_self permission.
- Parameters
-
eventId | Full ID of the event, including timestamp suffix. |
score | The score to submit (or score delta if incremental). |
incremental | If incremental is true, add to the existing score, otherwise set it absolutely. |
stats | Optional key-value mapping of stats to apply to the score. |
- Returns
- Promise indicating success or failure.
Implements Beamable.Common.Api.Events.IEventsApi.
The documentation for this class was generated from the following file:
- com.beamable/Common/Runtime/Api/Events/AbsEventsApi.cs