blob: 5fd426fcda6325d9224d5d1d9591debe4de8b644 [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="games_v1.html">Google Play Game Services API</a> . <a href="games_v1.turnBasedMatches.html">turnBasedMatches</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#cancel">cancel(matchId)</a></code></p>
79<p class="firstline">Cancel a turn-based match.</p>
80<p class="toc_element">
81 <code><a href="#create">create(body, language=None)</a></code></p>
82<p class="firstline">Create a turn-based match.</p>
83<p class="toc_element">
84 <code><a href="#decline">decline(matchId, language=None)</a></code></p>
85<p class="firstline">Decline an invitation to play a turn-based match.</p>
86<p class="toc_element">
87 <code><a href="#dismiss">dismiss(matchId)</a></code></p>
88<p class="firstline">Dismiss a turn-based match from the match list. The match will no longer show up in the list and will not generate notifications.</p>
89<p class="toc_element">
90 <code><a href="#finish">finish(matchId, body, language=None)</a></code></p>
91<p class="firstline">Finish a turn-based match. Each player should make this call once, after all results are in. Only the player whose turn it is may make the first call to Finish, and can pass in the final match state.</p>
92<p class="toc_element">
93 <code><a href="#get">get(matchId, language=None, includeMatchData=None)</a></code></p>
94<p class="firstline">Get the data for a turn-based match.</p>
95<p class="toc_element">
96 <code><a href="#join">join(matchId, language=None)</a></code></p>
97<p class="firstline">Join a turn-based match.</p>
98<p class="toc_element">
99 <code><a href="#leave">leave(matchId, language=None)</a></code></p>
100<p class="firstline">Leave a turn-based match when it is not the current player's turn, without canceling the match.</p>
101<p class="toc_element">
102 <code><a href="#leaveTurn">leaveTurn(matchId, matchVersion, language=None, pendingParticipantId=None)</a></code></p>
103<p class="firstline">Leave a turn-based match during the current player's turn, without canceling the match.</p>
104<p class="toc_element">
105 <code><a href="#list">list(maxCompletedMatches=None, language=None, pageToken=None, maxResults=None, includeMatchData=None)</a></code></p>
106<p class="firstline">Returns turn-based matches the player is or was involved in.</p>
107<p class="toc_element">
108 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
109<p class="firstline">Retrieves the next page of results.</p>
110<p class="toc_element">
111 <code><a href="#rematch">rematch(matchId, language=None, requestId=None)</a></code></p>
112<p class="firstline">Create a rematch of a match that was previously completed, with the same participants. This can be called by only one player on a match still in their list; the player must have called Finish first. Returns the newly created match; it will be the caller's turn.</p>
113<p class="toc_element">
114 <code><a href="#sync">sync(maxCompletedMatches=None, language=None, pageToken=None, maxResults=None, includeMatchData=None)</a></code></p>
115<p class="firstline">Returns turn-based matches the player is or was involved in that changed since the last sync call, with the least recent changes coming first. Matches that should be removed from the local cache will have a status of MATCH_DELETED.</p>
116<p class="toc_element">
117 <code><a href="#sync_next">sync_next(previous_request, previous_response)</a></code></p>
118<p class="firstline">Retrieves the next page of results.</p>
119<p class="toc_element">
120 <code><a href="#takeTurn">takeTurn(matchId, body, language=None)</a></code></p>
121<p class="firstline">Commit the results of a player turn.</p>
122<h3>Method Details</h3>
123<div class="method">
124 <code class="details" id="cancel">cancel(matchId)</code>
125 <pre>Cancel a turn-based match.
126
127Args:
128 matchId: string, The ID of the match. (required)
129</pre>
130</div>
131
132<div class="method">
133 <code class="details" id="create">create(body, language=None)</code>
134 <pre>Create a turn-based match.
135
136Args:
137 body: object, The request body. (required)
138 The object takes the form of:
139
140{ # This is a JSON template for a turn-based match creation request.
141 "invitedPlayerIds": [ # The player ids to invite to the match.
142 "A String",
143 ],
144 "kind": "games#turnBasedMatchCreateRequest", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchCreateRequest.
145 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
146 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
147 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
148 "exclusiveBitmask": "A String", # A bitmask indicating when auto-matches are valid. When ANDed with other exclusive bitmasks, the result must be zero. Can be used to support exclusive roles within a game.
149 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
150 },
151 "variant": 42, # The variant / mode of the application to be played. This can be any integer value, or left blank. You should use a small number of variants to keep the auto-matching pool as large as possible.
152 "requestId": "A String", # A randomly generated numeric ID. This number is used at the server to ensure that the request is handled correctly across retries.
153 }
154
155 language: string, The preferred language to use for strings returned by this method.
156
157Returns:
158 An object of the form:
159
160 { # This is a JSON template for a turn-based match resource object.
161 "status": "A String", # The status of the match.
162 # Possible values are:
163 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
164 # - "MATCH_ACTIVE" - The match has started.
165 # - "MATCH_COMPLETE" - The match has finished.
166 # - "MATCH_CANCELED" - The match was canceled.
167 # - "MATCH_EXPIRED" - The match expired due to inactivity.
168 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
169 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
170 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
171 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
172 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
173 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
174 "exclusiveBitmask": "A String", # A bitmask indicating when auto-matches are valid. When ANDed with other exclusive bitmasks, the result must be zero. Can be used to support exclusive roles within a game.
175 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
176 },
177 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
178 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
179 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
180 "participantId": "A String", # The ID of the participant that modified the match.
181 },
182 "inviterId": "A String", # The ID of the participant that invited the user to the match. Not set if the user was not invited to the match.
183 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
184 "dataAvailable": True or False, # True if this match has data available but it wasn't returned in a list response; fetching the match individually will retrieve this data.
185 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
186 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
187 },
188 "matchId": "A String", # Globally unique ID for a turn-based match.
189 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
190 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
191 { # This is a JSON template for a participant in a turn-based match.
192 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
193 "status": "A String", # The status of the participant with respect to the match.
194 # Possible values are:
195 # - "PARTICIPANT_NOT_INVITED_YET" - The participant is slated to be invited to the match, but the invitation has not been sent; the invite will be sent when it becomes their turn.
196 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
197 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
198 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
199 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
200 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
201 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
202 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
203 "autoMatchedPlayer": { # This is a JSON template for an anonymous player # Information about a player that has been anonymously auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.)
204 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
205 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
206 "displayName": "A String", # The name to display for the anonymous player.
207 },
208 "player": { # This is a JSON template for a Player resource. # Information about the player. Not populated if this player was anonymously auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.)
209 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
210 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -0700211 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
212 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
213 "familyName": "A String", # The family name of this player. In some places, this is known as the last name.
John Asmuth614db982014-04-24 15:46:26 -0400214 },
Craig Citro065b5302014-08-14 00:47:23 -0700215 "lastPlayedWith": { # This is a JSON template for metadata about a player playing a game with the currently authenticated user. # Details about the last time this player played a multiplayer game with the currently authenticated player. Populated for PLAYED_WITH player collection members.
John Asmuth614db982014-04-24 15:46:26 -0400216 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
217 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
218 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
219 },
220 "playerId": "A String", # The ID of the player.
Craig Citro065b5302014-08-14 00:47:23 -0700221 "title": "A String", # The player's title rewarded for their game activities.
222 "experienceInfo": { # This is a JSON template for 1P/3P metadata about the player's experience. # An object to represent Play Game experience information for the player.
223 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
224 "currentExperiencePoints": "A String", # The current number of experience points for the player.
225 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
226 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
227 "maxExperiencePoints": "A String", # The maximum experience points for this level.
228 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
229 "minExperiencePoints": "A String", # The minimum experience points for this level.
230 "level": 42, # The level for the user.
231 },
232 "nextLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The next level of the player. If the current level is the maximum level, this should be same as the current level.
233 "maxExperiencePoints": "A String", # The maximum experience points for this level.
234 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
235 "minExperiencePoints": "A String", # The minimum experience points for this level.
236 "level": 42, # The level for the user.
237 },
238 },
John Asmuth614db982014-04-24 15:46:26 -0400239 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
240 },
241 "id": "A String", # An identifier for the participant in the scope of the match. Cannot be used to identify a player across matches or in other contexts.
242 },
243 ],
244 "matchNumber": 42, # The number of the match in a chain of rematches. Will be set to 1 for the first match and incremented by 1 for each rematch.
245 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
246 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
247 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
248 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
249 "participantId": "A String", # The ID of the participant that modified the match.
250 },
251 "previousMatchData": { # This is a JSON template for a turn-based match data object. # The data / game state for the previous match; set for the first turn of rematches only.
252 "dataAvailable": True or False, # True if this match has data available but it wasn't returned in a list response; fetching the match individually will retrieve this data.
253 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
254 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
255 },
256 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
257 "results": [ # The results reported for this match.
258 { # This is a JSON template for a result for a match participant.
259 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
260 "placing": 42, # 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.
261 "participantId": "A String", # The ID of the participant.
262 "result": "A String", # The result of the participant for this match.
263 # Possible values are:
264 # - "MATCH_RESULT_WIN" - The participant won the match.
265 # - "MATCH_RESULT_LOSS" - The participant lost the match.
266 # - "MATCH_RESULT_TIE" - The participant tied the match.
267 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
268 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
269 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
270 },
271 ],
272 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
273 "applicationId": "A String", # The ID of the application being played.
274 "userMatchStatus": "A String", # The status of the current user in the match. Derived from the match type, match status, the user's participant status, and the pending participant for the match.
275 # Possible values are:
276 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
277 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
278 # - "USER_TURN" - The user has an action to take in the match.
279 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
280 "description": "A String", # This short description is generated by our servers based on turn state and is localized and worded relative to the player requesting the match. It is intended to be displayed when the match is shown in a list.
281 }</pre>
282</div>
283
284<div class="method">
285 <code class="details" id="decline">decline(matchId, language=None)</code>
286 <pre>Decline an invitation to play a turn-based match.
287
288Args:
289 matchId: string, The ID of the match. (required)
290 language: string, The preferred language to use for strings returned by this method.
291
292Returns:
293 An object of the form:
294
295 { # This is a JSON template for a turn-based match resource object.
296 "status": "A String", # The status of the match.
297 # Possible values are:
298 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
299 # - "MATCH_ACTIVE" - The match has started.
300 # - "MATCH_COMPLETE" - The match has finished.
301 # - "MATCH_CANCELED" - The match was canceled.
302 # - "MATCH_EXPIRED" - The match expired due to inactivity.
303 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
304 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
305 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
306 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
307 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
308 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
309 "exclusiveBitmask": "A String", # A bitmask indicating when auto-matches are valid. When ANDed with other exclusive bitmasks, the result must be zero. Can be used to support exclusive roles within a game.
310 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
311 },
312 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
313 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
314 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
315 "participantId": "A String", # The ID of the participant that modified the match.
316 },
317 "inviterId": "A String", # The ID of the participant that invited the user to the match. Not set if the user was not invited to the match.
318 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
319 "dataAvailable": True or False, # True if this match has data available but it wasn't returned in a list response; fetching the match individually will retrieve this data.
320 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
321 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
322 },
323 "matchId": "A String", # Globally unique ID for a turn-based match.
324 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
325 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
326 { # This is a JSON template for a participant in a turn-based match.
327 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
328 "status": "A String", # The status of the participant with respect to the match.
329 # Possible values are:
330 # - "PARTICIPANT_NOT_INVITED_YET" - The participant is slated to be invited to the match, but the invitation has not been sent; the invite will be sent when it becomes their turn.
331 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
332 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
333 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
334 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
335 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
336 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
337 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
338 "autoMatchedPlayer": { # This is a JSON template for an anonymous player # Information about a player that has been anonymously auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.)
339 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
340 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
341 "displayName": "A String", # The name to display for the anonymous player.
342 },
343 "player": { # This is a JSON template for a Player resource. # Information about the player. Not populated if this player was anonymously auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.)
344 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
345 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -0700346 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
347 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
348 "familyName": "A String", # The family name of this player. In some places, this is known as the last name.
John Asmuth614db982014-04-24 15:46:26 -0400349 },
Craig Citro065b5302014-08-14 00:47:23 -0700350 "lastPlayedWith": { # This is a JSON template for metadata about a player playing a game with the currently authenticated user. # Details about the last time this player played a multiplayer game with the currently authenticated player. Populated for PLAYED_WITH player collection members.
John Asmuth614db982014-04-24 15:46:26 -0400351 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
352 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
353 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
354 },
355 "playerId": "A String", # The ID of the player.
Craig Citro065b5302014-08-14 00:47:23 -0700356 "title": "A String", # The player's title rewarded for their game activities.
357 "experienceInfo": { # This is a JSON template for 1P/3P metadata about the player's experience. # An object to represent Play Game experience information for the player.
358 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
359 "currentExperiencePoints": "A String", # The current number of experience points for the player.
360 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
361 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
362 "maxExperiencePoints": "A String", # The maximum experience points for this level.
363 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
364 "minExperiencePoints": "A String", # The minimum experience points for this level.
365 "level": 42, # The level for the user.
366 },
367 "nextLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The next level of the player. If the current level is the maximum level, this should be same as the current level.
368 "maxExperiencePoints": "A String", # The maximum experience points for this level.
369 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
370 "minExperiencePoints": "A String", # The minimum experience points for this level.
371 "level": 42, # The level for the user.
372 },
373 },
John Asmuth614db982014-04-24 15:46:26 -0400374 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
375 },
376 "id": "A String", # An identifier for the participant in the scope of the match. Cannot be used to identify a player across matches or in other contexts.
377 },
378 ],
379 "matchNumber": 42, # The number of the match in a chain of rematches. Will be set to 1 for the first match and incremented by 1 for each rematch.
380 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
381 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
382 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
383 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
384 "participantId": "A String", # The ID of the participant that modified the match.
385 },
386 "previousMatchData": { # This is a JSON template for a turn-based match data object. # The data / game state for the previous match; set for the first turn of rematches only.
387 "dataAvailable": True or False, # True if this match has data available but it wasn't returned in a list response; fetching the match individually will retrieve this data.
388 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
389 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
390 },
391 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
392 "results": [ # The results reported for this match.
393 { # This is a JSON template for a result for a match participant.
394 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
395 "placing": 42, # 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.
396 "participantId": "A String", # The ID of the participant.
397 "result": "A String", # The result of the participant for this match.
398 # Possible values are:
399 # - "MATCH_RESULT_WIN" - The participant won the match.
400 # - "MATCH_RESULT_LOSS" - The participant lost the match.
401 # - "MATCH_RESULT_TIE" - The participant tied the match.
402 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
403 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
404 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
405 },
406 ],
407 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
408 "applicationId": "A String", # The ID of the application being played.
409 "userMatchStatus": "A String", # The status of the current user in the match. Derived from the match type, match status, the user's participant status, and the pending participant for the match.
410 # Possible values are:
411 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
412 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
413 # - "USER_TURN" - The user has an action to take in the match.
414 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
415 "description": "A String", # This short description is generated by our servers based on turn state and is localized and worded relative to the player requesting the match. It is intended to be displayed when the match is shown in a list.
416 }</pre>
417</div>
418
419<div class="method">
420 <code class="details" id="dismiss">dismiss(matchId)</code>
421 <pre>Dismiss a turn-based match from the match list. The match will no longer show up in the list and will not generate notifications.
422
423Args:
424 matchId: string, The ID of the match. (required)
425</pre>
426</div>
427
428<div class="method">
429 <code class="details" id="finish">finish(matchId, body, language=None)</code>
430 <pre>Finish a turn-based match. Each player should make this call once, after all results are in. Only the player whose turn it is may make the first call to Finish, and can pass in the final match state.
431
432Args:
433 matchId: string, The ID of the match. (required)
434 body: object, The request body. (required)
435 The object takes the form of:
436
437{ # This is a JSON template for a turn-based match results object.
438 "kind": "games#turnBasedMatchResults", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchResults.
439 "data": { # This is a JSON template for sending a turn-based match data object. # The final match data.
440 "kind": "games#turnBasedMatchDataRequest", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchDataRequest.
441 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
442 },
443 "matchVersion": 42, # The version of the match being updated.
444 "results": [ # The match results for the participants in the match.
445 { # This is a JSON template for a result for a match participant.
446 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
447 "placing": 42, # 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.
448 "participantId": "A String", # The ID of the participant.
449 "result": "A String", # The result of the participant for this match.
450 # Possible values are:
451 # - "MATCH_RESULT_WIN" - The participant won the match.
452 # - "MATCH_RESULT_LOSS" - The participant lost the match.
453 # - "MATCH_RESULT_TIE" - The participant tied the match.
454 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
455 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
456 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
457 },
458 ],
459 }
460
461 language: string, The preferred language to use for strings returned by this method.
462
463Returns:
464 An object of the form:
465
466 { # This is a JSON template for a turn-based match resource object.
467 "status": "A String", # The status of the match.
468 # Possible values are:
469 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
470 # - "MATCH_ACTIVE" - The match has started.
471 # - "MATCH_COMPLETE" - The match has finished.
472 # - "MATCH_CANCELED" - The match was canceled.
473 # - "MATCH_EXPIRED" - The match expired due to inactivity.
474 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
475 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
476 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
477 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
478 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
479 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
480 "exclusiveBitmask": "A String", # A bitmask indicating when auto-matches are valid. When ANDed with other exclusive bitmasks, the result must be zero. Can be used to support exclusive roles within a game.
481 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
482 },
483 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
484 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
485 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
486 "participantId": "A String", # The ID of the participant that modified the match.
487 },
488 "inviterId": "A String", # The ID of the participant that invited the user to the match. Not set if the user was not invited to the match.
489 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
490 "dataAvailable": True or False, # True if this match has data available but it wasn't returned in a list response; fetching the match individually will retrieve this data.
491 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
492 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
493 },
494 "matchId": "A String", # Globally unique ID for a turn-based match.
495 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
496 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
497 { # This is a JSON template for a participant in a turn-based match.
498 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
499 "status": "A String", # The status of the participant with respect to the match.
500 # Possible values are:
501 # - "PARTICIPANT_NOT_INVITED_YET" - The participant is slated to be invited to the match, but the invitation has not been sent; the invite will be sent when it becomes their turn.
502 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
503 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
504 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
505 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
506 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
507 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
508 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
509 "autoMatchedPlayer": { # This is a JSON template for an anonymous player # Information about a player that has been anonymously auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.)
510 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
511 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
512 "displayName": "A String", # The name to display for the anonymous player.
513 },
514 "player": { # This is a JSON template for a Player resource. # Information about the player. Not populated if this player was anonymously auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.)
515 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
516 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -0700517 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
518 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
519 "familyName": "A String", # The family name of this player. In some places, this is known as the last name.
John Asmuth614db982014-04-24 15:46:26 -0400520 },
Craig Citro065b5302014-08-14 00:47:23 -0700521 "lastPlayedWith": { # This is a JSON template for metadata about a player playing a game with the currently authenticated user. # Details about the last time this player played a multiplayer game with the currently authenticated player. Populated for PLAYED_WITH player collection members.
John Asmuth614db982014-04-24 15:46:26 -0400522 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
523 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
524 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
525 },
526 "playerId": "A String", # The ID of the player.
Craig Citro065b5302014-08-14 00:47:23 -0700527 "title": "A String", # The player's title rewarded for their game activities.
528 "experienceInfo": { # This is a JSON template for 1P/3P metadata about the player's experience. # An object to represent Play Game experience information for the player.
529 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
530 "currentExperiencePoints": "A String", # The current number of experience points for the player.
531 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
532 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
533 "maxExperiencePoints": "A String", # The maximum experience points for this level.
534 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
535 "minExperiencePoints": "A String", # The minimum experience points for this level.
536 "level": 42, # The level for the user.
537 },
538 "nextLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The next level of the player. If the current level is the maximum level, this should be same as the current level.
539 "maxExperiencePoints": "A String", # The maximum experience points for this level.
540 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
541 "minExperiencePoints": "A String", # The minimum experience points for this level.
542 "level": 42, # The level for the user.
543 },
544 },
John Asmuth614db982014-04-24 15:46:26 -0400545 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
546 },
547 "id": "A String", # An identifier for the participant in the scope of the match. Cannot be used to identify a player across matches or in other contexts.
548 },
549 ],
550 "matchNumber": 42, # The number of the match in a chain of rematches. Will be set to 1 for the first match and incremented by 1 for each rematch.
551 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
552 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
553 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
554 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
555 "participantId": "A String", # The ID of the participant that modified the match.
556 },
557 "previousMatchData": { # This is a JSON template for a turn-based match data object. # The data / game state for the previous match; set for the first turn of rematches only.
558 "dataAvailable": True or False, # True if this match has data available but it wasn't returned in a list response; fetching the match individually will retrieve this data.
559 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
560 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
561 },
562 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
563 "results": [ # The results reported for this match.
564 { # This is a JSON template for a result for a match participant.
565 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
566 "placing": 42, # 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.
567 "participantId": "A String", # The ID of the participant.
568 "result": "A String", # The result of the participant for this match.
569 # Possible values are:
570 # - "MATCH_RESULT_WIN" - The participant won the match.
571 # - "MATCH_RESULT_LOSS" - The participant lost the match.
572 # - "MATCH_RESULT_TIE" - The participant tied the match.
573 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
574 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
575 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
576 },
577 ],
578 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
579 "applicationId": "A String", # The ID of the application being played.
580 "userMatchStatus": "A String", # The status of the current user in the match. Derived from the match type, match status, the user's participant status, and the pending participant for the match.
581 # Possible values are:
582 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
583 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
584 # - "USER_TURN" - The user has an action to take in the match.
585 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
586 "description": "A String", # This short description is generated by our servers based on turn state and is localized and worded relative to the player requesting the match. It is intended to be displayed when the match is shown in a list.
587 }</pre>
588</div>
589
590<div class="method">
591 <code class="details" id="get">get(matchId, language=None, includeMatchData=None)</code>
592 <pre>Get the data for a turn-based match.
593
594Args:
595 matchId: string, The ID of the match. (required)
596 language: string, The preferred language to use for strings returned by this method.
597 includeMatchData: boolean, Get match data along with metadata.
598
599Returns:
600 An object of the form:
601
602 { # This is a JSON template for a turn-based match resource object.
603 "status": "A String", # The status of the match.
604 # Possible values are:
605 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
606 # - "MATCH_ACTIVE" - The match has started.
607 # - "MATCH_COMPLETE" - The match has finished.
608 # - "MATCH_CANCELED" - The match was canceled.
609 # - "MATCH_EXPIRED" - The match expired due to inactivity.
610 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
611 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
612 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
613 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
614 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
615 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
616 "exclusiveBitmask": "A String", # A bitmask indicating when auto-matches are valid. When ANDed with other exclusive bitmasks, the result must be zero. Can be used to support exclusive roles within a game.
617 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
618 },
619 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
620 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
621 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
622 "participantId": "A String", # The ID of the participant that modified the match.
623 },
624 "inviterId": "A String", # The ID of the participant that invited the user to the match. Not set if the user was not invited to the match.
625 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
626 "dataAvailable": True or False, # True if this match has data available but it wasn't returned in a list response; fetching the match individually will retrieve this data.
627 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
628 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
629 },
630 "matchId": "A String", # Globally unique ID for a turn-based match.
631 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
632 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
633 { # This is a JSON template for a participant in a turn-based match.
634 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
635 "status": "A String", # The status of the participant with respect to the match.
636 # Possible values are:
637 # - "PARTICIPANT_NOT_INVITED_YET" - The participant is slated to be invited to the match, but the invitation has not been sent; the invite will be sent when it becomes their turn.
638 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
639 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
640 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
641 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
642 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
643 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
644 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
645 "autoMatchedPlayer": { # This is a JSON template for an anonymous player # Information about a player that has been anonymously auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.)
646 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
647 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
648 "displayName": "A String", # The name to display for the anonymous player.
649 },
650 "player": { # This is a JSON template for a Player resource. # Information about the player. Not populated if this player was anonymously auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.)
651 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
652 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -0700653 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
654 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
655 "familyName": "A String", # The family name of this player. In some places, this is known as the last name.
John Asmuth614db982014-04-24 15:46:26 -0400656 },
Craig Citro065b5302014-08-14 00:47:23 -0700657 "lastPlayedWith": { # This is a JSON template for metadata about a player playing a game with the currently authenticated user. # Details about the last time this player played a multiplayer game with the currently authenticated player. Populated for PLAYED_WITH player collection members.
John Asmuth614db982014-04-24 15:46:26 -0400658 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
659 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
660 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
661 },
662 "playerId": "A String", # The ID of the player.
Craig Citro065b5302014-08-14 00:47:23 -0700663 "title": "A String", # The player's title rewarded for their game activities.
664 "experienceInfo": { # This is a JSON template for 1P/3P metadata about the player's experience. # An object to represent Play Game experience information for the player.
665 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
666 "currentExperiencePoints": "A String", # The current number of experience points for the player.
667 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
668 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
669 "maxExperiencePoints": "A String", # The maximum experience points for this level.
670 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
671 "minExperiencePoints": "A String", # The minimum experience points for this level.
672 "level": 42, # The level for the user.
673 },
674 "nextLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The next level of the player. If the current level is the maximum level, this should be same as the current level.
675 "maxExperiencePoints": "A String", # The maximum experience points for this level.
676 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
677 "minExperiencePoints": "A String", # The minimum experience points for this level.
678 "level": 42, # The level for the user.
679 },
680 },
John Asmuth614db982014-04-24 15:46:26 -0400681 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
682 },
683 "id": "A String", # An identifier for the participant in the scope of the match. Cannot be used to identify a player across matches or in other contexts.
684 },
685 ],
686 "matchNumber": 42, # The number of the match in a chain of rematches. Will be set to 1 for the first match and incremented by 1 for each rematch.
687 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
688 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
689 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
690 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
691 "participantId": "A String", # The ID of the participant that modified the match.
692 },
693 "previousMatchData": { # This is a JSON template for a turn-based match data object. # The data / game state for the previous match; set for the first turn of rematches only.
694 "dataAvailable": True or False, # True if this match has data available but it wasn't returned in a list response; fetching the match individually will retrieve this data.
695 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
696 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
697 },
698 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
699 "results": [ # The results reported for this match.
700 { # This is a JSON template for a result for a match participant.
701 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
702 "placing": 42, # 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.
703 "participantId": "A String", # The ID of the participant.
704 "result": "A String", # The result of the participant for this match.
705 # Possible values are:
706 # - "MATCH_RESULT_WIN" - The participant won the match.
707 # - "MATCH_RESULT_LOSS" - The participant lost the match.
708 # - "MATCH_RESULT_TIE" - The participant tied the match.
709 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
710 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
711 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
712 },
713 ],
714 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
715 "applicationId": "A String", # The ID of the application being played.
716 "userMatchStatus": "A String", # The status of the current user in the match. Derived from the match type, match status, the user's participant status, and the pending participant for the match.
717 # Possible values are:
718 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
719 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
720 # - "USER_TURN" - The user has an action to take in the match.
721 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
722 "description": "A String", # This short description is generated by our servers based on turn state and is localized and worded relative to the player requesting the match. It is intended to be displayed when the match is shown in a list.
723 }</pre>
724</div>
725
726<div class="method">
727 <code class="details" id="join">join(matchId, language=None)</code>
728 <pre>Join a turn-based match.
729
730Args:
731 matchId: string, The ID of the match. (required)
732 language: string, The preferred language to use for strings returned by this method.
733
734Returns:
735 An object of the form:
736
737 { # This is a JSON template for a turn-based match resource object.
738 "status": "A String", # The status of the match.
739 # Possible values are:
740 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
741 # - "MATCH_ACTIVE" - The match has started.
742 # - "MATCH_COMPLETE" - The match has finished.
743 # - "MATCH_CANCELED" - The match was canceled.
744 # - "MATCH_EXPIRED" - The match expired due to inactivity.
745 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
746 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
747 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
748 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
749 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
750 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
751 "exclusiveBitmask": "A String", # A bitmask indicating when auto-matches are valid. When ANDed with other exclusive bitmasks, the result must be zero. Can be used to support exclusive roles within a game.
752 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
753 },
754 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
755 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
756 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
757 "participantId": "A String", # The ID of the participant that modified the match.
758 },
759 "inviterId": "A String", # The ID of the participant that invited the user to the match. Not set if the user was not invited to the match.
760 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
761 "dataAvailable": True or False, # True if this match has data available but it wasn't returned in a list response; fetching the match individually will retrieve this data.
762 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
763 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
764 },
765 "matchId": "A String", # Globally unique ID for a turn-based match.
766 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
767 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
768 { # This is a JSON template for a participant in a turn-based match.
769 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
770 "status": "A String", # The status of the participant with respect to the match.
771 # Possible values are:
772 # - "PARTICIPANT_NOT_INVITED_YET" - The participant is slated to be invited to the match, but the invitation has not been sent; the invite will be sent when it becomes their turn.
773 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
774 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
775 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
776 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
777 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
778 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
779 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
780 "autoMatchedPlayer": { # This is a JSON template for an anonymous player # Information about a player that has been anonymously auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.)
781 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
782 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
783 "displayName": "A String", # The name to display for the anonymous player.
784 },
785 "player": { # This is a JSON template for a Player resource. # Information about the player. Not populated if this player was anonymously auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.)
786 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
787 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -0700788 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
789 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
790 "familyName": "A String", # The family name of this player. In some places, this is known as the last name.
John Asmuth614db982014-04-24 15:46:26 -0400791 },
Craig Citro065b5302014-08-14 00:47:23 -0700792 "lastPlayedWith": { # This is a JSON template for metadata about a player playing a game with the currently authenticated user. # Details about the last time this player played a multiplayer game with the currently authenticated player. Populated for PLAYED_WITH player collection members.
John Asmuth614db982014-04-24 15:46:26 -0400793 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
794 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
795 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
796 },
797 "playerId": "A String", # The ID of the player.
Craig Citro065b5302014-08-14 00:47:23 -0700798 "title": "A String", # The player's title rewarded for their game activities.
799 "experienceInfo": { # This is a JSON template for 1P/3P metadata about the player's experience. # An object to represent Play Game experience information for the player.
800 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
801 "currentExperiencePoints": "A String", # The current number of experience points for the player.
802 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
803 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
804 "maxExperiencePoints": "A String", # The maximum experience points for this level.
805 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
806 "minExperiencePoints": "A String", # The minimum experience points for this level.
807 "level": 42, # The level for the user.
808 },
809 "nextLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The next level of the player. If the current level is the maximum level, this should be same as the current level.
810 "maxExperiencePoints": "A String", # The maximum experience points for this level.
811 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
812 "minExperiencePoints": "A String", # The minimum experience points for this level.
813 "level": 42, # The level for the user.
814 },
815 },
John Asmuth614db982014-04-24 15:46:26 -0400816 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
817 },
818 "id": "A String", # An identifier for the participant in the scope of the match. Cannot be used to identify a player across matches or in other contexts.
819 },
820 ],
821 "matchNumber": 42, # The number of the match in a chain of rematches. Will be set to 1 for the first match and incremented by 1 for each rematch.
822 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
823 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
824 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
825 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
826 "participantId": "A String", # The ID of the participant that modified the match.
827 },
828 "previousMatchData": { # This is a JSON template for a turn-based match data object. # The data / game state for the previous match; set for the first turn of rematches only.
829 "dataAvailable": True or False, # True if this match has data available but it wasn't returned in a list response; fetching the match individually will retrieve this data.
830 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
831 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
832 },
833 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
834 "results": [ # The results reported for this match.
835 { # This is a JSON template for a result for a match participant.
836 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
837 "placing": 42, # 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.
838 "participantId": "A String", # The ID of the participant.
839 "result": "A String", # The result of the participant for this match.
840 # Possible values are:
841 # - "MATCH_RESULT_WIN" - The participant won the match.
842 # - "MATCH_RESULT_LOSS" - The participant lost the match.
843 # - "MATCH_RESULT_TIE" - The participant tied the match.
844 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
845 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
846 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
847 },
848 ],
849 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
850 "applicationId": "A String", # The ID of the application being played.
851 "userMatchStatus": "A String", # The status of the current user in the match. Derived from the match type, match status, the user's participant status, and the pending participant for the match.
852 # Possible values are:
853 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
854 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
855 # - "USER_TURN" - The user has an action to take in the match.
856 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
857 "description": "A String", # This short description is generated by our servers based on turn state and is localized and worded relative to the player requesting the match. It is intended to be displayed when the match is shown in a list.
858 }</pre>
859</div>
860
861<div class="method">
862 <code class="details" id="leave">leave(matchId, language=None)</code>
863 <pre>Leave a turn-based match when it is not the current player's turn, without canceling the match.
864
865Args:
866 matchId: string, The ID of the match. (required)
867 language: string, The preferred language to use for strings returned by this method.
868
869Returns:
870 An object of the form:
871
872 { # This is a JSON template for a turn-based match resource object.
873 "status": "A String", # The status of the match.
874 # Possible values are:
875 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
876 # - "MATCH_ACTIVE" - The match has started.
877 # - "MATCH_COMPLETE" - The match has finished.
878 # - "MATCH_CANCELED" - The match was canceled.
879 # - "MATCH_EXPIRED" - The match expired due to inactivity.
880 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
881 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
882 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
883 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
884 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
885 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
886 "exclusiveBitmask": "A String", # A bitmask indicating when auto-matches are valid. When ANDed with other exclusive bitmasks, the result must be zero. Can be used to support exclusive roles within a game.
887 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
888 },
889 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
890 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
891 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
892 "participantId": "A String", # The ID of the participant that modified the match.
893 },
894 "inviterId": "A String", # The ID of the participant that invited the user to the match. Not set if the user was not invited to the match.
895 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
896 "dataAvailable": True or False, # True if this match has data available but it wasn't returned in a list response; fetching the match individually will retrieve this data.
897 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
898 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
899 },
900 "matchId": "A String", # Globally unique ID for a turn-based match.
901 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
902 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
903 { # This is a JSON template for a participant in a turn-based match.
904 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
905 "status": "A String", # The status of the participant with respect to the match.
906 # Possible values are:
907 # - "PARTICIPANT_NOT_INVITED_YET" - The participant is slated to be invited to the match, but the invitation has not been sent; the invite will be sent when it becomes their turn.
908 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
909 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
910 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
911 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
912 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
913 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
914 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
915 "autoMatchedPlayer": { # This is a JSON template for an anonymous player # Information about a player that has been anonymously auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.)
916 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
917 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
918 "displayName": "A String", # The name to display for the anonymous player.
919 },
920 "player": { # This is a JSON template for a Player resource. # Information about the player. Not populated if this player was anonymously auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.)
921 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
922 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -0700923 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
924 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
925 "familyName": "A String", # The family name of this player. In some places, this is known as the last name.
John Asmuth614db982014-04-24 15:46:26 -0400926 },
Craig Citro065b5302014-08-14 00:47:23 -0700927 "lastPlayedWith": { # This is a JSON template for metadata about a player playing a game with the currently authenticated user. # Details about the last time this player played a multiplayer game with the currently authenticated player. Populated for PLAYED_WITH player collection members.
John Asmuth614db982014-04-24 15:46:26 -0400928 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
929 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
930 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
931 },
932 "playerId": "A String", # The ID of the player.
Craig Citro065b5302014-08-14 00:47:23 -0700933 "title": "A String", # The player's title rewarded for their game activities.
934 "experienceInfo": { # This is a JSON template for 1P/3P metadata about the player's experience. # An object to represent Play Game experience information for the player.
935 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
936 "currentExperiencePoints": "A String", # The current number of experience points for the player.
937 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
938 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
939 "maxExperiencePoints": "A String", # The maximum experience points for this level.
940 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
941 "minExperiencePoints": "A String", # The minimum experience points for this level.
942 "level": 42, # The level for the user.
943 },
944 "nextLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The next level of the player. If the current level is the maximum level, this should be same as the current level.
945 "maxExperiencePoints": "A String", # The maximum experience points for this level.
946 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
947 "minExperiencePoints": "A String", # The minimum experience points for this level.
948 "level": 42, # The level for the user.
949 },
950 },
John Asmuth614db982014-04-24 15:46:26 -0400951 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
952 },
953 "id": "A String", # An identifier for the participant in the scope of the match. Cannot be used to identify a player across matches or in other contexts.
954 },
955 ],
956 "matchNumber": 42, # The number of the match in a chain of rematches. Will be set to 1 for the first match and incremented by 1 for each rematch.
957 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
958 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
959 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
960 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
961 "participantId": "A String", # The ID of the participant that modified the match.
962 },
963 "previousMatchData": { # This is a JSON template for a turn-based match data object. # The data / game state for the previous match; set for the first turn of rematches only.
964 "dataAvailable": True or False, # True if this match has data available but it wasn't returned in a list response; fetching the match individually will retrieve this data.
965 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
966 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
967 },
968 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
969 "results": [ # The results reported for this match.
970 { # This is a JSON template for a result for a match participant.
971 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
972 "placing": 42, # 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.
973 "participantId": "A String", # The ID of the participant.
974 "result": "A String", # The result of the participant for this match.
975 # Possible values are:
976 # - "MATCH_RESULT_WIN" - The participant won the match.
977 # - "MATCH_RESULT_LOSS" - The participant lost the match.
978 # - "MATCH_RESULT_TIE" - The participant tied the match.
979 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
980 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
981 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
982 },
983 ],
984 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
985 "applicationId": "A String", # The ID of the application being played.
986 "userMatchStatus": "A String", # The status of the current user in the match. Derived from the match type, match status, the user's participant status, and the pending participant for the match.
987 # Possible values are:
988 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
989 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
990 # - "USER_TURN" - The user has an action to take in the match.
991 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
992 "description": "A String", # This short description is generated by our servers based on turn state and is localized and worded relative to the player requesting the match. It is intended to be displayed when the match is shown in a list.
993 }</pre>
994</div>
995
996<div class="method">
997 <code class="details" id="leaveTurn">leaveTurn(matchId, matchVersion, language=None, pendingParticipantId=None)</code>
998 <pre>Leave a turn-based match during the current player's turn, without canceling the match.
999
1000Args:
1001 matchId: string, The ID of the match. (required)
1002 matchVersion: integer, The version of the match being updated. (required)
1003 language: string, The preferred language to use for strings returned by this method.
1004 pendingParticipantId: string, The ID of another participant who should take their turn next. 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.
1005
1006Returns:
1007 An object of the form:
1008
1009 { # This is a JSON template for a turn-based match resource object.
1010 "status": "A String", # The status of the match.
1011 # Possible values are:
1012 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
1013 # - "MATCH_ACTIVE" - The match has started.
1014 # - "MATCH_COMPLETE" - The match has finished.
1015 # - "MATCH_CANCELED" - The match was canceled.
1016 # - "MATCH_EXPIRED" - The match expired due to inactivity.
1017 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
1018 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
1019 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
1020 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
1021 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
1022 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
1023 "exclusiveBitmask": "A String", # A bitmask indicating when auto-matches are valid. When ANDed with other exclusive bitmasks, the result must be zero. Can be used to support exclusive roles within a game.
1024 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
1025 },
1026 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
1027 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1028 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1029 "participantId": "A String", # The ID of the participant that modified the match.
1030 },
1031 "inviterId": "A String", # The ID of the participant that invited the user to the match. Not set if the user was not invited to the match.
1032 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
1033 "dataAvailable": True or False, # True if this match has data available but it wasn't returned in a list response; fetching the match individually will retrieve this data.
1034 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1035 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1036 },
1037 "matchId": "A String", # Globally unique ID for a turn-based match.
1038 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
1039 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
1040 { # This is a JSON template for a participant in a turn-based match.
1041 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
1042 "status": "A String", # The status of the participant with respect to the match.
1043 # Possible values are:
1044 # - "PARTICIPANT_NOT_INVITED_YET" - The participant is slated to be invited to the match, but the invitation has not been sent; the invite will be sent when it becomes their turn.
1045 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
1046 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
1047 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
1048 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
1049 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
1050 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
1051 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
1052 "autoMatchedPlayer": { # This is a JSON template for an anonymous player # Information about a player that has been anonymously auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.)
1053 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
1054 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
1055 "displayName": "A String", # The name to display for the anonymous player.
1056 },
1057 "player": { # This is a JSON template for a Player resource. # Information about the player. Not populated if this player was anonymously auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.)
1058 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
1059 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -07001060 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
1061 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
1062 "familyName": "A String", # The family name of this player. In some places, this is known as the last name.
John Asmuth614db982014-04-24 15:46:26 -04001063 },
Craig Citro065b5302014-08-14 00:47:23 -07001064 "lastPlayedWith": { # This is a JSON template for metadata about a player playing a game with the currently authenticated user. # Details about the last time this player played a multiplayer game with the currently authenticated player. Populated for PLAYED_WITH player collection members.
John Asmuth614db982014-04-24 15:46:26 -04001065 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
1066 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
1067 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
1068 },
1069 "playerId": "A String", # The ID of the player.
Craig Citro065b5302014-08-14 00:47:23 -07001070 "title": "A String", # The player's title rewarded for their game activities.
1071 "experienceInfo": { # This is a JSON template for 1P/3P metadata about the player's experience. # An object to represent Play Game experience information for the player.
1072 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
1073 "currentExperiencePoints": "A String", # The current number of experience points for the player.
1074 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
1075 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
1076 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1077 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1078 "minExperiencePoints": "A String", # The minimum experience points for this level.
1079 "level": 42, # The level for the user.
1080 },
1081 "nextLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The next level of the player. If the current level is the maximum level, this should be same as the current level.
1082 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1083 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1084 "minExperiencePoints": "A String", # The minimum experience points for this level.
1085 "level": 42, # The level for the user.
1086 },
1087 },
John Asmuth614db982014-04-24 15:46:26 -04001088 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
1089 },
1090 "id": "A String", # An identifier for the participant in the scope of the match. Cannot be used to identify a player across matches or in other contexts.
1091 },
1092 ],
1093 "matchNumber": 42, # The number of the match in a chain of rematches. Will be set to 1 for the first match and incremented by 1 for each rematch.
1094 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
1095 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
1096 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1097 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1098 "participantId": "A String", # The ID of the participant that modified the match.
1099 },
1100 "previousMatchData": { # This is a JSON template for a turn-based match data object. # The data / game state for the previous match; set for the first turn of rematches only.
1101 "dataAvailable": True or False, # True if this match has data available but it wasn't returned in a list response; fetching the match individually will retrieve this data.
1102 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1103 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1104 },
1105 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
1106 "results": [ # The results reported for this match.
1107 { # This is a JSON template for a result for a match participant.
1108 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
1109 "placing": 42, # 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.
1110 "participantId": "A String", # The ID of the participant.
1111 "result": "A String", # The result of the participant for this match.
1112 # Possible values are:
1113 # - "MATCH_RESULT_WIN" - The participant won the match.
1114 # - "MATCH_RESULT_LOSS" - The participant lost the match.
1115 # - "MATCH_RESULT_TIE" - The participant tied the match.
1116 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
1117 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
1118 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
1119 },
1120 ],
1121 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
1122 "applicationId": "A String", # The ID of the application being played.
1123 "userMatchStatus": "A String", # The status of the current user in the match. Derived from the match type, match status, the user's participant status, and the pending participant for the match.
1124 # Possible values are:
1125 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
1126 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
1127 # - "USER_TURN" - The user has an action to take in the match.
1128 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
1129 "description": "A String", # This short description is generated by our servers based on turn state and is localized and worded relative to the player requesting the match. It is intended to be displayed when the match is shown in a list.
1130 }</pre>
1131</div>
1132
1133<div class="method">
1134 <code class="details" id="list">list(maxCompletedMatches=None, language=None, pageToken=None, maxResults=None, includeMatchData=None)</code>
1135 <pre>Returns turn-based matches the player is or was involved in.
1136
1137Args:
1138 maxCompletedMatches: integer, The maximum number of completed or canceled matches to return in the response. If not set, all matches returned could be completed or canceled.
1139 language: string, The preferred language to use for strings returned by this method.
1140 pageToken: string, The token returned by the previous request.
1141 maxResults: integer, The maximum number of matches to return in the response, used for paging. For any response, the actual number of matches to return may be less than the specified maxResults.
1142 includeMatchData: boolean, True if match data should be returned in the response. Note that not all data will necessarily be returned if include_match_data is true; the server may decide to only return data for some of the matches to limit download size for the client. The remainder of the data for these matches will be retrievable on request.
1143
1144Returns:
1145 An object of the form:
1146
1147 { # This is a JSON template for a list of turn-based matches.
1148 "nextPageToken": "A String", # The pagination token for the next page of results.
1149 "items": [ # The matches.
1150 { # This is a JSON template for a turn-based match resource object.
1151 "status": "A String", # The status of the match.
1152 # Possible values are:
1153 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
1154 # - "MATCH_ACTIVE" - The match has started.
1155 # - "MATCH_COMPLETE" - The match has finished.
1156 # - "MATCH_CANCELED" - The match was canceled.
1157 # - "MATCH_EXPIRED" - The match expired due to inactivity.
1158 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
1159 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
1160 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
1161 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
1162 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
1163 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
1164 "exclusiveBitmask": "A String", # A bitmask indicating when auto-matches are valid. When ANDed with other exclusive bitmasks, the result must be zero. Can be used to support exclusive roles within a game.
1165 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
1166 },
1167 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
1168 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1169 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1170 "participantId": "A String", # The ID of the participant that modified the match.
1171 },
1172 "inviterId": "A String", # The ID of the participant that invited the user to the match. Not set if the user was not invited to the match.
1173 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
1174 "dataAvailable": True or False, # True if this match has data available but it wasn't returned in a list response; fetching the match individually will retrieve this data.
1175 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1176 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1177 },
1178 "matchId": "A String", # Globally unique ID for a turn-based match.
1179 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
1180 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
1181 { # This is a JSON template for a participant in a turn-based match.
1182 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
1183 "status": "A String", # The status of the participant with respect to the match.
1184 # Possible values are:
1185 # - "PARTICIPANT_NOT_INVITED_YET" - The participant is slated to be invited to the match, but the invitation has not been sent; the invite will be sent when it becomes their turn.
1186 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
1187 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
1188 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
1189 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
1190 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
1191 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
1192 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
1193 "autoMatchedPlayer": { # This is a JSON template for an anonymous player # Information about a player that has been anonymously auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.)
1194 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
1195 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
1196 "displayName": "A String", # The name to display for the anonymous player.
1197 },
1198 "player": { # This is a JSON template for a Player resource. # Information about the player. Not populated if this player was anonymously auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.)
1199 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
1200 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -07001201 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
1202 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
1203 "familyName": "A String", # The family name of this player. In some places, this is known as the last name.
John Asmuth614db982014-04-24 15:46:26 -04001204 },
Craig Citro065b5302014-08-14 00:47:23 -07001205 "lastPlayedWith": { # This is a JSON template for metadata about a player playing a game with the currently authenticated user. # Details about the last time this player played a multiplayer game with the currently authenticated player. Populated for PLAYED_WITH player collection members.
John Asmuth614db982014-04-24 15:46:26 -04001206 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
1207 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
1208 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
1209 },
1210 "playerId": "A String", # The ID of the player.
Craig Citro065b5302014-08-14 00:47:23 -07001211 "title": "A String", # The player's title rewarded for their game activities.
1212 "experienceInfo": { # This is a JSON template for 1P/3P metadata about the player's experience. # An object to represent Play Game experience information for the player.
1213 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
1214 "currentExperiencePoints": "A String", # The current number of experience points for the player.
1215 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
1216 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
1217 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1218 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1219 "minExperiencePoints": "A String", # The minimum experience points for this level.
1220 "level": 42, # The level for the user.
1221 },
1222 "nextLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The next level of the player. If the current level is the maximum level, this should be same as the current level.
1223 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1224 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1225 "minExperiencePoints": "A String", # The minimum experience points for this level.
1226 "level": 42, # The level for the user.
1227 },
1228 },
John Asmuth614db982014-04-24 15:46:26 -04001229 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
1230 },
1231 "id": "A String", # An identifier for the participant in the scope of the match. Cannot be used to identify a player across matches or in other contexts.
1232 },
1233 ],
1234 "matchNumber": 42, # The number of the match in a chain of rematches. Will be set to 1 for the first match and incremented by 1 for each rematch.
1235 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
1236 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
1237 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1238 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1239 "participantId": "A String", # The ID of the participant that modified the match.
1240 },
1241 "previousMatchData": { # This is a JSON template for a turn-based match data object. # The data / game state for the previous match; set for the first turn of rematches only.
1242 "dataAvailable": True or False, # True if this match has data available but it wasn't returned in a list response; fetching the match individually will retrieve this data.
1243 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1244 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1245 },
1246 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
1247 "results": [ # The results reported for this match.
1248 { # This is a JSON template for a result for a match participant.
1249 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
1250 "placing": 42, # 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.
1251 "participantId": "A String", # The ID of the participant.
1252 "result": "A String", # The result of the participant for this match.
1253 # Possible values are:
1254 # - "MATCH_RESULT_WIN" - The participant won the match.
1255 # - "MATCH_RESULT_LOSS" - The participant lost the match.
1256 # - "MATCH_RESULT_TIE" - The participant tied the match.
1257 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
1258 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
1259 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
1260 },
1261 ],
1262 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
1263 "applicationId": "A String", # The ID of the application being played.
1264 "userMatchStatus": "A String", # The status of the current user in the match. Derived from the match type, match status, the user's participant status, and the pending participant for the match.
1265 # Possible values are:
1266 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
1267 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
1268 # - "USER_TURN" - The user has an action to take in the match.
1269 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
1270 "description": "A String", # This short description is generated by our servers based on turn state and is localized and worded relative to the player requesting the match. It is intended to be displayed when the match is shown in a list.
1271 },
1272 ],
1273 "kind": "games#turnBasedMatchList", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchList.
1274 }</pre>
1275</div>
1276
1277<div class="method">
1278 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1279 <pre>Retrieves the next page of results.
1280
1281Args:
1282 previous_request: The request for the previous page. (required)
1283 previous_response: The response from the request for the previous page. (required)
1284
1285Returns:
1286 A request object that you can call 'execute()' on to request the next
1287 page. Returns None if there are no more items in the collection.
1288 </pre>
1289</div>
1290
1291<div class="method">
1292 <code class="details" id="rematch">rematch(matchId, language=None, requestId=None)</code>
1293 <pre>Create a rematch of a match that was previously completed, with the same participants. This can be called by only one player on a match still in their list; the player must have called Finish first. Returns the newly created match; it will be the caller's turn.
1294
1295Args:
1296 matchId: string, The ID of the match. (required)
1297 language: string, The preferred language to use for strings returned by this method.
1298 requestId: string, A randomly generated numeric ID for each request specified by the caller. This number is used at the server to ensure that the request is handled correctly across retries.
1299
1300Returns:
1301 An object of the form:
1302
1303 { # This is a JSON template for a rematch response.
1304 "rematch": { # This is a JSON template for a turn-based match resource object. # The newly created match; a rematch of the old match with the same participants.
1305 "status": "A String", # The status of the match.
1306 # Possible values are:
1307 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
1308 # - "MATCH_ACTIVE" - The match has started.
1309 # - "MATCH_COMPLETE" - The match has finished.
1310 # - "MATCH_CANCELED" - The match was canceled.
1311 # - "MATCH_EXPIRED" - The match expired due to inactivity.
1312 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
1313 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
1314 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
1315 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
1316 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
1317 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
1318 "exclusiveBitmask": "A String", # A bitmask indicating when auto-matches are valid. When ANDed with other exclusive bitmasks, the result must be zero. Can be used to support exclusive roles within a game.
1319 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
1320 },
1321 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
1322 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1323 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1324 "participantId": "A String", # The ID of the participant that modified the match.
1325 },
1326 "inviterId": "A String", # The ID of the participant that invited the user to the match. Not set if the user was not invited to the match.
1327 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
1328 "dataAvailable": True or False, # True if this match has data available but it wasn't returned in a list response; fetching the match individually will retrieve this data.
1329 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1330 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1331 },
1332 "matchId": "A String", # Globally unique ID for a turn-based match.
1333 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
1334 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
1335 { # This is a JSON template for a participant in a turn-based match.
1336 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
1337 "status": "A String", # The status of the participant with respect to the match.
1338 # Possible values are:
1339 # - "PARTICIPANT_NOT_INVITED_YET" - The participant is slated to be invited to the match, but the invitation has not been sent; the invite will be sent when it becomes their turn.
1340 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
1341 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
1342 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
1343 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
1344 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
1345 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
1346 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
1347 "autoMatchedPlayer": { # This is a JSON template for an anonymous player # Information about a player that has been anonymously auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.)
1348 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
1349 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
1350 "displayName": "A String", # The name to display for the anonymous player.
1351 },
1352 "player": { # This is a JSON template for a Player resource. # Information about the player. Not populated if this player was anonymously auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.)
1353 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
1354 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -07001355 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
1356 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
1357 "familyName": "A String", # The family name of this player. In some places, this is known as the last name.
John Asmuth614db982014-04-24 15:46:26 -04001358 },
Craig Citro065b5302014-08-14 00:47:23 -07001359 "lastPlayedWith": { # This is a JSON template for metadata about a player playing a game with the currently authenticated user. # Details about the last time this player played a multiplayer game with the currently authenticated player. Populated for PLAYED_WITH player collection members.
John Asmuth614db982014-04-24 15:46:26 -04001360 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
1361 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
1362 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
1363 },
1364 "playerId": "A String", # The ID of the player.
Craig Citro065b5302014-08-14 00:47:23 -07001365 "title": "A String", # The player's title rewarded for their game activities.
1366 "experienceInfo": { # This is a JSON template for 1P/3P metadata about the player's experience. # An object to represent Play Game experience information for the player.
1367 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
1368 "currentExperiencePoints": "A String", # The current number of experience points for the player.
1369 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
1370 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
1371 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1372 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1373 "minExperiencePoints": "A String", # The minimum experience points for this level.
1374 "level": 42, # The level for the user.
1375 },
1376 "nextLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The next level of the player. If the current level is the maximum level, this should be same as the current level.
1377 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1378 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1379 "minExperiencePoints": "A String", # The minimum experience points for this level.
1380 "level": 42, # The level for the user.
1381 },
1382 },
John Asmuth614db982014-04-24 15:46:26 -04001383 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
1384 },
1385 "id": "A String", # An identifier for the participant in the scope of the match. Cannot be used to identify a player across matches or in other contexts.
1386 },
1387 ],
1388 "matchNumber": 42, # The number of the match in a chain of rematches. Will be set to 1 for the first match and incremented by 1 for each rematch.
1389 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
1390 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
1391 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1392 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1393 "participantId": "A String", # The ID of the participant that modified the match.
1394 },
1395 "previousMatchData": { # This is a JSON template for a turn-based match data object. # The data / game state for the previous match; set for the first turn of rematches only.
1396 "dataAvailable": True or False, # True if this match has data available but it wasn't returned in a list response; fetching the match individually will retrieve this data.
1397 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1398 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1399 },
1400 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
1401 "results": [ # The results reported for this match.
1402 { # This is a JSON template for a result for a match participant.
1403 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
1404 "placing": 42, # 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.
1405 "participantId": "A String", # The ID of the participant.
1406 "result": "A String", # The result of the participant for this match.
1407 # Possible values are:
1408 # - "MATCH_RESULT_WIN" - The participant won the match.
1409 # - "MATCH_RESULT_LOSS" - The participant lost the match.
1410 # - "MATCH_RESULT_TIE" - The participant tied the match.
1411 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
1412 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
1413 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
1414 },
1415 ],
1416 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
1417 "applicationId": "A String", # The ID of the application being played.
1418 "userMatchStatus": "A String", # The status of the current user in the match. Derived from the match type, match status, the user's participant status, and the pending participant for the match.
1419 # Possible values are:
1420 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
1421 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
1422 # - "USER_TURN" - The user has an action to take in the match.
1423 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
1424 "description": "A String", # This short description is generated by our servers based on turn state and is localized and worded relative to the player requesting the match. It is intended to be displayed when the match is shown in a list.
1425 },
1426 "kind": "games#turnBasedMatchRematch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchRematch.
1427 "previousMatch": { # This is a JSON template for a turn-based match resource object. # The old match that the rematch was created from; will be updated such that the rematchId field will point at the new match.
1428 "status": "A String", # The status of the match.
1429 # Possible values are:
1430 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
1431 # - "MATCH_ACTIVE" - The match has started.
1432 # - "MATCH_COMPLETE" - The match has finished.
1433 # - "MATCH_CANCELED" - The match was canceled.
1434 # - "MATCH_EXPIRED" - The match expired due to inactivity.
1435 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
1436 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
1437 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
1438 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
1439 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
1440 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
1441 "exclusiveBitmask": "A String", # A bitmask indicating when auto-matches are valid. When ANDed with other exclusive bitmasks, the result must be zero. Can be used to support exclusive roles within a game.
1442 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
1443 },
1444 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
1445 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1446 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1447 "participantId": "A String", # The ID of the participant that modified the match.
1448 },
1449 "inviterId": "A String", # The ID of the participant that invited the user to the match. Not set if the user was not invited to the match.
1450 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
1451 "dataAvailable": True or False, # True if this match has data available but it wasn't returned in a list response; fetching the match individually will retrieve this data.
1452 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1453 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1454 },
1455 "matchId": "A String", # Globally unique ID for a turn-based match.
1456 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
1457 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
1458 { # This is a JSON template for a participant in a turn-based match.
1459 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
1460 "status": "A String", # The status of the participant with respect to the match.
1461 # Possible values are:
1462 # - "PARTICIPANT_NOT_INVITED_YET" - The participant is slated to be invited to the match, but the invitation has not been sent; the invite will be sent when it becomes their turn.
1463 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
1464 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
1465 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
1466 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
1467 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
1468 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
1469 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
1470 "autoMatchedPlayer": { # This is a JSON template for an anonymous player # Information about a player that has been anonymously auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.)
1471 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
1472 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
1473 "displayName": "A String", # The name to display for the anonymous player.
1474 },
1475 "player": { # This is a JSON template for a Player resource. # Information about the player. Not populated if this player was anonymously auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.)
1476 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
1477 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -07001478 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
1479 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
1480 "familyName": "A String", # The family name of this player. In some places, this is known as the last name.
John Asmuth614db982014-04-24 15:46:26 -04001481 },
Craig Citro065b5302014-08-14 00:47:23 -07001482 "lastPlayedWith": { # This is a JSON template for metadata about a player playing a game with the currently authenticated user. # Details about the last time this player played a multiplayer game with the currently authenticated player. Populated for PLAYED_WITH player collection members.
John Asmuth614db982014-04-24 15:46:26 -04001483 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
1484 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
1485 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
1486 },
1487 "playerId": "A String", # The ID of the player.
Craig Citro065b5302014-08-14 00:47:23 -07001488 "title": "A String", # The player's title rewarded for their game activities.
1489 "experienceInfo": { # This is a JSON template for 1P/3P metadata about the player's experience. # An object to represent Play Game experience information for the player.
1490 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
1491 "currentExperiencePoints": "A String", # The current number of experience points for the player.
1492 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
1493 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
1494 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1495 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1496 "minExperiencePoints": "A String", # The minimum experience points for this level.
1497 "level": 42, # The level for the user.
1498 },
1499 "nextLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The next level of the player. If the current level is the maximum level, this should be same as the current level.
1500 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1501 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1502 "minExperiencePoints": "A String", # The minimum experience points for this level.
1503 "level": 42, # The level for the user.
1504 },
1505 },
John Asmuth614db982014-04-24 15:46:26 -04001506 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
1507 },
1508 "id": "A String", # An identifier for the participant in the scope of the match. Cannot be used to identify a player across matches or in other contexts.
1509 },
1510 ],
1511 "matchNumber": 42, # The number of the match in a chain of rematches. Will be set to 1 for the first match and incremented by 1 for each rematch.
1512 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
1513 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
1514 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1515 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1516 "participantId": "A String", # The ID of the participant that modified the match.
1517 },
1518 "previousMatchData": { # This is a JSON template for a turn-based match data object. # The data / game state for the previous match; set for the first turn of rematches only.
1519 "dataAvailable": True or False, # True if this match has data available but it wasn't returned in a list response; fetching the match individually will retrieve this data.
1520 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1521 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1522 },
1523 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
1524 "results": [ # The results reported for this match.
1525 { # This is a JSON template for a result for a match participant.
1526 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
1527 "placing": 42, # 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.
1528 "participantId": "A String", # The ID of the participant.
1529 "result": "A String", # The result of the participant for this match.
1530 # Possible values are:
1531 # - "MATCH_RESULT_WIN" - The participant won the match.
1532 # - "MATCH_RESULT_LOSS" - The participant lost the match.
1533 # - "MATCH_RESULT_TIE" - The participant tied the match.
1534 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
1535 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
1536 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
1537 },
1538 ],
1539 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
1540 "applicationId": "A String", # The ID of the application being played.
1541 "userMatchStatus": "A String", # The status of the current user in the match. Derived from the match type, match status, the user's participant status, and the pending participant for the match.
1542 # Possible values are:
1543 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
1544 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
1545 # - "USER_TURN" - The user has an action to take in the match.
1546 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
1547 "description": "A String", # This short description is generated by our servers based on turn state and is localized and worded relative to the player requesting the match. It is intended to be displayed when the match is shown in a list.
1548 },
1549 }</pre>
1550</div>
1551
1552<div class="method">
1553 <code class="details" id="sync">sync(maxCompletedMatches=None, language=None, pageToken=None, maxResults=None, includeMatchData=None)</code>
1554 <pre>Returns turn-based matches the player is or was involved in that changed since the last sync call, with the least recent changes coming first. Matches that should be removed from the local cache will have a status of MATCH_DELETED.
1555
1556Args:
1557 maxCompletedMatches: integer, The maximum number of completed or canceled matches to return in the response. If not set, all matches returned could be completed or canceled.
1558 language: string, The preferred language to use for strings returned by this method.
1559 pageToken: string, The token returned by the previous request.
1560 maxResults: integer, The maximum number of matches to return in the response, used for paging. For any response, the actual number of matches to return may be less than the specified maxResults.
1561 includeMatchData: boolean, True if match data should be returned in the response. Note that not all data will necessarily be returned if include_match_data is true; the server may decide to only return data for some of the matches to limit download size for the client. The remainder of the data for these matches will be retrievable on request.
1562
1563Returns:
1564 An object of the form:
1565
1566 { # This is a JSON template for a list of turn-based matches returned from a sync.
1567 "nextPageToken": "A String", # The pagination token for the next page of results.
1568 "items": [ # The matches.
1569 { # This is a JSON template for a turn-based match resource object.
1570 "status": "A String", # The status of the match.
1571 # Possible values are:
1572 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
1573 # - "MATCH_ACTIVE" - The match has started.
1574 # - "MATCH_COMPLETE" - The match has finished.
1575 # - "MATCH_CANCELED" - The match was canceled.
1576 # - "MATCH_EXPIRED" - The match expired due to inactivity.
1577 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
1578 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
1579 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
1580 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
1581 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
1582 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
1583 "exclusiveBitmask": "A String", # A bitmask indicating when auto-matches are valid. When ANDed with other exclusive bitmasks, the result must be zero. Can be used to support exclusive roles within a game.
1584 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
1585 },
1586 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
1587 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1588 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1589 "participantId": "A String", # The ID of the participant that modified the match.
1590 },
1591 "inviterId": "A String", # The ID of the participant that invited the user to the match. Not set if the user was not invited to the match.
1592 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
1593 "dataAvailable": True or False, # True if this match has data available but it wasn't returned in a list response; fetching the match individually will retrieve this data.
1594 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1595 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1596 },
1597 "matchId": "A String", # Globally unique ID for a turn-based match.
1598 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
1599 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
1600 { # This is a JSON template for a participant in a turn-based match.
1601 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
1602 "status": "A String", # The status of the participant with respect to the match.
1603 # Possible values are:
1604 # - "PARTICIPANT_NOT_INVITED_YET" - The participant is slated to be invited to the match, but the invitation has not been sent; the invite will be sent when it becomes their turn.
1605 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
1606 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
1607 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
1608 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
1609 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
1610 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
1611 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
1612 "autoMatchedPlayer": { # This is a JSON template for an anonymous player # Information about a player that has been anonymously auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.)
1613 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
1614 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
1615 "displayName": "A String", # The name to display for the anonymous player.
1616 },
1617 "player": { # This is a JSON template for a Player resource. # Information about the player. Not populated if this player was anonymously auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.)
1618 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
1619 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -07001620 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
1621 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
1622 "familyName": "A String", # The family name of this player. In some places, this is known as the last name.
John Asmuth614db982014-04-24 15:46:26 -04001623 },
Craig Citro065b5302014-08-14 00:47:23 -07001624 "lastPlayedWith": { # This is a JSON template for metadata about a player playing a game with the currently authenticated user. # Details about the last time this player played a multiplayer game with the currently authenticated player. Populated for PLAYED_WITH player collection members.
John Asmuth614db982014-04-24 15:46:26 -04001625 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
1626 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
1627 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
1628 },
1629 "playerId": "A String", # The ID of the player.
Craig Citro065b5302014-08-14 00:47:23 -07001630 "title": "A String", # The player's title rewarded for their game activities.
1631 "experienceInfo": { # This is a JSON template for 1P/3P metadata about the player's experience. # An object to represent Play Game experience information for the player.
1632 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
1633 "currentExperiencePoints": "A String", # The current number of experience points for the player.
1634 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
1635 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
1636 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1637 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1638 "minExperiencePoints": "A String", # The minimum experience points for this level.
1639 "level": 42, # The level for the user.
1640 },
1641 "nextLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The next level of the player. If the current level is the maximum level, this should be same as the current level.
1642 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1643 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1644 "minExperiencePoints": "A String", # The minimum experience points for this level.
1645 "level": 42, # The level for the user.
1646 },
1647 },
John Asmuth614db982014-04-24 15:46:26 -04001648 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
1649 },
1650 "id": "A String", # An identifier for the participant in the scope of the match. Cannot be used to identify a player across matches or in other contexts.
1651 },
1652 ],
1653 "matchNumber": 42, # The number of the match in a chain of rematches. Will be set to 1 for the first match and incremented by 1 for each rematch.
1654 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
1655 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
1656 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1657 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1658 "participantId": "A String", # The ID of the participant that modified the match.
1659 },
1660 "previousMatchData": { # This is a JSON template for a turn-based match data object. # The data / game state for the previous match; set for the first turn of rematches only.
1661 "dataAvailable": True or False, # True if this match has data available but it wasn't returned in a list response; fetching the match individually will retrieve this data.
1662 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1663 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1664 },
1665 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
1666 "results": [ # The results reported for this match.
1667 { # This is a JSON template for a result for a match participant.
1668 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
1669 "placing": 42, # 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.
1670 "participantId": "A String", # The ID of the participant.
1671 "result": "A String", # The result of the participant for this match.
1672 # Possible values are:
1673 # - "MATCH_RESULT_WIN" - The participant won the match.
1674 # - "MATCH_RESULT_LOSS" - The participant lost the match.
1675 # - "MATCH_RESULT_TIE" - The participant tied the match.
1676 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
1677 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
1678 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
1679 },
1680 ],
1681 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
1682 "applicationId": "A String", # The ID of the application being played.
1683 "userMatchStatus": "A String", # The status of the current user in the match. Derived from the match type, match status, the user's participant status, and the pending participant for the match.
1684 # Possible values are:
1685 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
1686 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
1687 # - "USER_TURN" - The user has an action to take in the match.
1688 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
1689 "description": "A String", # This short description is generated by our servers based on turn state and is localized and worded relative to the player requesting the match. It is intended to be displayed when the match is shown in a list.
1690 },
1691 ],
1692 "kind": "games#turnBasedMatchSync", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchSync.
1693 "moreAvailable": True or False, # True if there were more matches available to fetch at the time the response was generated (which were not returned due to page size limits.)
1694 }</pre>
1695</div>
1696
1697<div class="method">
1698 <code class="details" id="sync_next">sync_next(previous_request, previous_response)</code>
1699 <pre>Retrieves the next page of results.
1700
1701Args:
1702 previous_request: The request for the previous page. (required)
1703 previous_response: The response from the request for the previous page. (required)
1704
1705Returns:
1706 A request object that you can call 'execute()' on to request the next
1707 page. Returns None if there are no more items in the collection.
1708 </pre>
1709</div>
1710
1711<div class="method">
1712 <code class="details" id="takeTurn">takeTurn(matchId, body, language=None)</code>
1713 <pre>Commit the results of a player turn.
1714
1715Args:
1716 matchId: string, The ID of the match. (required)
1717 body: object, The request body. (required)
1718 The object takes the form of:
1719
1720{ # This is a JSON template for the object representing a turn.
1721 "kind": "games#turnBasedMatchTurn", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchTurn.
1722 "results": [ # The match results for the participants in the match.
1723 { # This is a JSON template for a result for a match participant.
1724 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
1725 "placing": 42, # 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.
1726 "participantId": "A String", # The ID of the participant.
1727 "result": "A String", # The result of the participant for this match.
1728 # Possible values are:
1729 # - "MATCH_RESULT_WIN" - The participant won the match.
1730 # - "MATCH_RESULT_LOSS" - The participant lost the match.
1731 # - "MATCH_RESULT_TIE" - The participant tied the match.
1732 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
1733 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
1734 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
1735 },
1736 ],
1737 "data": { # This is a JSON template for sending a turn-based match data object. # The shared game state data after the turn is over.
1738 "kind": "games#turnBasedMatchDataRequest", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchDataRequest.
1739 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1740 },
1741 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
1742 "pendingParticipantId": "A 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.
1743 }
1744
1745 language: string, The preferred language to use for strings returned by this method.
1746
1747Returns:
1748 An object of the form:
1749
1750 { # This is a JSON template for a turn-based match resource object.
1751 "status": "A String", # The status of the match.
1752 # Possible values are:
1753 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
1754 # - "MATCH_ACTIVE" - The match has started.
1755 # - "MATCH_COMPLETE" - The match has finished.
1756 # - "MATCH_CANCELED" - The match was canceled.
1757 # - "MATCH_EXPIRED" - The match expired due to inactivity.
1758 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
1759 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
1760 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
1761 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
1762 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
1763 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
1764 "exclusiveBitmask": "A String", # A bitmask indicating when auto-matches are valid. When ANDed with other exclusive bitmasks, the result must be zero. Can be used to support exclusive roles within a game.
1765 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
1766 },
1767 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
1768 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1769 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1770 "participantId": "A String", # The ID of the participant that modified the match.
1771 },
1772 "inviterId": "A String", # The ID of the participant that invited the user to the match. Not set if the user was not invited to the match.
1773 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
1774 "dataAvailable": True or False, # True if this match has data available but it wasn't returned in a list response; fetching the match individually will retrieve this data.
1775 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1776 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1777 },
1778 "matchId": "A String", # Globally unique ID for a turn-based match.
1779 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
1780 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
1781 { # This is a JSON template for a participant in a turn-based match.
1782 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
1783 "status": "A String", # The status of the participant with respect to the match.
1784 # Possible values are:
1785 # - "PARTICIPANT_NOT_INVITED_YET" - The participant is slated to be invited to the match, but the invitation has not been sent; the invite will be sent when it becomes their turn.
1786 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
1787 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
1788 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
1789 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
1790 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
1791 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
1792 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
1793 "autoMatchedPlayer": { # This is a JSON template for an anonymous player # Information about a player that has been anonymously auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.)
1794 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
1795 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
1796 "displayName": "A String", # The name to display for the anonymous player.
1797 },
1798 "player": { # This is a JSON template for a Player resource. # Information about the player. Not populated if this player was anonymously auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.)
1799 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
1800 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -07001801 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
1802 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
1803 "familyName": "A String", # The family name of this player. In some places, this is known as the last name.
John Asmuth614db982014-04-24 15:46:26 -04001804 },
Craig Citro065b5302014-08-14 00:47:23 -07001805 "lastPlayedWith": { # This is a JSON template for metadata about a player playing a game with the currently authenticated user. # Details about the last time this player played a multiplayer game with the currently authenticated player. Populated for PLAYED_WITH player collection members.
John Asmuth614db982014-04-24 15:46:26 -04001806 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
1807 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
1808 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
1809 },
1810 "playerId": "A String", # The ID of the player.
Craig Citro065b5302014-08-14 00:47:23 -07001811 "title": "A String", # The player's title rewarded for their game activities.
1812 "experienceInfo": { # This is a JSON template for 1P/3P metadata about the player's experience. # An object to represent Play Game experience information for the player.
1813 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
1814 "currentExperiencePoints": "A String", # The current number of experience points for the player.
1815 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
1816 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
1817 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1818 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1819 "minExperiencePoints": "A String", # The minimum experience points for this level.
1820 "level": 42, # The level for the user.
1821 },
1822 "nextLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The next level of the player. If the current level is the maximum level, this should be same as the current level.
1823 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1824 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1825 "minExperiencePoints": "A String", # The minimum experience points for this level.
1826 "level": 42, # The level for the user.
1827 },
1828 },
John Asmuth614db982014-04-24 15:46:26 -04001829 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
1830 },
1831 "id": "A String", # An identifier for the participant in the scope of the match. Cannot be used to identify a player across matches or in other contexts.
1832 },
1833 ],
1834 "matchNumber": 42, # The number of the match in a chain of rematches. Will be set to 1 for the first match and incremented by 1 for each rematch.
1835 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
1836 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
1837 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1838 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1839 "participantId": "A String", # The ID of the participant that modified the match.
1840 },
1841 "previousMatchData": { # This is a JSON template for a turn-based match data object. # The data / game state for the previous match; set for the first turn of rematches only.
1842 "dataAvailable": True or False, # True if this match has data available but it wasn't returned in a list response; fetching the match individually will retrieve this data.
1843 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1844 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1845 },
1846 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
1847 "results": [ # The results reported for this match.
1848 { # This is a JSON template for a result for a match participant.
1849 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
1850 "placing": 42, # 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.
1851 "participantId": "A String", # The ID of the participant.
1852 "result": "A String", # The result of the participant for this match.
1853 # Possible values are:
1854 # - "MATCH_RESULT_WIN" - The participant won the match.
1855 # - "MATCH_RESULT_LOSS" - The participant lost the match.
1856 # - "MATCH_RESULT_TIE" - The participant tied the match.
1857 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
1858 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
1859 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
1860 },
1861 ],
1862 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
1863 "applicationId": "A String", # The ID of the application being played.
1864 "userMatchStatus": "A String", # The status of the current user in the match. Derived from the match type, match status, the user's participant status, and the pending participant for the match.
1865 # Possible values are:
1866 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
1867 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
1868 # - "USER_TURN" - The user has an action to take in the match.
1869 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
1870 "description": "A String", # This short description is generated by our servers based on turn state and is localized and worded relative to the player requesting the match. It is intended to be displayed when the match is shown in a list.
1871 }</pre>
1872</div>
1873
1874</body></html>