blob: e8c90907568b9a2d6d744186afd2e8f4f25985e6 [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.)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800209 "originalPlayerId": "A String", # The player ID that was used for this player the first time they signed into the game in question. This is only populated for calls to player.get for the requesting player, only if the player ID has subsequently changed, and only to clients that support remapping player IDs.
John Asmuth614db982014-04-24 15:46:26 -0400210 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
211 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -0700212 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
213 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
214 "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 -0400215 },
Craig Citro065b5302014-08-14 00:47:23 -0700216 "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 -0400217 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
218 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
219 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
220 },
221 "playerId": "A String", # The ID of the player.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800222 "bannerUrlPortrait": "A String", # The url to the portrait mode player banner image.
Craig Citro065b5302014-08-14 00:47:23 -0700223 "title": "A String", # The player's title rewarded for their game activities.
224 "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.
225 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
226 "currentExperiencePoints": "A String", # The current number of experience points for the player.
227 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
228 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
229 "maxExperiencePoints": "A String", # The maximum experience points for this level.
230 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
231 "minExperiencePoints": "A String", # The minimum experience points for this level.
232 "level": 42, # The level for the user.
233 },
234 "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.
235 "maxExperiencePoints": "A String", # The maximum experience points for this level.
236 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
237 "minExperiencePoints": "A String", # The minimum experience points for this level.
238 "level": 42, # The level for the user.
239 },
240 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800241 "bannerUrlLandscape": "A String", # The url to the landscape mode player banner image.
John Asmuth614db982014-04-24 15:46:26 -0400242 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
243 },
244 "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.
245 },
246 ],
247 "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.
248 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
249 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
250 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
251 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
252 "participantId": "A String", # The ID of the participant that modified the match.
253 },
254 "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.
255 "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.
256 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
257 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
258 },
259 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
260 "results": [ # The results reported for this match.
261 { # This is a JSON template for a result for a match participant.
262 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
263 "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.
264 "participantId": "A String", # The ID of the participant.
265 "result": "A String", # The result of the participant for this match.
266 # Possible values are:
267 # - "MATCH_RESULT_WIN" - The participant won the match.
268 # - "MATCH_RESULT_LOSS" - The participant lost the match.
269 # - "MATCH_RESULT_TIE" - The participant tied the match.
270 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
271 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
272 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
273 },
274 ],
275 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
276 "applicationId": "A String", # The ID of the application being played.
277 "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.
278 # Possible values are:
279 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
280 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
281 # - "USER_TURN" - The user has an action to take in the match.
282 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
283 "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.
284 }</pre>
285</div>
286
287<div class="method">
288 <code class="details" id="decline">decline(matchId, language=None)</code>
289 <pre>Decline an invitation to play a turn-based match.
290
291Args:
292 matchId: string, The ID of the match. (required)
293 language: string, The preferred language to use for strings returned by this method.
294
295Returns:
296 An object of the form:
297
298 { # This is a JSON template for a turn-based match resource object.
299 "status": "A String", # The status of the match.
300 # Possible values are:
301 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
302 # - "MATCH_ACTIVE" - The match has started.
303 # - "MATCH_COMPLETE" - The match has finished.
304 # - "MATCH_CANCELED" - The match was canceled.
305 # - "MATCH_EXPIRED" - The match expired due to inactivity.
306 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
307 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
308 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
309 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
310 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
311 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
312 "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.
313 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
314 },
315 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
316 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
317 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
318 "participantId": "A String", # The ID of the participant that modified the match.
319 },
320 "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.
321 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
322 "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.
323 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
324 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
325 },
326 "matchId": "A String", # Globally unique ID for a turn-based match.
327 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
328 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
329 { # This is a JSON template for a participant in a turn-based match.
330 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
331 "status": "A String", # The status of the participant with respect to the match.
332 # Possible values are:
333 # - "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.
334 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
335 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
336 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
337 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
338 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
339 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
340 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
341 "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.)
342 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
343 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
344 "displayName": "A String", # The name to display for the anonymous player.
345 },
346 "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.)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800347 "originalPlayerId": "A String", # The player ID that was used for this player the first time they signed into the game in question. This is only populated for calls to player.get for the requesting player, only if the player ID has subsequently changed, and only to clients that support remapping player IDs.
John Asmuth614db982014-04-24 15:46:26 -0400348 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
349 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -0700350 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
351 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
352 "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 -0400353 },
Craig Citro065b5302014-08-14 00:47:23 -0700354 "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 -0400355 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
356 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
357 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
358 },
359 "playerId": "A String", # The ID of the player.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800360 "bannerUrlPortrait": "A String", # The url to the portrait mode player banner image.
Craig Citro065b5302014-08-14 00:47:23 -0700361 "title": "A String", # The player's title rewarded for their game activities.
362 "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.
363 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
364 "currentExperiencePoints": "A String", # The current number of experience points for the player.
365 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
366 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
367 "maxExperiencePoints": "A String", # The maximum experience points for this level.
368 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
369 "minExperiencePoints": "A String", # The minimum experience points for this level.
370 "level": 42, # The level for the user.
371 },
372 "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.
373 "maxExperiencePoints": "A String", # The maximum experience points for this level.
374 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
375 "minExperiencePoints": "A String", # The minimum experience points for this level.
376 "level": 42, # The level for the user.
377 },
378 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800379 "bannerUrlLandscape": "A String", # The url to the landscape mode player banner image.
John Asmuth614db982014-04-24 15:46:26 -0400380 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
381 },
382 "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.
383 },
384 ],
385 "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.
386 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
387 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
388 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
389 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
390 "participantId": "A String", # The ID of the participant that modified the match.
391 },
392 "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.
393 "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.
394 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
395 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
396 },
397 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
398 "results": [ # The results reported for this match.
399 { # This is a JSON template for a result for a match participant.
400 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
401 "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.
402 "participantId": "A String", # The ID of the participant.
403 "result": "A String", # The result of the participant for this match.
404 # Possible values are:
405 # - "MATCH_RESULT_WIN" - The participant won the match.
406 # - "MATCH_RESULT_LOSS" - The participant lost the match.
407 # - "MATCH_RESULT_TIE" - The participant tied the match.
408 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
409 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
410 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
411 },
412 ],
413 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
414 "applicationId": "A String", # The ID of the application being played.
415 "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.
416 # Possible values are:
417 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
418 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
419 # - "USER_TURN" - The user has an action to take in the match.
420 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
421 "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.
422 }</pre>
423</div>
424
425<div class="method">
426 <code class="details" id="dismiss">dismiss(matchId)</code>
427 <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.
428
429Args:
430 matchId: string, The ID of the match. (required)
431</pre>
432</div>
433
434<div class="method">
435 <code class="details" id="finish">finish(matchId, body, language=None)</code>
436 <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.
437
438Args:
439 matchId: string, The ID of the match. (required)
440 body: object, The request body. (required)
441 The object takes the form of:
442
443{ # This is a JSON template for a turn-based match results object.
444 "kind": "games#turnBasedMatchResults", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchResults.
445 "data": { # This is a JSON template for sending a turn-based match data object. # The final match data.
446 "kind": "games#turnBasedMatchDataRequest", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchDataRequest.
447 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
448 },
449 "matchVersion": 42, # The version of the match being updated.
450 "results": [ # The match results for the participants in the match.
451 { # This is a JSON template for a result for a match participant.
452 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
453 "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.
454 "participantId": "A String", # The ID of the participant.
455 "result": "A String", # The result of the participant for this match.
456 # Possible values are:
457 # - "MATCH_RESULT_WIN" - The participant won the match.
458 # - "MATCH_RESULT_LOSS" - The participant lost the match.
459 # - "MATCH_RESULT_TIE" - The participant tied the match.
460 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
461 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
462 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
463 },
464 ],
465 }
466
467 language: string, The preferred language to use for strings returned by this method.
468
469Returns:
470 An object of the form:
471
472 { # This is a JSON template for a turn-based match resource object.
473 "status": "A String", # The status of the match.
474 # Possible values are:
475 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
476 # - "MATCH_ACTIVE" - The match has started.
477 # - "MATCH_COMPLETE" - The match has finished.
478 # - "MATCH_CANCELED" - The match was canceled.
479 # - "MATCH_EXPIRED" - The match expired due to inactivity.
480 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
481 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
482 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
483 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
484 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
485 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
486 "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.
487 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
488 },
489 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
490 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
491 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
492 "participantId": "A String", # The ID of the participant that modified the match.
493 },
494 "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.
495 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
496 "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.
497 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
498 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
499 },
500 "matchId": "A String", # Globally unique ID for a turn-based match.
501 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
502 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
503 { # This is a JSON template for a participant in a turn-based match.
504 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
505 "status": "A String", # The status of the participant with respect to the match.
506 # Possible values are:
507 # - "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.
508 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
509 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
510 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
511 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
512 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
513 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
514 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
515 "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.)
516 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
517 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
518 "displayName": "A String", # The name to display for the anonymous player.
519 },
520 "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.)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800521 "originalPlayerId": "A String", # The player ID that was used for this player the first time they signed into the game in question. This is only populated for calls to player.get for the requesting player, only if the player ID has subsequently changed, and only to clients that support remapping player IDs.
John Asmuth614db982014-04-24 15:46:26 -0400522 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
523 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -0700524 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
525 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
526 "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 -0400527 },
Craig Citro065b5302014-08-14 00:47:23 -0700528 "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 -0400529 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
530 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
531 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
532 },
533 "playerId": "A String", # The ID of the player.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800534 "bannerUrlPortrait": "A String", # The url to the portrait mode player banner image.
Craig Citro065b5302014-08-14 00:47:23 -0700535 "title": "A String", # The player's title rewarded for their game activities.
536 "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.
537 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
538 "currentExperiencePoints": "A String", # The current number of experience points for the player.
539 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
540 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
541 "maxExperiencePoints": "A String", # The maximum experience points for this level.
542 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
543 "minExperiencePoints": "A String", # The minimum experience points for this level.
544 "level": 42, # The level for the user.
545 },
546 "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.
547 "maxExperiencePoints": "A String", # The maximum experience points for this level.
548 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
549 "minExperiencePoints": "A String", # The minimum experience points for this level.
550 "level": 42, # The level for the user.
551 },
552 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800553 "bannerUrlLandscape": "A String", # The url to the landscape mode player banner image.
John Asmuth614db982014-04-24 15:46:26 -0400554 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
555 },
556 "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.
557 },
558 ],
559 "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.
560 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
561 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
562 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
563 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
564 "participantId": "A String", # The ID of the participant that modified the match.
565 },
566 "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.
567 "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.
568 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
569 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
570 },
571 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
572 "results": [ # The results reported for this match.
573 { # This is a JSON template for a result for a match participant.
574 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
575 "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.
576 "participantId": "A String", # The ID of the participant.
577 "result": "A String", # The result of the participant for this match.
578 # Possible values are:
579 # - "MATCH_RESULT_WIN" - The participant won the match.
580 # - "MATCH_RESULT_LOSS" - The participant lost the match.
581 # - "MATCH_RESULT_TIE" - The participant tied the match.
582 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
583 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
584 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
585 },
586 ],
587 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
588 "applicationId": "A String", # The ID of the application being played.
589 "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.
590 # Possible values are:
591 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
592 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
593 # - "USER_TURN" - The user has an action to take in the match.
594 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
595 "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.
596 }</pre>
597</div>
598
599<div class="method">
600 <code class="details" id="get">get(matchId, language=None, includeMatchData=None)</code>
601 <pre>Get the data for a turn-based match.
602
603Args:
604 matchId: string, The ID of the match. (required)
605 language: string, The preferred language to use for strings returned by this method.
606 includeMatchData: boolean, Get match data along with metadata.
607
608Returns:
609 An object of the form:
610
611 { # This is a JSON template for a turn-based match resource object.
612 "status": "A String", # The status of the match.
613 # Possible values are:
614 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
615 # - "MATCH_ACTIVE" - The match has started.
616 # - "MATCH_COMPLETE" - The match has finished.
617 # - "MATCH_CANCELED" - The match was canceled.
618 # - "MATCH_EXPIRED" - The match expired due to inactivity.
619 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
620 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
621 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
622 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
623 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
624 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
625 "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.
626 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
627 },
628 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
629 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
630 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
631 "participantId": "A String", # The ID of the participant that modified the match.
632 },
633 "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.
634 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
635 "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.
636 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
637 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
638 },
639 "matchId": "A String", # Globally unique ID for a turn-based match.
640 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
641 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
642 { # This is a JSON template for a participant in a turn-based match.
643 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
644 "status": "A String", # The status of the participant with respect to the match.
645 # Possible values are:
646 # - "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.
647 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
648 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
649 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
650 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
651 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
652 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
653 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
654 "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.)
655 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
656 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
657 "displayName": "A String", # The name to display for the anonymous player.
658 },
659 "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.)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800660 "originalPlayerId": "A String", # The player ID that was used for this player the first time they signed into the game in question. This is only populated for calls to player.get for the requesting player, only if the player ID has subsequently changed, and only to clients that support remapping player IDs.
John Asmuth614db982014-04-24 15:46:26 -0400661 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
662 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -0700663 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
664 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
665 "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 -0400666 },
Craig Citro065b5302014-08-14 00:47:23 -0700667 "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 -0400668 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
669 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
670 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
671 },
672 "playerId": "A String", # The ID of the player.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800673 "bannerUrlPortrait": "A String", # The url to the portrait mode player banner image.
Craig Citro065b5302014-08-14 00:47:23 -0700674 "title": "A String", # The player's title rewarded for their game activities.
675 "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.
676 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
677 "currentExperiencePoints": "A String", # The current number of experience points for the player.
678 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
679 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
680 "maxExperiencePoints": "A String", # The maximum experience points for this level.
681 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
682 "minExperiencePoints": "A String", # The minimum experience points for this level.
683 "level": 42, # The level for the user.
684 },
685 "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.
686 "maxExperiencePoints": "A String", # The maximum experience points for this level.
687 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
688 "minExperiencePoints": "A String", # The minimum experience points for this level.
689 "level": 42, # The level for the user.
690 },
691 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800692 "bannerUrlLandscape": "A String", # The url to the landscape mode player banner image.
John Asmuth614db982014-04-24 15:46:26 -0400693 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
694 },
695 "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.
696 },
697 ],
698 "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.
699 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
700 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
701 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
702 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
703 "participantId": "A String", # The ID of the participant that modified the match.
704 },
705 "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.
706 "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.
707 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
708 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
709 },
710 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
711 "results": [ # The results reported for this match.
712 { # This is a JSON template for a result for a match participant.
713 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
714 "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.
715 "participantId": "A String", # The ID of the participant.
716 "result": "A String", # The result of the participant for this match.
717 # Possible values are:
718 # - "MATCH_RESULT_WIN" - The participant won the match.
719 # - "MATCH_RESULT_LOSS" - The participant lost the match.
720 # - "MATCH_RESULT_TIE" - The participant tied the match.
721 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
722 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
723 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
724 },
725 ],
726 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
727 "applicationId": "A String", # The ID of the application being played.
728 "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.
729 # Possible values are:
730 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
731 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
732 # - "USER_TURN" - The user has an action to take in the match.
733 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
734 "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.
735 }</pre>
736</div>
737
738<div class="method">
739 <code class="details" id="join">join(matchId, language=None)</code>
740 <pre>Join a turn-based match.
741
742Args:
743 matchId: string, The ID of the match. (required)
744 language: string, The preferred language to use for strings returned by this method.
745
746Returns:
747 An object of the form:
748
749 { # This is a JSON template for a turn-based match resource object.
750 "status": "A String", # The status of the match.
751 # Possible values are:
752 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
753 # - "MATCH_ACTIVE" - The match has started.
754 # - "MATCH_COMPLETE" - The match has finished.
755 # - "MATCH_CANCELED" - The match was canceled.
756 # - "MATCH_EXPIRED" - The match expired due to inactivity.
757 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
758 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
759 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
760 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
761 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
762 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
763 "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.
764 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
765 },
766 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
767 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
768 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
769 "participantId": "A String", # The ID of the participant that modified the match.
770 },
771 "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.
772 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
773 "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.
774 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
775 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
776 },
777 "matchId": "A String", # Globally unique ID for a turn-based match.
778 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
779 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
780 { # This is a JSON template for a participant in a turn-based match.
781 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
782 "status": "A String", # The status of the participant with respect to the match.
783 # Possible values are:
784 # - "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.
785 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
786 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
787 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
788 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
789 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
790 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
791 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
792 "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.)
793 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
794 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
795 "displayName": "A String", # The name to display for the anonymous player.
796 },
797 "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.)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800798 "originalPlayerId": "A String", # The player ID that was used for this player the first time they signed into the game in question. This is only populated for calls to player.get for the requesting player, only if the player ID has subsequently changed, and only to clients that support remapping player IDs.
John Asmuth614db982014-04-24 15:46:26 -0400799 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
800 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -0700801 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
802 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
803 "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 -0400804 },
Craig Citro065b5302014-08-14 00:47:23 -0700805 "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 -0400806 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
807 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
808 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
809 },
810 "playerId": "A String", # The ID of the player.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800811 "bannerUrlPortrait": "A String", # The url to the portrait mode player banner image.
Craig Citro065b5302014-08-14 00:47:23 -0700812 "title": "A String", # The player's title rewarded for their game activities.
813 "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.
814 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
815 "currentExperiencePoints": "A String", # The current number of experience points for the player.
816 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
817 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
818 "maxExperiencePoints": "A String", # The maximum experience points for this level.
819 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
820 "minExperiencePoints": "A String", # The minimum experience points for this level.
821 "level": 42, # The level for the user.
822 },
823 "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.
824 "maxExperiencePoints": "A String", # The maximum experience points for this level.
825 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
826 "minExperiencePoints": "A String", # The minimum experience points for this level.
827 "level": 42, # The level for the user.
828 },
829 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800830 "bannerUrlLandscape": "A String", # The url to the landscape mode player banner image.
John Asmuth614db982014-04-24 15:46:26 -0400831 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
832 },
833 "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.
834 },
835 ],
836 "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.
837 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
838 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
839 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
840 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
841 "participantId": "A String", # The ID of the participant that modified the match.
842 },
843 "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.
844 "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.
845 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
846 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
847 },
848 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
849 "results": [ # The results reported for this match.
850 { # This is a JSON template for a result for a match participant.
851 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
852 "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.
853 "participantId": "A String", # The ID of the participant.
854 "result": "A String", # The result of the participant for this match.
855 # Possible values are:
856 # - "MATCH_RESULT_WIN" - The participant won the match.
857 # - "MATCH_RESULT_LOSS" - The participant lost the match.
858 # - "MATCH_RESULT_TIE" - The participant tied the match.
859 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
860 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
861 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
862 },
863 ],
864 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
865 "applicationId": "A String", # The ID of the application being played.
866 "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.
867 # Possible values are:
868 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
869 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
870 # - "USER_TURN" - The user has an action to take in the match.
871 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
872 "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.
873 }</pre>
874</div>
875
876<div class="method">
877 <code class="details" id="leave">leave(matchId, language=None)</code>
878 <pre>Leave a turn-based match when it is not the current player's turn, without canceling the match.
879
880Args:
881 matchId: string, The ID of the match. (required)
882 language: string, The preferred language to use for strings returned by this method.
883
884Returns:
885 An object of the form:
886
887 { # This is a JSON template for a turn-based match resource object.
888 "status": "A String", # The status of the match.
889 # Possible values are:
890 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
891 # - "MATCH_ACTIVE" - The match has started.
892 # - "MATCH_COMPLETE" - The match has finished.
893 # - "MATCH_CANCELED" - The match was canceled.
894 # - "MATCH_EXPIRED" - The match expired due to inactivity.
895 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
896 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
897 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
898 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
899 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
900 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
901 "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.
902 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
903 },
904 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
905 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
906 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
907 "participantId": "A String", # The ID of the participant that modified the match.
908 },
909 "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.
910 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
911 "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.
912 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
913 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
914 },
915 "matchId": "A String", # Globally unique ID for a turn-based match.
916 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
917 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
918 { # This is a JSON template for a participant in a turn-based match.
919 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
920 "status": "A String", # The status of the participant with respect to the match.
921 # Possible values are:
922 # - "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.
923 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
924 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
925 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
926 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
927 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
928 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
929 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
930 "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.)
931 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
932 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
933 "displayName": "A String", # The name to display for the anonymous player.
934 },
935 "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.)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800936 "originalPlayerId": "A String", # The player ID that was used for this player the first time they signed into the game in question. This is only populated for calls to player.get for the requesting player, only if the player ID has subsequently changed, and only to clients that support remapping player IDs.
John Asmuth614db982014-04-24 15:46:26 -0400937 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
938 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -0700939 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
940 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
941 "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 -0400942 },
Craig Citro065b5302014-08-14 00:47:23 -0700943 "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 -0400944 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
945 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
946 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
947 },
948 "playerId": "A String", # The ID of the player.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800949 "bannerUrlPortrait": "A String", # The url to the portrait mode player banner image.
Craig Citro065b5302014-08-14 00:47:23 -0700950 "title": "A String", # The player's title rewarded for their game activities.
951 "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.
952 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
953 "currentExperiencePoints": "A String", # The current number of experience points for the player.
954 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
955 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
956 "maxExperiencePoints": "A String", # The maximum experience points for this level.
957 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
958 "minExperiencePoints": "A String", # The minimum experience points for this level.
959 "level": 42, # The level for the user.
960 },
961 "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.
962 "maxExperiencePoints": "A String", # The maximum experience points for this level.
963 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
964 "minExperiencePoints": "A String", # The minimum experience points for this level.
965 "level": 42, # The level for the user.
966 },
967 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800968 "bannerUrlLandscape": "A String", # The url to the landscape mode player banner image.
John Asmuth614db982014-04-24 15:46:26 -0400969 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
970 },
971 "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.
972 },
973 ],
974 "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.
975 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
976 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
977 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
978 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
979 "participantId": "A String", # The ID of the participant that modified the match.
980 },
981 "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.
982 "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.
983 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
984 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
985 },
986 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
987 "results": [ # The results reported for this match.
988 { # This is a JSON template for a result for a match participant.
989 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
990 "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.
991 "participantId": "A String", # The ID of the participant.
992 "result": "A String", # The result of the participant for this match.
993 # Possible values are:
994 # - "MATCH_RESULT_WIN" - The participant won the match.
995 # - "MATCH_RESULT_LOSS" - The participant lost the match.
996 # - "MATCH_RESULT_TIE" - The participant tied the match.
997 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
998 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
999 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
1000 },
1001 ],
1002 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
1003 "applicationId": "A String", # The ID of the application being played.
1004 "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.
1005 # Possible values are:
1006 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
1007 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
1008 # - "USER_TURN" - The user has an action to take in the match.
1009 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
1010 "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.
1011 }</pre>
1012</div>
1013
1014<div class="method">
1015 <code class="details" id="leaveTurn">leaveTurn(matchId, matchVersion, language=None, pendingParticipantId=None)</code>
1016 <pre>Leave a turn-based match during the current player's turn, without canceling the match.
1017
1018Args:
1019 matchId: string, The ID of the match. (required)
1020 matchVersion: integer, The version of the match being updated. (required)
1021 language: string, The preferred language to use for strings returned by this method.
1022 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.
1023
1024Returns:
1025 An object of the form:
1026
1027 { # This is a JSON template for a turn-based match resource object.
1028 "status": "A String", # The status of the match.
1029 # Possible values are:
1030 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
1031 # - "MATCH_ACTIVE" - The match has started.
1032 # - "MATCH_COMPLETE" - The match has finished.
1033 # - "MATCH_CANCELED" - The match was canceled.
1034 # - "MATCH_EXPIRED" - The match expired due to inactivity.
1035 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
1036 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
1037 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
1038 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
1039 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
1040 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
1041 "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.
1042 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
1043 },
1044 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
1045 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1046 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1047 "participantId": "A String", # The ID of the participant that modified the match.
1048 },
1049 "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.
1050 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
1051 "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.
1052 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1053 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1054 },
1055 "matchId": "A String", # Globally unique ID for a turn-based match.
1056 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
1057 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
1058 { # This is a JSON template for a participant in a turn-based match.
1059 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
1060 "status": "A String", # The status of the participant with respect to the match.
1061 # Possible values are:
1062 # - "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.
1063 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
1064 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
1065 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
1066 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
1067 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
1068 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
1069 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
1070 "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.)
1071 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
1072 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
1073 "displayName": "A String", # The name to display for the anonymous player.
1074 },
1075 "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.)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001076 "originalPlayerId": "A String", # The player ID that was used for this player the first time they signed into the game in question. This is only populated for calls to player.get for the requesting player, only if the player ID has subsequently changed, and only to clients that support remapping player IDs.
John Asmuth614db982014-04-24 15:46:26 -04001077 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
1078 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -07001079 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
1080 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
1081 "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 -04001082 },
Craig Citro065b5302014-08-14 00:47:23 -07001083 "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 -04001084 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
1085 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
1086 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
1087 },
1088 "playerId": "A String", # The ID of the player.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001089 "bannerUrlPortrait": "A String", # The url to the portrait mode player banner image.
Craig Citro065b5302014-08-14 00:47:23 -07001090 "title": "A String", # The player's title rewarded for their game activities.
1091 "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.
1092 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
1093 "currentExperiencePoints": "A String", # The current number of experience points for the player.
1094 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
1095 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
1096 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1097 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1098 "minExperiencePoints": "A String", # The minimum experience points for this level.
1099 "level": 42, # The level for the user.
1100 },
1101 "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.
1102 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1103 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1104 "minExperiencePoints": "A String", # The minimum experience points for this level.
1105 "level": 42, # The level for the user.
1106 },
1107 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001108 "bannerUrlLandscape": "A String", # The url to the landscape mode player banner image.
John Asmuth614db982014-04-24 15:46:26 -04001109 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
1110 },
1111 "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.
1112 },
1113 ],
1114 "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.
1115 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
1116 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
1117 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1118 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1119 "participantId": "A String", # The ID of the participant that modified the match.
1120 },
1121 "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.
1122 "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.
1123 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1124 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1125 },
1126 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
1127 "results": [ # The results reported for this match.
1128 { # This is a JSON template for a result for a match participant.
1129 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
1130 "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.
1131 "participantId": "A String", # The ID of the participant.
1132 "result": "A String", # The result of the participant for this match.
1133 # Possible values are:
1134 # - "MATCH_RESULT_WIN" - The participant won the match.
1135 # - "MATCH_RESULT_LOSS" - The participant lost the match.
1136 # - "MATCH_RESULT_TIE" - The participant tied the match.
1137 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
1138 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
1139 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
1140 },
1141 ],
1142 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
1143 "applicationId": "A String", # The ID of the application being played.
1144 "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.
1145 # Possible values are:
1146 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
1147 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
1148 # - "USER_TURN" - The user has an action to take in the match.
1149 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
1150 "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.
1151 }</pre>
1152</div>
1153
1154<div class="method">
1155 <code class="details" id="list">list(maxCompletedMatches=None, language=None, pageToken=None, maxResults=None, includeMatchData=None)</code>
1156 <pre>Returns turn-based matches the player is or was involved in.
1157
1158Args:
1159 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.
1160 language: string, The preferred language to use for strings returned by this method.
1161 pageToken: string, The token returned by the previous request.
1162 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.
1163 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.
1164
1165Returns:
1166 An object of the form:
1167
1168 { # This is a JSON template for a list of turn-based matches.
1169 "nextPageToken": "A String", # The pagination token for the next page of results.
1170 "items": [ # The matches.
1171 { # This is a JSON template for a turn-based match resource object.
1172 "status": "A String", # The status of the match.
1173 # Possible values are:
1174 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
1175 # - "MATCH_ACTIVE" - The match has started.
1176 # - "MATCH_COMPLETE" - The match has finished.
1177 # - "MATCH_CANCELED" - The match was canceled.
1178 # - "MATCH_EXPIRED" - The match expired due to inactivity.
1179 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
1180 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
1181 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
1182 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
1183 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
1184 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
1185 "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.
1186 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
1187 },
1188 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
1189 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1190 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1191 "participantId": "A String", # The ID of the participant that modified the match.
1192 },
1193 "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.
1194 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
1195 "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.
1196 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1197 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1198 },
1199 "matchId": "A String", # Globally unique ID for a turn-based match.
1200 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
1201 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
1202 { # This is a JSON template for a participant in a turn-based match.
1203 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
1204 "status": "A String", # The status of the participant with respect to the match.
1205 # Possible values are:
1206 # - "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.
1207 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
1208 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
1209 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
1210 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
1211 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
1212 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
1213 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
1214 "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.)
1215 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
1216 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
1217 "displayName": "A String", # The name to display for the anonymous player.
1218 },
1219 "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.)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001220 "originalPlayerId": "A String", # The player ID that was used for this player the first time they signed into the game in question. This is only populated for calls to player.get for the requesting player, only if the player ID has subsequently changed, and only to clients that support remapping player IDs.
John Asmuth614db982014-04-24 15:46:26 -04001221 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
1222 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -07001223 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
1224 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
1225 "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 -04001226 },
Craig Citro065b5302014-08-14 00:47:23 -07001227 "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 -04001228 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
1229 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
1230 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
1231 },
1232 "playerId": "A String", # The ID of the player.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001233 "bannerUrlPortrait": "A String", # The url to the portrait mode player banner image.
Craig Citro065b5302014-08-14 00:47:23 -07001234 "title": "A String", # The player's title rewarded for their game activities.
1235 "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.
1236 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
1237 "currentExperiencePoints": "A String", # The current number of experience points for the player.
1238 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
1239 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
1240 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1241 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1242 "minExperiencePoints": "A String", # The minimum experience points for this level.
1243 "level": 42, # The level for the user.
1244 },
1245 "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.
1246 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1247 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1248 "minExperiencePoints": "A String", # The minimum experience points for this level.
1249 "level": 42, # The level for the user.
1250 },
1251 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001252 "bannerUrlLandscape": "A String", # The url to the landscape mode player banner image.
John Asmuth614db982014-04-24 15:46:26 -04001253 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
1254 },
1255 "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.
1256 },
1257 ],
1258 "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.
1259 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
1260 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
1261 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1262 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1263 "participantId": "A String", # The ID of the participant that modified the match.
1264 },
1265 "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.
1266 "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.
1267 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1268 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1269 },
1270 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
1271 "results": [ # The results reported for this match.
1272 { # This is a JSON template for a result for a match participant.
1273 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
1274 "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.
1275 "participantId": "A String", # The ID of the participant.
1276 "result": "A String", # The result of the participant for this match.
1277 # Possible values are:
1278 # - "MATCH_RESULT_WIN" - The participant won the match.
1279 # - "MATCH_RESULT_LOSS" - The participant lost the match.
1280 # - "MATCH_RESULT_TIE" - The participant tied the match.
1281 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
1282 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
1283 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
1284 },
1285 ],
1286 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
1287 "applicationId": "A String", # The ID of the application being played.
1288 "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.
1289 # Possible values are:
1290 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
1291 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
1292 # - "USER_TURN" - The user has an action to take in the match.
1293 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
1294 "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.
1295 },
1296 ],
1297 "kind": "games#turnBasedMatchList", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchList.
1298 }</pre>
1299</div>
1300
1301<div class="method">
1302 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1303 <pre>Retrieves the next page of results.
1304
1305Args:
1306 previous_request: The request for the previous page. (required)
1307 previous_response: The response from the request for the previous page. (required)
1308
1309Returns:
1310 A request object that you can call 'execute()' on to request the next
1311 page. Returns None if there are no more items in the collection.
1312 </pre>
1313</div>
1314
1315<div class="method">
1316 <code class="details" id="rematch">rematch(matchId, language=None, requestId=None)</code>
1317 <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.
1318
1319Args:
1320 matchId: string, The ID of the match. (required)
1321 language: string, The preferred language to use for strings returned by this method.
1322 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.
1323
1324Returns:
1325 An object of the form:
1326
1327 { # This is a JSON template for a rematch response.
1328 "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.
1329 "status": "A String", # The status of the match.
1330 # Possible values are:
1331 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
1332 # - "MATCH_ACTIVE" - The match has started.
1333 # - "MATCH_COMPLETE" - The match has finished.
1334 # - "MATCH_CANCELED" - The match was canceled.
1335 # - "MATCH_EXPIRED" - The match expired due to inactivity.
1336 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
1337 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
1338 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
1339 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
1340 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
1341 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
1342 "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.
1343 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
1344 },
1345 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
1346 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1347 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1348 "participantId": "A String", # The ID of the participant that modified the match.
1349 },
1350 "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.
1351 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
1352 "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.
1353 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1354 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1355 },
1356 "matchId": "A String", # Globally unique ID for a turn-based match.
1357 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
1358 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
1359 { # This is a JSON template for a participant in a turn-based match.
1360 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
1361 "status": "A String", # The status of the participant with respect to the match.
1362 # Possible values are:
1363 # - "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.
1364 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
1365 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
1366 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
1367 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
1368 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
1369 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
1370 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
1371 "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.)
1372 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
1373 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
1374 "displayName": "A String", # The name to display for the anonymous player.
1375 },
1376 "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.)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001377 "originalPlayerId": "A String", # The player ID that was used for this player the first time they signed into the game in question. This is only populated for calls to player.get for the requesting player, only if the player ID has subsequently changed, and only to clients that support remapping player IDs.
John Asmuth614db982014-04-24 15:46:26 -04001378 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
1379 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -07001380 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
1381 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
1382 "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 -04001383 },
Craig Citro065b5302014-08-14 00:47:23 -07001384 "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 -04001385 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
1386 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
1387 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
1388 },
1389 "playerId": "A String", # The ID of the player.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001390 "bannerUrlPortrait": "A String", # The url to the portrait mode player banner image.
Craig Citro065b5302014-08-14 00:47:23 -07001391 "title": "A String", # The player's title rewarded for their game activities.
1392 "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.
1393 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
1394 "currentExperiencePoints": "A String", # The current number of experience points for the player.
1395 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
1396 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
1397 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1398 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1399 "minExperiencePoints": "A String", # The minimum experience points for this level.
1400 "level": 42, # The level for the user.
1401 },
1402 "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.
1403 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1404 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1405 "minExperiencePoints": "A String", # The minimum experience points for this level.
1406 "level": 42, # The level for the user.
1407 },
1408 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001409 "bannerUrlLandscape": "A String", # The url to the landscape mode player banner image.
John Asmuth614db982014-04-24 15:46:26 -04001410 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
1411 },
1412 "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.
1413 },
1414 ],
1415 "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.
1416 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
1417 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
1418 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1419 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1420 "participantId": "A String", # The ID of the participant that modified the match.
1421 },
1422 "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.
1423 "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.
1424 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1425 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1426 },
1427 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
1428 "results": [ # The results reported for this match.
1429 { # This is a JSON template for a result for a match participant.
1430 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
1431 "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.
1432 "participantId": "A String", # The ID of the participant.
1433 "result": "A String", # The result of the participant for this match.
1434 # Possible values are:
1435 # - "MATCH_RESULT_WIN" - The participant won the match.
1436 # - "MATCH_RESULT_LOSS" - The participant lost the match.
1437 # - "MATCH_RESULT_TIE" - The participant tied the match.
1438 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
1439 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
1440 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
1441 },
1442 ],
1443 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
1444 "applicationId": "A String", # The ID of the application being played.
1445 "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.
1446 # Possible values are:
1447 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
1448 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
1449 # - "USER_TURN" - The user has an action to take in the match.
1450 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
1451 "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.
1452 },
1453 "kind": "games#turnBasedMatchRematch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchRematch.
1454 "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.
1455 "status": "A String", # The status of the match.
1456 # Possible values are:
1457 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
1458 # - "MATCH_ACTIVE" - The match has started.
1459 # - "MATCH_COMPLETE" - The match has finished.
1460 # - "MATCH_CANCELED" - The match was canceled.
1461 # - "MATCH_EXPIRED" - The match expired due to inactivity.
1462 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
1463 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
1464 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
1465 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
1466 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
1467 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
1468 "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.
1469 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
1470 },
1471 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
1472 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1473 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1474 "participantId": "A String", # The ID of the participant that modified the match.
1475 },
1476 "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.
1477 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
1478 "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.
1479 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1480 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1481 },
1482 "matchId": "A String", # Globally unique ID for a turn-based match.
1483 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
1484 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
1485 { # This is a JSON template for a participant in a turn-based match.
1486 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
1487 "status": "A String", # The status of the participant with respect to the match.
1488 # Possible values are:
1489 # - "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.
1490 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
1491 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
1492 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
1493 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
1494 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
1495 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
1496 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
1497 "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.)
1498 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
1499 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
1500 "displayName": "A String", # The name to display for the anonymous player.
1501 },
1502 "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.)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001503 "originalPlayerId": "A String", # The player ID that was used for this player the first time they signed into the game in question. This is only populated for calls to player.get for the requesting player, only if the player ID has subsequently changed, and only to clients that support remapping player IDs.
John Asmuth614db982014-04-24 15:46:26 -04001504 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
1505 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -07001506 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
1507 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
1508 "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 -04001509 },
Craig Citro065b5302014-08-14 00:47:23 -07001510 "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 -04001511 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
1512 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
1513 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
1514 },
1515 "playerId": "A String", # The ID of the player.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001516 "bannerUrlPortrait": "A String", # The url to the portrait mode player banner image.
Craig Citro065b5302014-08-14 00:47:23 -07001517 "title": "A String", # The player's title rewarded for their game activities.
1518 "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.
1519 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
1520 "currentExperiencePoints": "A String", # The current number of experience points for the player.
1521 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
1522 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
1523 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1524 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1525 "minExperiencePoints": "A String", # The minimum experience points for this level.
1526 "level": 42, # The level for the user.
1527 },
1528 "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.
1529 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1530 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1531 "minExperiencePoints": "A String", # The minimum experience points for this level.
1532 "level": 42, # The level for the user.
1533 },
1534 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001535 "bannerUrlLandscape": "A String", # The url to the landscape mode player banner image.
John Asmuth614db982014-04-24 15:46:26 -04001536 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
1537 },
1538 "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.
1539 },
1540 ],
1541 "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.
1542 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
1543 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
1544 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1545 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1546 "participantId": "A String", # The ID of the participant that modified the match.
1547 },
1548 "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.
1549 "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.
1550 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1551 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1552 },
1553 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
1554 "results": [ # The results reported for this match.
1555 { # This is a JSON template for a result for a match participant.
1556 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
1557 "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.
1558 "participantId": "A String", # The ID of the participant.
1559 "result": "A String", # The result of the participant for this match.
1560 # Possible values are:
1561 # - "MATCH_RESULT_WIN" - The participant won the match.
1562 # - "MATCH_RESULT_LOSS" - The participant lost the match.
1563 # - "MATCH_RESULT_TIE" - The participant tied the match.
1564 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
1565 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
1566 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
1567 },
1568 ],
1569 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
1570 "applicationId": "A String", # The ID of the application being played.
1571 "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.
1572 # Possible values are:
1573 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
1574 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
1575 # - "USER_TURN" - The user has an action to take in the match.
1576 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
1577 "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.
1578 },
1579 }</pre>
1580</div>
1581
1582<div class="method">
1583 <code class="details" id="sync">sync(maxCompletedMatches=None, language=None, pageToken=None, maxResults=None, includeMatchData=None)</code>
1584 <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.
1585
1586Args:
1587 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.
1588 language: string, The preferred language to use for strings returned by this method.
1589 pageToken: string, The token returned by the previous request.
1590 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.
1591 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.
1592
1593Returns:
1594 An object of the form:
1595
1596 { # This is a JSON template for a list of turn-based matches returned from a sync.
1597 "nextPageToken": "A String", # The pagination token for the next page of results.
1598 "items": [ # The matches.
1599 { # This is a JSON template for a turn-based match resource object.
1600 "status": "A String", # The status of the match.
1601 # Possible values are:
1602 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
1603 # - "MATCH_ACTIVE" - The match has started.
1604 # - "MATCH_COMPLETE" - The match has finished.
1605 # - "MATCH_CANCELED" - The match was canceled.
1606 # - "MATCH_EXPIRED" - The match expired due to inactivity.
1607 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
1608 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
1609 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
1610 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
1611 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
1612 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
1613 "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.
1614 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
1615 },
1616 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
1617 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1618 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1619 "participantId": "A String", # The ID of the participant that modified the match.
1620 },
1621 "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.
1622 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
1623 "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.
1624 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1625 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1626 },
1627 "matchId": "A String", # Globally unique ID for a turn-based match.
1628 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
1629 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
1630 { # This is a JSON template for a participant in a turn-based match.
1631 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
1632 "status": "A String", # The status of the participant with respect to the match.
1633 # Possible values are:
1634 # - "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.
1635 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
1636 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
1637 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
1638 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
1639 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
1640 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
1641 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
1642 "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.)
1643 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
1644 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
1645 "displayName": "A String", # The name to display for the anonymous player.
1646 },
1647 "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.)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001648 "originalPlayerId": "A String", # The player ID that was used for this player the first time they signed into the game in question. This is only populated for calls to player.get for the requesting player, only if the player ID has subsequently changed, and only to clients that support remapping player IDs.
John Asmuth614db982014-04-24 15:46:26 -04001649 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
1650 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -07001651 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
1652 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
1653 "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 -04001654 },
Craig Citro065b5302014-08-14 00:47:23 -07001655 "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 -04001656 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
1657 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
1658 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
1659 },
1660 "playerId": "A String", # The ID of the player.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001661 "bannerUrlPortrait": "A String", # The url to the portrait mode player banner image.
Craig Citro065b5302014-08-14 00:47:23 -07001662 "title": "A String", # The player's title rewarded for their game activities.
1663 "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.
1664 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
1665 "currentExperiencePoints": "A String", # The current number of experience points for the player.
1666 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
1667 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
1668 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1669 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1670 "minExperiencePoints": "A String", # The minimum experience points for this level.
1671 "level": 42, # The level for the user.
1672 },
1673 "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.
1674 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1675 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1676 "minExperiencePoints": "A String", # The minimum experience points for this level.
1677 "level": 42, # The level for the user.
1678 },
1679 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001680 "bannerUrlLandscape": "A String", # The url to the landscape mode player banner image.
John Asmuth614db982014-04-24 15:46:26 -04001681 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
1682 },
1683 "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.
1684 },
1685 ],
1686 "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.
1687 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
1688 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
1689 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1690 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1691 "participantId": "A String", # The ID of the participant that modified the match.
1692 },
1693 "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.
1694 "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.
1695 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1696 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1697 },
1698 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
1699 "results": [ # The results reported for this match.
1700 { # This is a JSON template for a result for a match participant.
1701 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
1702 "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.
1703 "participantId": "A String", # The ID of the participant.
1704 "result": "A String", # The result of the participant for this match.
1705 # Possible values are:
1706 # - "MATCH_RESULT_WIN" - The participant won the match.
1707 # - "MATCH_RESULT_LOSS" - The participant lost the match.
1708 # - "MATCH_RESULT_TIE" - The participant tied the match.
1709 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
1710 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
1711 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
1712 },
1713 ],
1714 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
1715 "applicationId": "A String", # The ID of the application being played.
1716 "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.
1717 # Possible values are:
1718 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
1719 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
1720 # - "USER_TURN" - The user has an action to take in the match.
1721 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
1722 "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.
1723 },
1724 ],
1725 "kind": "games#turnBasedMatchSync", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchSync.
1726 "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.)
1727 }</pre>
1728</div>
1729
1730<div class="method">
1731 <code class="details" id="sync_next">sync_next(previous_request, previous_response)</code>
1732 <pre>Retrieves the next page of results.
1733
1734Args:
1735 previous_request: The request for the previous page. (required)
1736 previous_response: The response from the request for the previous page. (required)
1737
1738Returns:
1739 A request object that you can call 'execute()' on to request the next
1740 page. Returns None if there are no more items in the collection.
1741 </pre>
1742</div>
1743
1744<div class="method">
1745 <code class="details" id="takeTurn">takeTurn(matchId, body, language=None)</code>
1746 <pre>Commit the results of a player turn.
1747
1748Args:
1749 matchId: string, The ID of the match. (required)
1750 body: object, The request body. (required)
1751 The object takes the form of:
1752
1753{ # This is a JSON template for the object representing a turn.
1754 "kind": "games#turnBasedMatchTurn", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchTurn.
1755 "results": [ # The match results for the participants in the match.
1756 { # This is a JSON template for a result for a match participant.
1757 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
1758 "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.
1759 "participantId": "A String", # The ID of the participant.
1760 "result": "A String", # The result of the participant for this match.
1761 # Possible values are:
1762 # - "MATCH_RESULT_WIN" - The participant won the match.
1763 # - "MATCH_RESULT_LOSS" - The participant lost the match.
1764 # - "MATCH_RESULT_TIE" - The participant tied the match.
1765 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
1766 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
1767 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
1768 },
1769 ],
1770 "data": { # This is a JSON template for sending a turn-based match data object. # The shared game state data after the turn is over.
1771 "kind": "games#turnBasedMatchDataRequest", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchDataRequest.
1772 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1773 },
1774 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
1775 "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.
1776 }
1777
1778 language: string, The preferred language to use for strings returned by this method.
1779
1780Returns:
1781 An object of the form:
1782
1783 { # This is a JSON template for a turn-based match resource object.
1784 "status": "A String", # The status of the match.
1785 # Possible values are:
1786 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
1787 # - "MATCH_ACTIVE" - The match has started.
1788 # - "MATCH_COMPLETE" - The match has finished.
1789 # - "MATCH_CANCELED" - The match was canceled.
1790 # - "MATCH_EXPIRED" - The match expired due to inactivity.
1791 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
1792 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
1793 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
1794 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
1795 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
1796 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
1797 "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.
1798 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
1799 },
1800 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
1801 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1802 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1803 "participantId": "A String", # The ID of the participant that modified the match.
1804 },
1805 "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.
1806 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
1807 "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.
1808 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1809 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1810 },
1811 "matchId": "A String", # Globally unique ID for a turn-based match.
1812 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
1813 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
1814 { # This is a JSON template for a participant in a turn-based match.
1815 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
1816 "status": "A String", # The status of the participant with respect to the match.
1817 # Possible values are:
1818 # - "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.
1819 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
1820 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
1821 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
1822 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
1823 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
1824 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
1825 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
1826 "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.)
1827 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
1828 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
1829 "displayName": "A String", # The name to display for the anonymous player.
1830 },
1831 "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.)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001832 "originalPlayerId": "A String", # The player ID that was used for this player the first time they signed into the game in question. This is only populated for calls to player.get for the requesting player, only if the player ID has subsequently changed, and only to clients that support remapping player IDs.
John Asmuth614db982014-04-24 15:46:26 -04001833 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
1834 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -07001835 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
1836 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
1837 "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 -04001838 },
Craig Citro065b5302014-08-14 00:47:23 -07001839 "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 -04001840 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
1841 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
1842 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
1843 },
1844 "playerId": "A String", # The ID of the player.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001845 "bannerUrlPortrait": "A String", # The url to the portrait mode player banner image.
Craig Citro065b5302014-08-14 00:47:23 -07001846 "title": "A String", # The player's title rewarded for their game activities.
1847 "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.
1848 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
1849 "currentExperiencePoints": "A String", # The current number of experience points for the player.
1850 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
1851 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
1852 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1853 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1854 "minExperiencePoints": "A String", # The minimum experience points for this level.
1855 "level": 42, # The level for the user.
1856 },
1857 "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.
1858 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1859 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1860 "minExperiencePoints": "A String", # The minimum experience points for this level.
1861 "level": 42, # The level for the user.
1862 },
1863 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001864 "bannerUrlLandscape": "A String", # The url to the landscape mode player banner image.
John Asmuth614db982014-04-24 15:46:26 -04001865 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
1866 },
1867 "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.
1868 },
1869 ],
1870 "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.
1871 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
1872 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
1873 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1874 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1875 "participantId": "A String", # The ID of the participant that modified the match.
1876 },
1877 "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.
1878 "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.
1879 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1880 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1881 },
1882 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
1883 "results": [ # The results reported for this match.
1884 { # This is a JSON template for a result for a match participant.
1885 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
1886 "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.
1887 "participantId": "A String", # The ID of the participant.
1888 "result": "A String", # The result of the participant for this match.
1889 # Possible values are:
1890 # - "MATCH_RESULT_WIN" - The participant won the match.
1891 # - "MATCH_RESULT_LOSS" - The participant lost the match.
1892 # - "MATCH_RESULT_TIE" - The participant tied the match.
1893 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
1894 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
1895 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
1896 },
1897 ],
1898 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
1899 "applicationId": "A String", # The ID of the application being played.
1900 "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.
1901 # Possible values are:
1902 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
1903 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
1904 # - "USER_TURN" - The user has an action to take in the match.
1905 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
1906 "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.
1907 }</pre>
1908</div>
1909
1910</body></html>