Commit the results of a player turn. Try it now.
Request
HTTP request
PUT https://www.googleapis.com/games/v1/turnbasedmatches/matchId/turn
Parameters
Parameter name | Value | Description |
---|---|---|
Path parameters | ||
matchId |
string |
The ID of the match. |
Optional query parameters | ||
language |
string |
The preferred language to use for strings returned by this method. |
Authorization
This request requires authorization with the following scope:
Scope |
---|
https://www.googleapis.com/auth/games |
For more information, see the authentication and authorization page.
Request body
In the request body, supply data with the following structure:
{ "kind": "games#turnBasedMatchTurn", "data": { "kind": "games#turnBasedMatchDataRequest", "data": bytes }, "pendingParticipantId": string, "matchVersion": integer, "results": [ { "kind": "games#participantResult", "participantId": string, "result": string, "placing": integer } ] }
Property name | Value | Description | Notes |
---|---|---|---|
kind |
string |
Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchTurn . |
|
data |
nested object |
The shared game state data after the turn is over. | |
data.kind |
string |
Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchDataRequest . |
|
data.data |
bytes |
The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option. | |
pendingParticipantId |
string |
The ID of the participant who should take their turn next. May be set to the current player's participant ID to update match state without changing the turn. If not set, the match will wait for other player(s) to join via automatching; this is only valid if automatch criteria is set on the match with remaining slots for automatched players. | |
matchVersion |
integer |
The version of this match: an increasing counter, used to avoid out-of-date updates to the match. | |
results[] |
list |
The match results for the participants in the match. | |
results[].kind |
string |
Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult . |
|
results[].participantId |
string |
The ID of the participant. | |
results[].result |
string |
The result of the participant for this match. Possible values are:
Acceptable values are:
|
|
results[].placing |
integer |
The placement or ranking of the participant in the match results; a number from one to the number of participants in the match. Multiple participants may have the same placing value in case of a type. |
Response
If successful, this method returns a TurnBasedMatches resource in the response body.
Try it!
Use the APIs Explorer below to call this method on live data and see the response.