- HTTP request
- Query parameters
- Request body
- Response body
- Authorization scopes
- EventsUpdates
- EventPeriodUpdate
- EventPeriodRange
- EventUpdateRequest
- EventBatchRecordFailure
- EventFailureCause
- EventRecordFailure
- EventUpdateFailureCause
- Try it!
Records a batch of changes to the number of times events have occurred for the currently authenticated user of this application.
HTTP request
POST https://games.googleapis.com/games/v1/events
Query parameters
Parameters | |
---|---|
language |
The preferred language to use for strings returned by this method. |
Request body
The request body contains an instance of EventsUpdates
.
Response body
An event period update resource.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{ "kind": string, "batchFailures": [ { object ( |
Fields | |
---|---|
kind |
Uniquely identifies the type of this resource. Value is always the fixed string |
batchFailures[] |
Any batch-wide failures which occurred applying updates. |
eventFailures[] |
Any failures updating a particular event. |
playerEvents[] |
The current status of any updated events |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/games
https://www.googleapis.com/auth/games_lite
For more information, see the OAuth 2.0 Overview.
EventsUpdates
An event period update resource.
JSON representation |
---|
{
"kind": string,
"requestId": string,
"currentTimeMillis": string,
"timePeriods": [
{
object ( |
Fields | |
---|---|
kind |
Uniquely identifies the type of this resource. Value is always the fixed string |
requestId |
The request ID used to identify this attempt to record events. |
currentTimeMillis |
The current time when this update was sent, in milliseconds, since 1970 UTC (Unix Epoch). |
timePeriods[] |
A list of the time period updates being made in this request. |
EventPeriodUpdate
An event period update resource.
JSON representation |
---|
{ "timePeriod": { object ( |
Fields | |
---|---|
timePeriod |
The time period being covered by this update. |
updates[] |
The updates being made for this time period. |
kind |
Uniquely identifies the type of this resource. Value is always the fixed string |
EventPeriodRange
An event period time range.
JSON representation |
---|
{ "kind": string, "periodStartMillis": string, "periodEndMillis": string } |
Fields | |
---|---|
kind |
Uniquely identifies the type of this resource. Value is always the fixed string |
periodStartMillis |
The time when this update period begins, in millis, since 1970 UTC (Unix Epoch). |
periodEndMillis |
The time when this update period ends, in millis, since 1970 UTC (Unix Epoch). |
EventUpdateRequest
An event period update resource.
JSON representation |
---|
{ "definitionId": string, "updateCount": string, "kind": string } |
Fields | |
---|---|
definitionId |
The ID of the event being modified in this update. |
updateCount |
The number of times this event occurred in this time period. |
kind |
Uniquely identifies the type of this resource. Value is always the fixed string |
EventBatchRecordFailure
A batch update failure resource.
JSON representation |
---|
{ "range": { object ( |
Fields | |
---|---|
range |
The time range which was rejected; empty for a request-wide failure. |
failureCause |
The cause for the update failure. |
kind |
Uniquely identifies the type of this resource. Value is always the fixed string |
EventFailureCause
Possible values for an event failure cause.
Enums | |
---|---|
TOO_LARGE |
A batch request was issued with more events than are allowed in a single batch. |
TIME_PERIOD_EXPIRED |
A batch was sent with data too far in the past to record. |
TIME_PERIOD_SHORT |
A batch was sent with a time range that was too short. |
TIME_PERIOD_LONG |
A batch was sent with a time range that was too long. |
ALREADY_UPDATED |
An attempt was made to record a batch of data which was already seen. |
RECORD_RATE_HIGH |
An attempt was made to record data faster than the server will apply updates. |
EventRecordFailure
An event update failure resource.
JSON representation |
---|
{
"eventId": string,
"failureCause": enum ( |
Fields | |
---|---|
eventId |
The ID of the event that was not updated. |
failureCause |
The cause for the update failure. |
kind |
Uniquely identifies the type of this resource. Value is always the fixed string |
EventUpdateFailureCause
Possible values for the cause of an event update failure.
Enums | |
---|---|
NOT_FOUND |
An attempt was made to set an event that was not defined. |
INVALID_UPDATE_VALUE |
An attempt was made to increment an event by a non-positive value. |