blob: d065df497128fc9c4b6d56943dd3fccc2153513e [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">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070078 <code><a href="#cancel">cancel(matchId)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040079<p class="firstline">Cancel a turn-based match.</p>
80<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#create">create(body=None, language=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040082<p class="firstline">Create a turn-based match.</p>
83<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070084 <code><a href="#decline">decline(matchId, language=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040085<p class="firstline">Decline an invitation to play a turn-based match.</p>
86<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070087 <code><a href="#dismiss">dismiss(matchId)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040088<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">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#finish">finish(matchId, body=None, language=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040091<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">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070093 <code><a href="#get">get(matchId, language=None, includeMatchData=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040094<p class="firstline">Get the data for a turn-based match.</p>
95<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070096 <code><a href="#join">join(matchId, language=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040097<p class="firstline">Join a turn-based match.</p>
98<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070099 <code><a href="#leave">leave(matchId, language=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400100<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">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700102 <code><a href="#leaveTurn">leaveTurn(matchId, matchVersion, language=None, pendingParticipantId=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400103<p class="firstline">Leave a turn-based match during the current player's turn, without canceling the match.</p>
104<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700105 <code><a href="#list">list(maxCompletedMatches=None, language=None, pageToken=None, maxResults=None, includeMatchData=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400106<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">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700111 <code><a href="#rematch">rematch(matchId, language=None, requestId=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400112<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">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700114 <code><a href="#sync">sync(maxCompletedMatches=None, language=None, pageToken=None, maxResults=None, includeMatchData=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400115<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">
Dan O'Mearadd494642020-05-01 07:42:23 -0700120 <code><a href="#takeTurn">takeTurn(matchId, body=None, language=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400121<p class="firstline">Commit the results of a player turn.</p>
122<h3>Method Details</h3>
123<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700124 <code class="details" id="cancel">cancel(matchId)</code>
John Asmuth614db982014-04-24 15:46:26 -0400125 <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">
Dan O'Mearadd494642020-05-01 07:42:23 -0700133 <code class="details" id="create">create(body=None, language=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400134 <pre>Create a turn-based match.
135
136Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700137 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400138 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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700223 "profileSettings": { # This is a JSON template for profile settings # The player's profile settings. Controls whether or not the player's profile is visible to other players.
Dan O'Mearadd494642020-05-01 07:42:23 -0700224 "friendsListVisibility": "A String", # Whether the player's friends list is visible to the game.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700225 "kind": "games#profileSettings", # Uniquely identifies the type of this resource. Value is always the fixed string games#profileSettings.
Dan O'Mearadd494642020-05-01 07:42:23 -0700226 "profileVisible": True or False,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700227 },
Craig Citro065b5302014-08-14 00:47:23 -0700228 "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.
229 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
230 "currentExperiencePoints": "A String", # The current number of experience points for the player.
231 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
232 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
233 "maxExperiencePoints": "A String", # The maximum experience points for this level.
234 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
235 "minExperiencePoints": "A String", # The minimum experience points for this level.
236 "level": 42, # The level for the user.
237 },
238 "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.
239 "maxExperiencePoints": "A String", # The maximum experience points for this level.
240 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
241 "minExperiencePoints": "A String", # The minimum experience points for this level.
242 "level": 42, # The level for the user.
243 },
244 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700245 "friendStatus": "A String", # The friend status of the given player, relative to the requester. This is unset if the player is not sharing their friends list with the game.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800246 "bannerUrlLandscape": "A String", # The url to the landscape mode player banner image.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700247 "title": "A String", # The player's title rewarded for their game activities.
John Asmuth614db982014-04-24 15:46:26 -0400248 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
249 },
250 "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.
251 },
252 ],
253 "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.
254 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
255 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
256 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
257 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
258 "participantId": "A String", # The ID of the participant that modified the match.
259 },
260 "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.
261 "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.
262 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
263 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
264 },
265 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
266 "results": [ # The results reported for this match.
267 { # This is a JSON template for a result for a match participant.
268 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
269 "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.
270 "participantId": "A String", # The ID of the participant.
271 "result": "A String", # The result of the participant for this match.
272 # Possible values are:
273 # - "MATCH_RESULT_WIN" - The participant won the match.
274 # - "MATCH_RESULT_LOSS" - The participant lost the match.
275 # - "MATCH_RESULT_TIE" - The participant tied the match.
276 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
277 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
278 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
279 },
280 ],
281 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
282 "applicationId": "A String", # The ID of the application being played.
283 "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.
284 # Possible values are:
285 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
286 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
287 # - "USER_TURN" - The user has an action to take in the match.
288 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
289 "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.
290 }</pre>
291</div>
292
293<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700294 <code class="details" id="decline">decline(matchId, language=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400295 <pre>Decline an invitation to play a turn-based match.
296
297Args:
298 matchId: string, The ID of the match. (required)
299 language: string, The preferred language to use for strings returned by this method.
300
301Returns:
302 An object of the form:
303
304 { # This is a JSON template for a turn-based match resource object.
305 "status": "A String", # The status of the match.
306 # Possible values are:
307 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
308 # - "MATCH_ACTIVE" - The match has started.
309 # - "MATCH_COMPLETE" - The match has finished.
310 # - "MATCH_CANCELED" - The match was canceled.
311 # - "MATCH_EXPIRED" - The match expired due to inactivity.
312 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
313 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
314 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
315 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
316 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
317 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
318 "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.
319 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
320 },
321 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
322 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
323 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
324 "participantId": "A String", # The ID of the participant that modified the match.
325 },
326 "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.
327 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
328 "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.
329 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
330 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
331 },
332 "matchId": "A String", # Globally unique ID for a turn-based match.
333 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
334 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
335 { # This is a JSON template for a participant in a turn-based match.
336 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
337 "status": "A String", # The status of the participant with respect to the match.
338 # Possible values are:
339 # - "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.
340 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
341 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
342 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
343 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
344 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
345 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
346 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
347 "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.)
348 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
349 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
350 "displayName": "A String", # The name to display for the anonymous player.
351 },
352 "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 -0800353 "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 -0400354 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
355 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -0700356 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
357 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
358 "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 -0400359 },
Craig Citro065b5302014-08-14 00:47:23 -0700360 "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 -0400361 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
362 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
363 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
364 },
365 "playerId": "A String", # The ID of the player.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800366 "bannerUrlPortrait": "A String", # The url to the portrait mode player banner image.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700367 "profileSettings": { # This is a JSON template for profile settings # The player's profile settings. Controls whether or not the player's profile is visible to other players.
Dan O'Mearadd494642020-05-01 07:42:23 -0700368 "friendsListVisibility": "A String", # Whether the player's friends list is visible to the game.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700369 "kind": "games#profileSettings", # Uniquely identifies the type of this resource. Value is always the fixed string games#profileSettings.
Dan O'Mearadd494642020-05-01 07:42:23 -0700370 "profileVisible": True or False,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700371 },
Craig Citro065b5302014-08-14 00:47:23 -0700372 "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.
373 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
374 "currentExperiencePoints": "A String", # The current number of experience points for the player.
375 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
376 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
377 "maxExperiencePoints": "A String", # The maximum experience points for this level.
378 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
379 "minExperiencePoints": "A String", # The minimum experience points for this level.
380 "level": 42, # The level for the user.
381 },
382 "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.
383 "maxExperiencePoints": "A String", # The maximum experience points for this level.
384 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
385 "minExperiencePoints": "A String", # The minimum experience points for this level.
386 "level": 42, # The level for the user.
387 },
388 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700389 "friendStatus": "A String", # The friend status of the given player, relative to the requester. This is unset if the player is not sharing their friends list with the game.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800390 "bannerUrlLandscape": "A String", # The url to the landscape mode player banner image.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700391 "title": "A String", # The player's title rewarded for their game activities.
John Asmuth614db982014-04-24 15:46:26 -0400392 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
393 },
394 "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.
395 },
396 ],
397 "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.
398 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
399 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
400 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
401 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
402 "participantId": "A String", # The ID of the participant that modified the match.
403 },
404 "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.
405 "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.
406 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
407 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
408 },
409 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
410 "results": [ # The results reported for this match.
411 { # This is a JSON template for a result for a match participant.
412 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
413 "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.
414 "participantId": "A String", # The ID of the participant.
415 "result": "A String", # The result of the participant for this match.
416 # Possible values are:
417 # - "MATCH_RESULT_WIN" - The participant won the match.
418 # - "MATCH_RESULT_LOSS" - The participant lost the match.
419 # - "MATCH_RESULT_TIE" - The participant tied the match.
420 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
421 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
422 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
423 },
424 ],
425 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
426 "applicationId": "A String", # The ID of the application being played.
427 "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.
428 # Possible values are:
429 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
430 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
431 # - "USER_TURN" - The user has an action to take in the match.
432 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
433 "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.
434 }</pre>
435</div>
436
437<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700438 <code class="details" id="dismiss">dismiss(matchId)</code>
John Asmuth614db982014-04-24 15:46:26 -0400439 <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.
440
441Args:
442 matchId: string, The ID of the match. (required)
443</pre>
444</div>
445
446<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700447 <code class="details" id="finish">finish(matchId, body=None, language=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400448 <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.
449
450Args:
451 matchId: string, The ID of the match. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700452 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400453 The object takes the form of:
454
455{ # This is a JSON template for a turn-based match results object.
456 "kind": "games#turnBasedMatchResults", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchResults.
457 "data": { # This is a JSON template for sending a turn-based match data object. # The final match data.
458 "kind": "games#turnBasedMatchDataRequest", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchDataRequest.
459 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
460 },
461 "matchVersion": 42, # The version of the match being updated.
462 "results": [ # The match results for the participants in the match.
463 { # This is a JSON template for a result for a match participant.
464 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
465 "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.
466 "participantId": "A String", # The ID of the participant.
467 "result": "A String", # The result of the participant for this match.
468 # Possible values are:
469 # - "MATCH_RESULT_WIN" - The participant won the match.
470 # - "MATCH_RESULT_LOSS" - The participant lost the match.
471 # - "MATCH_RESULT_TIE" - The participant tied the match.
472 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
473 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
474 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
475 },
476 ],
477 }
478
479 language: string, The preferred language to use for strings returned by this method.
480
481Returns:
482 An object of the form:
483
484 { # This is a JSON template for a turn-based match resource object.
485 "status": "A String", # The status of the match.
486 # Possible values are:
487 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
488 # - "MATCH_ACTIVE" - The match has started.
489 # - "MATCH_COMPLETE" - The match has finished.
490 # - "MATCH_CANCELED" - The match was canceled.
491 # - "MATCH_EXPIRED" - The match expired due to inactivity.
492 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
493 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
494 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
495 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
496 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
497 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
498 "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.
499 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
500 },
501 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
502 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
503 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
504 "participantId": "A String", # The ID of the participant that modified the match.
505 },
506 "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.
507 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
508 "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.
509 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
510 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
511 },
512 "matchId": "A String", # Globally unique ID for a turn-based match.
513 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
514 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
515 { # This is a JSON template for a participant in a turn-based match.
516 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
517 "status": "A String", # The status of the participant with respect to the match.
518 # Possible values are:
519 # - "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.
520 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
521 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
522 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
523 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
524 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
525 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
526 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
527 "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.)
528 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
529 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
530 "displayName": "A String", # The name to display for the anonymous player.
531 },
532 "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 -0800533 "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 -0400534 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
535 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -0700536 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
537 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
538 "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 -0400539 },
Craig Citro065b5302014-08-14 00:47:23 -0700540 "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 -0400541 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
542 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
543 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
544 },
545 "playerId": "A String", # The ID of the player.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800546 "bannerUrlPortrait": "A String", # The url to the portrait mode player banner image.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700547 "profileSettings": { # This is a JSON template for profile settings # The player's profile settings. Controls whether or not the player's profile is visible to other players.
Dan O'Mearadd494642020-05-01 07:42:23 -0700548 "friendsListVisibility": "A String", # Whether the player's friends list is visible to the game.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700549 "kind": "games#profileSettings", # Uniquely identifies the type of this resource. Value is always the fixed string games#profileSettings.
Dan O'Mearadd494642020-05-01 07:42:23 -0700550 "profileVisible": True or False,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700551 },
Craig Citro065b5302014-08-14 00:47:23 -0700552 "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.
553 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
554 "currentExperiencePoints": "A String", # The current number of experience points for the player.
555 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
556 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
557 "maxExperiencePoints": "A String", # The maximum experience points for this level.
558 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
559 "minExperiencePoints": "A String", # The minimum experience points for this level.
560 "level": 42, # The level for the user.
561 },
562 "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.
563 "maxExperiencePoints": "A String", # The maximum experience points for this level.
564 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
565 "minExperiencePoints": "A String", # The minimum experience points for this level.
566 "level": 42, # The level for the user.
567 },
568 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700569 "friendStatus": "A String", # The friend status of the given player, relative to the requester. This is unset if the player is not sharing their friends list with the game.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800570 "bannerUrlLandscape": "A String", # The url to the landscape mode player banner image.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700571 "title": "A String", # The player's title rewarded for their game activities.
John Asmuth614db982014-04-24 15:46:26 -0400572 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
573 },
574 "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.
575 },
576 ],
577 "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.
578 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
579 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
580 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
581 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
582 "participantId": "A String", # The ID of the participant that modified the match.
583 },
584 "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.
585 "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.
586 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
587 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
588 },
589 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
590 "results": [ # The results reported for this match.
591 { # This is a JSON template for a result for a match participant.
592 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
593 "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.
594 "participantId": "A String", # The ID of the participant.
595 "result": "A String", # The result of the participant for this match.
596 # Possible values are:
597 # - "MATCH_RESULT_WIN" - The participant won the match.
598 # - "MATCH_RESULT_LOSS" - The participant lost the match.
599 # - "MATCH_RESULT_TIE" - The participant tied the match.
600 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
601 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
602 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
603 },
604 ],
605 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
606 "applicationId": "A String", # The ID of the application being played.
607 "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.
608 # Possible values are:
609 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
610 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
611 # - "USER_TURN" - The user has an action to take in the match.
612 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
613 "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.
614 }</pre>
615</div>
616
617<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700618 <code class="details" id="get">get(matchId, language=None, includeMatchData=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400619 <pre>Get the data for a turn-based match.
620
621Args:
622 matchId: string, The ID of the match. (required)
623 language: string, The preferred language to use for strings returned by this method.
624 includeMatchData: boolean, Get match data along with metadata.
625
626Returns:
627 An object of the form:
628
629 { # This is a JSON template for a turn-based match resource object.
630 "status": "A String", # The status of the match.
631 # Possible values are:
632 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
633 # - "MATCH_ACTIVE" - The match has started.
634 # - "MATCH_COMPLETE" - The match has finished.
635 # - "MATCH_CANCELED" - The match was canceled.
636 # - "MATCH_EXPIRED" - The match expired due to inactivity.
637 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
638 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
639 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
640 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
641 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
642 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
643 "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.
644 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
645 },
646 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
647 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
648 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
649 "participantId": "A String", # The ID of the participant that modified the match.
650 },
651 "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.
652 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
653 "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.
654 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
655 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
656 },
657 "matchId": "A String", # Globally unique ID for a turn-based match.
658 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
659 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
660 { # This is a JSON template for a participant in a turn-based match.
661 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
662 "status": "A String", # The status of the participant with respect to the match.
663 # Possible values are:
664 # - "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.
665 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
666 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
667 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
668 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
669 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
670 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
671 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
672 "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.)
673 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
674 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
675 "displayName": "A String", # The name to display for the anonymous player.
676 },
677 "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 -0800678 "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 -0400679 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
680 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -0700681 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
682 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
683 "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 -0400684 },
Craig Citro065b5302014-08-14 00:47:23 -0700685 "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 -0400686 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
687 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
688 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
689 },
690 "playerId": "A String", # The ID of the player.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800691 "bannerUrlPortrait": "A String", # The url to the portrait mode player banner image.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700692 "profileSettings": { # This is a JSON template for profile settings # The player's profile settings. Controls whether or not the player's profile is visible to other players.
Dan O'Mearadd494642020-05-01 07:42:23 -0700693 "friendsListVisibility": "A String", # Whether the player's friends list is visible to the game.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700694 "kind": "games#profileSettings", # Uniquely identifies the type of this resource. Value is always the fixed string games#profileSettings.
Dan O'Mearadd494642020-05-01 07:42:23 -0700695 "profileVisible": True or False,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700696 },
Craig Citro065b5302014-08-14 00:47:23 -0700697 "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.
698 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
699 "currentExperiencePoints": "A String", # The current number of experience points for the player.
700 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
701 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
702 "maxExperiencePoints": "A String", # The maximum experience points for this level.
703 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
704 "minExperiencePoints": "A String", # The minimum experience points for this level.
705 "level": 42, # The level for the user.
706 },
707 "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.
708 "maxExperiencePoints": "A String", # The maximum experience points for this level.
709 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
710 "minExperiencePoints": "A String", # The minimum experience points for this level.
711 "level": 42, # The level for the user.
712 },
713 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700714 "friendStatus": "A String", # The friend status of the given player, relative to the requester. This is unset if the player is not sharing their friends list with the game.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800715 "bannerUrlLandscape": "A String", # The url to the landscape mode player banner image.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700716 "title": "A String", # The player's title rewarded for their game activities.
John Asmuth614db982014-04-24 15:46:26 -0400717 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
718 },
719 "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.
720 },
721 ],
722 "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.
723 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
724 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
725 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
726 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
727 "participantId": "A String", # The ID of the participant that modified the match.
728 },
729 "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.
730 "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.
731 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
732 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
733 },
734 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
735 "results": [ # The results reported for this match.
736 { # This is a JSON template for a result for a match participant.
737 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
738 "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.
739 "participantId": "A String", # The ID of the participant.
740 "result": "A String", # The result of the participant for this match.
741 # Possible values are:
742 # - "MATCH_RESULT_WIN" - The participant won the match.
743 # - "MATCH_RESULT_LOSS" - The participant lost the match.
744 # - "MATCH_RESULT_TIE" - The participant tied the match.
745 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
746 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
747 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
748 },
749 ],
750 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
751 "applicationId": "A String", # The ID of the application being played.
752 "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.
753 # Possible values are:
754 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
755 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
756 # - "USER_TURN" - The user has an action to take in the match.
757 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
758 "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.
759 }</pre>
760</div>
761
762<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700763 <code class="details" id="join">join(matchId, language=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400764 <pre>Join a turn-based match.
765
766Args:
767 matchId: string, The ID of the match. (required)
768 language: string, The preferred language to use for strings returned by this method.
769
770Returns:
771 An object of the form:
772
773 { # This is a JSON template for a turn-based match resource object.
774 "status": "A String", # The status of the match.
775 # Possible values are:
776 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
777 # - "MATCH_ACTIVE" - The match has started.
778 # - "MATCH_COMPLETE" - The match has finished.
779 # - "MATCH_CANCELED" - The match was canceled.
780 # - "MATCH_EXPIRED" - The match expired due to inactivity.
781 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
782 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
783 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
784 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
785 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
786 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
787 "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.
788 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
789 },
790 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
791 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
792 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
793 "participantId": "A String", # The ID of the participant that modified the match.
794 },
795 "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.
796 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
797 "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.
798 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
799 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
800 },
801 "matchId": "A String", # Globally unique ID for a turn-based match.
802 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
803 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
804 { # This is a JSON template for a participant in a turn-based match.
805 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
806 "status": "A String", # The status of the participant with respect to the match.
807 # Possible values are:
808 # - "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.
809 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
810 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
811 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
812 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
813 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
814 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
815 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
816 "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.)
817 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
818 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
819 "displayName": "A String", # The name to display for the anonymous player.
820 },
821 "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 -0800822 "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 -0400823 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
824 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -0700825 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
826 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
827 "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 -0400828 },
Craig Citro065b5302014-08-14 00:47:23 -0700829 "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 -0400830 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
831 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
832 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
833 },
834 "playerId": "A String", # The ID of the player.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800835 "bannerUrlPortrait": "A String", # The url to the portrait mode player banner image.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700836 "profileSettings": { # This is a JSON template for profile settings # The player's profile settings. Controls whether or not the player's profile is visible to other players.
Dan O'Mearadd494642020-05-01 07:42:23 -0700837 "friendsListVisibility": "A String", # Whether the player's friends list is visible to the game.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700838 "kind": "games#profileSettings", # Uniquely identifies the type of this resource. Value is always the fixed string games#profileSettings.
Dan O'Mearadd494642020-05-01 07:42:23 -0700839 "profileVisible": True or False,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700840 },
Craig Citro065b5302014-08-14 00:47:23 -0700841 "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.
842 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
843 "currentExperiencePoints": "A String", # The current number of experience points for the player.
844 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
845 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
846 "maxExperiencePoints": "A String", # The maximum experience points for this level.
847 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
848 "minExperiencePoints": "A String", # The minimum experience points for this level.
849 "level": 42, # The level for the user.
850 },
851 "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.
852 "maxExperiencePoints": "A String", # The maximum experience points for this level.
853 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
854 "minExperiencePoints": "A String", # The minimum experience points for this level.
855 "level": 42, # The level for the user.
856 },
857 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700858 "friendStatus": "A String", # The friend status of the given player, relative to the requester. This is unset if the player is not sharing their friends list with the game.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800859 "bannerUrlLandscape": "A String", # The url to the landscape mode player banner image.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700860 "title": "A String", # The player's title rewarded for their game activities.
John Asmuth614db982014-04-24 15:46:26 -0400861 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
862 },
863 "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.
864 },
865 ],
866 "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.
867 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
868 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
869 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
870 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
871 "participantId": "A String", # The ID of the participant that modified the match.
872 },
873 "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.
874 "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.
875 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
876 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
877 },
878 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
879 "results": [ # The results reported for this match.
880 { # This is a JSON template for a result for a match participant.
881 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
882 "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.
883 "participantId": "A String", # The ID of the participant.
884 "result": "A String", # The result of the participant for this match.
885 # Possible values are:
886 # - "MATCH_RESULT_WIN" - The participant won the match.
887 # - "MATCH_RESULT_LOSS" - The participant lost the match.
888 # - "MATCH_RESULT_TIE" - The participant tied the match.
889 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
890 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
891 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
892 },
893 ],
894 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
895 "applicationId": "A String", # The ID of the application being played.
896 "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.
897 # Possible values are:
898 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
899 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
900 # - "USER_TURN" - The user has an action to take in the match.
901 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
902 "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.
903 }</pre>
904</div>
905
906<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700907 <code class="details" id="leave">leave(matchId, language=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400908 <pre>Leave a turn-based match when it is not the current player's turn, without canceling the match.
909
910Args:
911 matchId: string, The ID of the match. (required)
912 language: string, The preferred language to use for strings returned by this method.
913
914Returns:
915 An object of the form:
916
917 { # This is a JSON template for a turn-based match resource object.
918 "status": "A String", # The status of the match.
919 # Possible values are:
920 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
921 # - "MATCH_ACTIVE" - The match has started.
922 # - "MATCH_COMPLETE" - The match has finished.
923 # - "MATCH_CANCELED" - The match was canceled.
924 # - "MATCH_EXPIRED" - The match expired due to inactivity.
925 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
926 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
927 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
928 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
929 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
930 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
931 "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.
932 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
933 },
934 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
935 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
936 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
937 "participantId": "A String", # The ID of the participant that modified the match.
938 },
939 "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.
940 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
941 "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.
942 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
943 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
944 },
945 "matchId": "A String", # Globally unique ID for a turn-based match.
946 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
947 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
948 { # This is a JSON template for a participant in a turn-based match.
949 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
950 "status": "A String", # The status of the participant with respect to the match.
951 # Possible values are:
952 # - "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.
953 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
954 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
955 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
956 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
957 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
958 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
959 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
960 "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.)
961 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
962 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
963 "displayName": "A String", # The name to display for the anonymous player.
964 },
965 "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 -0800966 "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 -0400967 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
968 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -0700969 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
970 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
971 "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 -0400972 },
Craig Citro065b5302014-08-14 00:47:23 -0700973 "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 -0400974 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
975 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
976 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
977 },
978 "playerId": "A String", # The ID of the player.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800979 "bannerUrlPortrait": "A String", # The url to the portrait mode player banner image.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700980 "profileSettings": { # This is a JSON template for profile settings # The player's profile settings. Controls whether or not the player's profile is visible to other players.
Dan O'Mearadd494642020-05-01 07:42:23 -0700981 "friendsListVisibility": "A String", # Whether the player's friends list is visible to the game.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700982 "kind": "games#profileSettings", # Uniquely identifies the type of this resource. Value is always the fixed string games#profileSettings.
Dan O'Mearadd494642020-05-01 07:42:23 -0700983 "profileVisible": True or False,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700984 },
Craig Citro065b5302014-08-14 00:47:23 -0700985 "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.
986 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
987 "currentExperiencePoints": "A String", # The current number of experience points for the player.
988 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
989 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
990 "maxExperiencePoints": "A String", # The maximum experience points for this level.
991 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
992 "minExperiencePoints": "A String", # The minimum experience points for this level.
993 "level": 42, # The level for the user.
994 },
995 "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.
996 "maxExperiencePoints": "A String", # The maximum experience points for this level.
997 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
998 "minExperiencePoints": "A String", # The minimum experience points for this level.
999 "level": 42, # The level for the user.
1000 },
1001 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001002 "friendStatus": "A String", # The friend status of the given player, relative to the requester. This is unset if the player is not sharing their friends list with the game.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001003 "bannerUrlLandscape": "A String", # The url to the landscape mode player banner image.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001004 "title": "A String", # The player's title rewarded for their game activities.
John Asmuth614db982014-04-24 15:46:26 -04001005 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
1006 },
1007 "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.
1008 },
1009 ],
1010 "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.
1011 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
1012 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
1013 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1014 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1015 "participantId": "A String", # The ID of the participant that modified the match.
1016 },
1017 "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.
1018 "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.
1019 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1020 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1021 },
1022 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
1023 "results": [ # The results reported for this match.
1024 { # This is a JSON template for a result for a match participant.
1025 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
1026 "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.
1027 "participantId": "A String", # The ID of the participant.
1028 "result": "A String", # The result of the participant for this match.
1029 # Possible values are:
1030 # - "MATCH_RESULT_WIN" - The participant won the match.
1031 # - "MATCH_RESULT_LOSS" - The participant lost the match.
1032 # - "MATCH_RESULT_TIE" - The participant tied the match.
1033 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
1034 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
1035 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
1036 },
1037 ],
1038 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
1039 "applicationId": "A String", # The ID of the application being played.
1040 "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.
1041 # Possible values are:
1042 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
1043 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
1044 # - "USER_TURN" - The user has an action to take in the match.
1045 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
1046 "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.
1047 }</pre>
1048</div>
1049
1050<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001051 <code class="details" id="leaveTurn">leaveTurn(matchId, matchVersion, language=None, pendingParticipantId=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04001052 <pre>Leave a turn-based match during the current player's turn, without canceling the match.
1053
1054Args:
1055 matchId: string, The ID of the match. (required)
1056 matchVersion: integer, The version of the match being updated. (required)
1057 language: string, The preferred language to use for strings returned by this method.
1058 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.
1059
1060Returns:
1061 An object of the form:
1062
1063 { # This is a JSON template for a turn-based match resource object.
1064 "status": "A String", # The status of the match.
1065 # Possible values are:
1066 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
1067 # - "MATCH_ACTIVE" - The match has started.
1068 # - "MATCH_COMPLETE" - The match has finished.
1069 # - "MATCH_CANCELED" - The match was canceled.
1070 # - "MATCH_EXPIRED" - The match expired due to inactivity.
1071 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
1072 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
1073 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
1074 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
1075 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
1076 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
1077 "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.
1078 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
1079 },
1080 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
1081 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1082 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1083 "participantId": "A String", # The ID of the participant that modified the match.
1084 },
1085 "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.
1086 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
1087 "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.
1088 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1089 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1090 },
1091 "matchId": "A String", # Globally unique ID for a turn-based match.
1092 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
1093 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
1094 { # This is a JSON template for a participant in a turn-based match.
1095 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
1096 "status": "A String", # The status of the participant with respect to the match.
1097 # Possible values are:
1098 # - "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.
1099 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
1100 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
1101 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
1102 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
1103 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
1104 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
1105 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
1106 "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.)
1107 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
1108 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
1109 "displayName": "A String", # The name to display for the anonymous player.
1110 },
1111 "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 -08001112 "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 -04001113 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
1114 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -07001115 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
1116 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
1117 "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 -04001118 },
Craig Citro065b5302014-08-14 00:47:23 -07001119 "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 -04001120 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
1121 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
1122 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
1123 },
1124 "playerId": "A String", # The ID of the player.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001125 "bannerUrlPortrait": "A String", # The url to the portrait mode player banner image.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001126 "profileSettings": { # This is a JSON template for profile settings # The player's profile settings. Controls whether or not the player's profile is visible to other players.
Dan O'Mearadd494642020-05-01 07:42:23 -07001127 "friendsListVisibility": "A String", # Whether the player's friends list is visible to the game.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001128 "kind": "games#profileSettings", # Uniquely identifies the type of this resource. Value is always the fixed string games#profileSettings.
Dan O'Mearadd494642020-05-01 07:42:23 -07001129 "profileVisible": True or False,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001130 },
Craig Citro065b5302014-08-14 00:47:23 -07001131 "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.
1132 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
1133 "currentExperiencePoints": "A String", # The current number of experience points for the player.
1134 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
1135 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
1136 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1137 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1138 "minExperiencePoints": "A String", # The minimum experience points for this level.
1139 "level": 42, # The level for the user.
1140 },
1141 "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.
1142 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1143 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1144 "minExperiencePoints": "A String", # The minimum experience points for this level.
1145 "level": 42, # The level for the user.
1146 },
1147 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001148 "friendStatus": "A String", # The friend status of the given player, relative to the requester. This is unset if the player is not sharing their friends list with the game.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001149 "bannerUrlLandscape": "A String", # The url to the landscape mode player banner image.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001150 "title": "A String", # The player's title rewarded for their game activities.
John Asmuth614db982014-04-24 15:46:26 -04001151 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
1152 },
1153 "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.
1154 },
1155 ],
1156 "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.
1157 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
1158 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
1159 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1160 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1161 "participantId": "A String", # The ID of the participant that modified the match.
1162 },
1163 "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.
1164 "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.
1165 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1166 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1167 },
1168 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
1169 "results": [ # The results reported for this match.
1170 { # This is a JSON template for a result for a match participant.
1171 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
1172 "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.
1173 "participantId": "A String", # The ID of the participant.
1174 "result": "A String", # The result of the participant for this match.
1175 # Possible values are:
1176 # - "MATCH_RESULT_WIN" - The participant won the match.
1177 # - "MATCH_RESULT_LOSS" - The participant lost the match.
1178 # - "MATCH_RESULT_TIE" - The participant tied the match.
1179 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
1180 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
1181 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
1182 },
1183 ],
1184 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
1185 "applicationId": "A String", # The ID of the application being played.
1186 "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.
1187 # Possible values are:
1188 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
1189 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
1190 # - "USER_TURN" - The user has an action to take in the match.
1191 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
1192 "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.
1193 }</pre>
1194</div>
1195
1196<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001197 <code class="details" id="list">list(maxCompletedMatches=None, language=None, pageToken=None, maxResults=None, includeMatchData=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04001198 <pre>Returns turn-based matches the player is or was involved in.
1199
1200Args:
1201 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.
1202 language: string, The preferred language to use for strings returned by this method.
1203 pageToken: string, The token returned by the previous request.
1204 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.
1205 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.
1206
1207Returns:
1208 An object of the form:
1209
1210 { # This is a JSON template for a list of turn-based matches.
1211 "nextPageToken": "A String", # The pagination token for the next page of results.
1212 "items": [ # The matches.
1213 { # This is a JSON template for a turn-based match resource object.
1214 "status": "A String", # The status of the match.
1215 # Possible values are:
1216 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
1217 # - "MATCH_ACTIVE" - The match has started.
1218 # - "MATCH_COMPLETE" - The match has finished.
1219 # - "MATCH_CANCELED" - The match was canceled.
1220 # - "MATCH_EXPIRED" - The match expired due to inactivity.
1221 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
1222 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
1223 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
1224 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
1225 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
1226 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
1227 "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.
1228 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
1229 },
1230 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
1231 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1232 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1233 "participantId": "A String", # The ID of the participant that modified the match.
1234 },
1235 "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.
1236 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
1237 "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.
1238 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1239 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1240 },
1241 "matchId": "A String", # Globally unique ID for a turn-based match.
1242 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
1243 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
1244 { # This is a JSON template for a participant in a turn-based match.
1245 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
1246 "status": "A String", # The status of the participant with respect to the match.
1247 # Possible values are:
1248 # - "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.
1249 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
1250 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
1251 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
1252 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
1253 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
1254 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
1255 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
1256 "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.)
1257 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
1258 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
1259 "displayName": "A String", # The name to display for the anonymous player.
1260 },
1261 "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 -08001262 "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 -04001263 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
1264 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -07001265 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
1266 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
1267 "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 -04001268 },
Craig Citro065b5302014-08-14 00:47:23 -07001269 "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 -04001270 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
1271 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
1272 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
1273 },
1274 "playerId": "A String", # The ID of the player.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001275 "bannerUrlPortrait": "A String", # The url to the portrait mode player banner image.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001276 "profileSettings": { # This is a JSON template for profile settings # The player's profile settings. Controls whether or not the player's profile is visible to other players.
Dan O'Mearadd494642020-05-01 07:42:23 -07001277 "friendsListVisibility": "A String", # Whether the player's friends list is visible to the game.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001278 "kind": "games#profileSettings", # Uniquely identifies the type of this resource. Value is always the fixed string games#profileSettings.
Dan O'Mearadd494642020-05-01 07:42:23 -07001279 "profileVisible": True or False,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001280 },
Craig Citro065b5302014-08-14 00:47:23 -07001281 "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.
1282 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
1283 "currentExperiencePoints": "A String", # The current number of experience points for the player.
1284 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
1285 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
1286 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1287 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1288 "minExperiencePoints": "A String", # The minimum experience points for this level.
1289 "level": 42, # The level for the user.
1290 },
1291 "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.
1292 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1293 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1294 "minExperiencePoints": "A String", # The minimum experience points for this level.
1295 "level": 42, # The level for the user.
1296 },
1297 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001298 "friendStatus": "A String", # The friend status of the given player, relative to the requester. This is unset if the player is not sharing their friends list with the game.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001299 "bannerUrlLandscape": "A String", # The url to the landscape mode player banner image.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001300 "title": "A String", # The player's title rewarded for their game activities.
John Asmuth614db982014-04-24 15:46:26 -04001301 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
1302 },
1303 "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.
1304 },
1305 ],
1306 "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.
1307 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
1308 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
1309 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1310 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1311 "participantId": "A String", # The ID of the participant that modified the match.
1312 },
1313 "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.
1314 "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.
1315 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1316 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1317 },
1318 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
1319 "results": [ # The results reported for this match.
1320 { # This is a JSON template for a result for a match participant.
1321 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
1322 "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.
1323 "participantId": "A String", # The ID of the participant.
1324 "result": "A String", # The result of the participant for this match.
1325 # Possible values are:
1326 # - "MATCH_RESULT_WIN" - The participant won the match.
1327 # - "MATCH_RESULT_LOSS" - The participant lost the match.
1328 # - "MATCH_RESULT_TIE" - The participant tied the match.
1329 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
1330 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
1331 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
1332 },
1333 ],
1334 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
1335 "applicationId": "A String", # The ID of the application being played.
1336 "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.
1337 # Possible values are:
1338 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
1339 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
1340 # - "USER_TURN" - The user has an action to take in the match.
1341 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
1342 "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.
1343 },
1344 ],
1345 "kind": "games#turnBasedMatchList", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchList.
1346 }</pre>
1347</div>
1348
1349<div class="method">
1350 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1351 <pre>Retrieves the next page of results.
1352
1353Args:
1354 previous_request: The request for the previous page. (required)
1355 previous_response: The response from the request for the previous page. (required)
1356
1357Returns:
1358 A request object that you can call 'execute()' on to request the next
1359 page. Returns None if there are no more items in the collection.
1360 </pre>
1361</div>
1362
1363<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001364 <code class="details" id="rematch">rematch(matchId, language=None, requestId=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04001365 <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.
1366
1367Args:
1368 matchId: string, The ID of the match. (required)
1369 language: string, The preferred language to use for strings returned by this method.
1370 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.
1371
1372Returns:
1373 An object of the form:
1374
1375 { # This is a JSON template for a rematch response.
1376 "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.
1377 "status": "A String", # The status of the match.
1378 # Possible values are:
1379 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
1380 # - "MATCH_ACTIVE" - The match has started.
1381 # - "MATCH_COMPLETE" - The match has finished.
1382 # - "MATCH_CANCELED" - The match was canceled.
1383 # - "MATCH_EXPIRED" - The match expired due to inactivity.
1384 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
1385 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
1386 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
1387 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
1388 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
1389 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
1390 "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.
1391 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
1392 },
1393 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
1394 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1395 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1396 "participantId": "A String", # The ID of the participant that modified the match.
1397 },
1398 "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.
1399 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
1400 "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.
1401 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1402 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1403 },
1404 "matchId": "A String", # Globally unique ID for a turn-based match.
1405 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
1406 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
1407 { # This is a JSON template for a participant in a turn-based match.
1408 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
1409 "status": "A String", # The status of the participant with respect to the match.
1410 # Possible values are:
1411 # - "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.
1412 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
1413 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
1414 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
1415 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
1416 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
1417 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
1418 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
1419 "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.)
1420 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
1421 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
1422 "displayName": "A String", # The name to display for the anonymous player.
1423 },
1424 "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 -08001425 "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 -04001426 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
1427 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -07001428 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
1429 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
1430 "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 -04001431 },
Craig Citro065b5302014-08-14 00:47:23 -07001432 "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 -04001433 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
1434 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
1435 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
1436 },
1437 "playerId": "A String", # The ID of the player.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001438 "bannerUrlPortrait": "A String", # The url to the portrait mode player banner image.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001439 "profileSettings": { # This is a JSON template for profile settings # The player's profile settings. Controls whether or not the player's profile is visible to other players.
Dan O'Mearadd494642020-05-01 07:42:23 -07001440 "friendsListVisibility": "A String", # Whether the player's friends list is visible to the game.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001441 "kind": "games#profileSettings", # Uniquely identifies the type of this resource. Value is always the fixed string games#profileSettings.
Dan O'Mearadd494642020-05-01 07:42:23 -07001442 "profileVisible": True or False,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001443 },
Craig Citro065b5302014-08-14 00:47:23 -07001444 "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.
1445 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
1446 "currentExperiencePoints": "A String", # The current number of experience points for the player.
1447 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
1448 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
1449 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1450 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1451 "minExperiencePoints": "A String", # The minimum experience points for this level.
1452 "level": 42, # The level for the user.
1453 },
1454 "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.
1455 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1456 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1457 "minExperiencePoints": "A String", # The minimum experience points for this level.
1458 "level": 42, # The level for the user.
1459 },
1460 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001461 "friendStatus": "A String", # The friend status of the given player, relative to the requester. This is unset if the player is not sharing their friends list with the game.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001462 "bannerUrlLandscape": "A String", # The url to the landscape mode player banner image.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001463 "title": "A String", # The player's title rewarded for their game activities.
John Asmuth614db982014-04-24 15:46:26 -04001464 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
1465 },
1466 "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.
1467 },
1468 ],
1469 "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.
1470 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
1471 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
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 "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.
1477 "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.
1478 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1479 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1480 },
1481 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
1482 "results": [ # The results reported for this match.
1483 { # This is a JSON template for a result for a match participant.
1484 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
1485 "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.
1486 "participantId": "A String", # The ID of the participant.
1487 "result": "A String", # The result of the participant for this match.
1488 # Possible values are:
1489 # - "MATCH_RESULT_WIN" - The participant won the match.
1490 # - "MATCH_RESULT_LOSS" - The participant lost the match.
1491 # - "MATCH_RESULT_TIE" - The participant tied the match.
1492 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
1493 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
1494 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
1495 },
1496 ],
1497 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
1498 "applicationId": "A String", # The ID of the application being played.
1499 "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.
1500 # Possible values are:
1501 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
1502 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
1503 # - "USER_TURN" - The user has an action to take in the match.
1504 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
1505 "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.
1506 },
1507 "kind": "games#turnBasedMatchRematch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchRematch.
1508 "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.
1509 "status": "A String", # The status of the match.
1510 # Possible values are:
1511 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
1512 # - "MATCH_ACTIVE" - The match has started.
1513 # - "MATCH_COMPLETE" - The match has finished.
1514 # - "MATCH_CANCELED" - The match was canceled.
1515 # - "MATCH_EXPIRED" - The match expired due to inactivity.
1516 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
1517 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
1518 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
1519 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
1520 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
1521 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
1522 "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.
1523 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
1524 },
1525 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
1526 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1527 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1528 "participantId": "A String", # The ID of the participant that modified the match.
1529 },
1530 "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.
1531 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
1532 "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.
1533 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1534 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1535 },
1536 "matchId": "A String", # Globally unique ID for a turn-based match.
1537 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
1538 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
1539 { # This is a JSON template for a participant in a turn-based match.
1540 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
1541 "status": "A String", # The status of the participant with respect to the match.
1542 # Possible values are:
1543 # - "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.
1544 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
1545 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
1546 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
1547 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
1548 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
1549 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
1550 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
1551 "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.)
1552 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
1553 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
1554 "displayName": "A String", # The name to display for the anonymous player.
1555 },
1556 "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 -08001557 "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 -04001558 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
1559 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -07001560 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
1561 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
1562 "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 -04001563 },
Craig Citro065b5302014-08-14 00:47:23 -07001564 "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 -04001565 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
1566 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
1567 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
1568 },
1569 "playerId": "A String", # The ID of the player.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001570 "bannerUrlPortrait": "A String", # The url to the portrait mode player banner image.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001571 "profileSettings": { # This is a JSON template for profile settings # The player's profile settings. Controls whether or not the player's profile is visible to other players.
Dan O'Mearadd494642020-05-01 07:42:23 -07001572 "friendsListVisibility": "A String", # Whether the player's friends list is visible to the game.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001573 "kind": "games#profileSettings", # Uniquely identifies the type of this resource. Value is always the fixed string games#profileSettings.
Dan O'Mearadd494642020-05-01 07:42:23 -07001574 "profileVisible": True or False,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001575 },
Craig Citro065b5302014-08-14 00:47:23 -07001576 "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.
1577 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
1578 "currentExperiencePoints": "A String", # The current number of experience points for the player.
1579 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
1580 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
1581 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1582 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1583 "minExperiencePoints": "A String", # The minimum experience points for this level.
1584 "level": 42, # The level for the user.
1585 },
1586 "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.
1587 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1588 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1589 "minExperiencePoints": "A String", # The minimum experience points for this level.
1590 "level": 42, # The level for the user.
1591 },
1592 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001593 "friendStatus": "A String", # The friend status of the given player, relative to the requester. This is unset if the player is not sharing their friends list with the game.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001594 "bannerUrlLandscape": "A String", # The url to the landscape mode player banner image.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001595 "title": "A String", # The player's title rewarded for their game activities.
John Asmuth614db982014-04-24 15:46:26 -04001596 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
1597 },
1598 "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.
1599 },
1600 ],
1601 "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.
1602 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
1603 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
1604 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1605 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1606 "participantId": "A String", # The ID of the participant that modified the match.
1607 },
1608 "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.
1609 "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.
1610 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1611 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1612 },
1613 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
1614 "results": [ # The results reported for this match.
1615 { # This is a JSON template for a result for a match participant.
1616 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
1617 "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.
1618 "participantId": "A String", # The ID of the participant.
1619 "result": "A String", # The result of the participant for this match.
1620 # Possible values are:
1621 # - "MATCH_RESULT_WIN" - The participant won the match.
1622 # - "MATCH_RESULT_LOSS" - The participant lost the match.
1623 # - "MATCH_RESULT_TIE" - The participant tied the match.
1624 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
1625 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
1626 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
1627 },
1628 ],
1629 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
1630 "applicationId": "A String", # The ID of the application being played.
1631 "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.
1632 # Possible values are:
1633 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
1634 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
1635 # - "USER_TURN" - The user has an action to take in the match.
1636 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
1637 "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.
1638 },
1639 }</pre>
1640</div>
1641
1642<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001643 <code class="details" id="sync">sync(maxCompletedMatches=None, language=None, pageToken=None, maxResults=None, includeMatchData=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04001644 <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.
1645
1646Args:
1647 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.
1648 language: string, The preferred language to use for strings returned by this method.
1649 pageToken: string, The token returned by the previous request.
1650 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.
1651 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.
1652
1653Returns:
1654 An object of the form:
1655
1656 { # This is a JSON template for a list of turn-based matches returned from a sync.
1657 "nextPageToken": "A String", # The pagination token for the next page of results.
1658 "items": [ # The matches.
1659 { # This is a JSON template for a turn-based match resource object.
1660 "status": "A String", # The status of the match.
1661 # Possible values are:
1662 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
1663 # - "MATCH_ACTIVE" - The match has started.
1664 # - "MATCH_COMPLETE" - The match has finished.
1665 # - "MATCH_CANCELED" - The match was canceled.
1666 # - "MATCH_EXPIRED" - The match expired due to inactivity.
1667 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
1668 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
1669 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
1670 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
1671 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
1672 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
1673 "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.
1674 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
1675 },
1676 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
1677 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1678 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1679 "participantId": "A String", # The ID of the participant that modified the match.
1680 },
1681 "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.
1682 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
1683 "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.
1684 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1685 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1686 },
1687 "matchId": "A String", # Globally unique ID for a turn-based match.
1688 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
1689 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
1690 { # This is a JSON template for a participant in a turn-based match.
1691 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
1692 "status": "A String", # The status of the participant with respect to the match.
1693 # Possible values are:
1694 # - "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.
1695 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
1696 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
1697 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
1698 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
1699 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
1700 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
1701 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
1702 "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.)
1703 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
1704 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
1705 "displayName": "A String", # The name to display for the anonymous player.
1706 },
1707 "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 -08001708 "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 -04001709 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
1710 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -07001711 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
1712 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
1713 "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 -04001714 },
Craig Citro065b5302014-08-14 00:47:23 -07001715 "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 -04001716 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
1717 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
1718 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
1719 },
1720 "playerId": "A String", # The ID of the player.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001721 "bannerUrlPortrait": "A String", # The url to the portrait mode player banner image.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001722 "profileSettings": { # This is a JSON template for profile settings # The player's profile settings. Controls whether or not the player's profile is visible to other players.
Dan O'Mearadd494642020-05-01 07:42:23 -07001723 "friendsListVisibility": "A String", # Whether the player's friends list is visible to the game.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001724 "kind": "games#profileSettings", # Uniquely identifies the type of this resource. Value is always the fixed string games#profileSettings.
Dan O'Mearadd494642020-05-01 07:42:23 -07001725 "profileVisible": True or False,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001726 },
Craig Citro065b5302014-08-14 00:47:23 -07001727 "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.
1728 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
1729 "currentExperiencePoints": "A String", # The current number of experience points for the player.
1730 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
1731 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
1732 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1733 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1734 "minExperiencePoints": "A String", # The minimum experience points for this level.
1735 "level": 42, # The level for the user.
1736 },
1737 "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.
1738 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1739 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1740 "minExperiencePoints": "A String", # The minimum experience points for this level.
1741 "level": 42, # The level for the user.
1742 },
1743 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001744 "friendStatus": "A String", # The friend status of the given player, relative to the requester. This is unset if the player is not sharing their friends list with the game.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001745 "bannerUrlLandscape": "A String", # The url to the landscape mode player banner image.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001746 "title": "A String", # The player's title rewarded for their game activities.
John Asmuth614db982014-04-24 15:46:26 -04001747 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
1748 },
1749 "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.
1750 },
1751 ],
1752 "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.
1753 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
1754 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
1755 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1756 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1757 "participantId": "A String", # The ID of the participant that modified the match.
1758 },
1759 "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.
1760 "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.
1761 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1762 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1763 },
1764 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
1765 "results": [ # The results reported for this match.
1766 { # This is a JSON template for a result for a match participant.
1767 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
1768 "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.
1769 "participantId": "A String", # The ID of the participant.
1770 "result": "A String", # The result of the participant for this match.
1771 # Possible values are:
1772 # - "MATCH_RESULT_WIN" - The participant won the match.
1773 # - "MATCH_RESULT_LOSS" - The participant lost the match.
1774 # - "MATCH_RESULT_TIE" - The participant tied the match.
1775 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
1776 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
1777 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
1778 },
1779 ],
1780 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
1781 "applicationId": "A String", # The ID of the application being played.
1782 "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.
1783 # Possible values are:
1784 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
1785 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
1786 # - "USER_TURN" - The user has an action to take in the match.
1787 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
1788 "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.
1789 },
1790 ],
1791 "kind": "games#turnBasedMatchSync", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchSync.
1792 "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.)
1793 }</pre>
1794</div>
1795
1796<div class="method">
1797 <code class="details" id="sync_next">sync_next(previous_request, previous_response)</code>
1798 <pre>Retrieves the next page of results.
1799
1800Args:
1801 previous_request: The request for the previous page. (required)
1802 previous_response: The response from the request for the previous page. (required)
1803
1804Returns:
1805 A request object that you can call 'execute()' on to request the next
1806 page. Returns None if there are no more items in the collection.
1807 </pre>
1808</div>
1809
1810<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001811 <code class="details" id="takeTurn">takeTurn(matchId, body=None, language=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04001812 <pre>Commit the results of a player turn.
1813
1814Args:
1815 matchId: string, The ID of the match. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001816 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -04001817 The object takes the form of:
1818
1819{ # This is a JSON template for the object representing a turn.
1820 "kind": "games#turnBasedMatchTurn", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchTurn.
1821 "results": [ # The match results for the participants in the match.
1822 { # This is a JSON template for a result for a match participant.
1823 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
1824 "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.
1825 "participantId": "A String", # The ID of the participant.
1826 "result": "A String", # The result of the participant for this match.
1827 # Possible values are:
1828 # - "MATCH_RESULT_WIN" - The participant won the match.
1829 # - "MATCH_RESULT_LOSS" - The participant lost the match.
1830 # - "MATCH_RESULT_TIE" - The participant tied the match.
1831 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
1832 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
1833 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
1834 },
1835 ],
1836 "data": { # This is a JSON template for sending a turn-based match data object. # The shared game state data after the turn is over.
1837 "kind": "games#turnBasedMatchDataRequest", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchDataRequest.
1838 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1839 },
1840 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
1841 "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.
1842 }
1843
1844 language: string, The preferred language to use for strings returned by this method.
1845
1846Returns:
1847 An object of the form:
1848
1849 { # This is a JSON template for a turn-based match resource object.
1850 "status": "A String", # The status of the match.
1851 # Possible values are:
1852 # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; the match cannot be established until they are filled.
1853 # - "MATCH_ACTIVE" - The match has started.
1854 # - "MATCH_COMPLETE" - The match has finished.
1855 # - "MATCH_CANCELED" - The match was canceled.
1856 # - "MATCH_EXPIRED" - The match expired due to inactivity.
1857 # - "MATCH_DELETED" - The match should no longer be shown on the client. Returned only for tombstones for matches when sync is called.
1858 "withParticipantId": "A String", # The ID of another participant in the match that can be used when describing the participants the user is playing with.
1859 "kind": "games#turnBasedMatch", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatch.
1860 "autoMatchingCriteria": { # This is a JSON template for an turn-based auto-match criteria object. # Criteria for auto-matching players into this match.
1861 "kind": "games#turnBasedAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedAutoMatchingCriteria.
1862 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the match by auto-matching.
1863 "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.
1864 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the match by auto-matching.
1865 },
1866 "creationDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the match creation.
1867 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1868 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1869 "participantId": "A String", # The ID of the participant that modified the match.
1870 },
1871 "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.
1872 "data": { # This is a JSON template for a turn-based match data object. # The data / game state for this match.
1873 "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.
1874 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1875 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1876 },
1877 "matchId": "A String", # Globally unique ID for a turn-based match.
1878 "matchVersion": 42, # The version of this match: an increasing counter, used to avoid out-of-date updates to the match.
1879 "participants": [ # The participants involved in the match, along with their statuses. Includes participants who have left or declined invitations.
1880 { # This is a JSON template for a participant in a turn-based match.
1881 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
1882 "status": "A String", # The status of the participant with respect to the match.
1883 # Possible values are:
1884 # - "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.
1885 # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, but has not yet responded.
1886 # - "PARTICIPANT_JOINED" - The participant has joined the match (either after creating it or accepting an invitation.)
1887 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the match.
1888 # - "PARTICIPANT_LEFT" - The participant joined the match and then left it.
1889 # - "PARTICIPANT_FINISHED" - The participant finished playing in the match.
1890 # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the allotted time.
1891 "kind": "games#turnBasedMatchParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchParticipant.
1892 "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.)
1893 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
1894 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
1895 "displayName": "A String", # The name to display for the anonymous player.
1896 },
1897 "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 -08001898 "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 -04001899 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
1900 "displayName": "A String", # The name to display for the player.
Craig Citro065b5302014-08-14 00:47:23 -07001901 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present.
1902 "givenName": "A String", # The given name of this player. In some places, this is known as the first name.
1903 "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 -04001904 },
Craig Citro065b5302014-08-14 00:47:23 -07001905 "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 -04001906 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
1907 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
1908 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
1909 },
1910 "playerId": "A String", # The ID of the player.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001911 "bannerUrlPortrait": "A String", # The url to the portrait mode player banner image.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001912 "profileSettings": { # This is a JSON template for profile settings # The player's profile settings. Controls whether or not the player's profile is visible to other players.
Dan O'Mearadd494642020-05-01 07:42:23 -07001913 "friendsListVisibility": "A String", # Whether the player's friends list is visible to the game.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001914 "kind": "games#profileSettings", # Uniquely identifies the type of this resource. Value is always the fixed string games#profileSettings.
Dan O'Mearadd494642020-05-01 07:42:23 -07001915 "profileVisible": True or False,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001916 },
Craig Citro065b5302014-08-14 00:47:23 -07001917 "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.
1918 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC.
1919 "currentExperiencePoints": "A String", # The current number of experience points for the player.
1920 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo.
1921 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player.
1922 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1923 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1924 "minExperiencePoints": "A String", # The minimum experience points for this level.
1925 "level": 42, # The level for the user.
1926 },
1927 "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.
1928 "maxExperiencePoints": "A String", # The maximum experience points for this level.
1929 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel.
1930 "minExperiencePoints": "A String", # The minimum experience points for this level.
1931 "level": 42, # The level for the user.
1932 },
1933 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001934 "friendStatus": "A String", # The friend status of the given player, relative to the requester. This is unset if the player is not sharing their friends list with the game.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001935 "bannerUrlLandscape": "A String", # The url to the landscape mode player banner image.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001936 "title": "A String", # The player's title rewarded for their game activities.
John Asmuth614db982014-04-24 15:46:26 -04001937 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
1938 },
1939 "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.
1940 },
1941 ],
1942 "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.
1943 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
1944 "lastUpdateDetails": { # This is a JSON template for turn-based match modification metadata. # Details about the last update to the match.
1945 "kind": "games#turnBasedMatchModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchModification.
1946 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the match, in milliseconds since the epoch in UTC.
1947 "participantId": "A String", # The ID of the participant that modified the match.
1948 },
1949 "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.
1950 "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.
1951 "kind": "games#turnBasedMatchData", # Uniquely identifies the type of this resource. Value is always the fixed string games#turnBasedMatchData.
1952 "data": "A String", # The byte representation of the data (limited to 128 kB), as a Base64-encoded string with the URL_SAFE encoding option.
1953 },
1954 "rematchId": "A String", # The ID of a rematch of this match. Only set for completed matches that have been rematched.
1955 "results": [ # The results reported for this match.
1956 { # This is a JSON template for a result for a match participant.
1957 "kind": "games#participantResult", # Uniquely identifies the type of this resource. Value is always the fixed string games#participantResult.
1958 "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.
1959 "participantId": "A String", # The ID of the participant.
1960 "result": "A String", # The result of the participant for this match.
1961 # Possible values are:
1962 # - "MATCH_RESULT_WIN" - The participant won the match.
1963 # - "MATCH_RESULT_LOSS" - The participant lost the match.
1964 # - "MATCH_RESULT_TIE" - The participant tied the match.
1965 # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
1966 # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
1967 # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant.
1968 },
1969 ],
1970 "pendingParticipantId": "A String", # The ID of the participant that is taking a turn.
1971 "applicationId": "A String", # The ID of the application being played.
1972 "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.
1973 # Possible values are:
1974 # - "USER_INVITED" - The user has been invited to join the match and has not responded yet.
1975 # - "USER_AWAITING_TURN" - The user is waiting for their turn.
1976 # - "USER_TURN" - The user has an action to take in the match.
1977 # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or expired.)
1978 "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.
1979 }</pre>
1980</div>
1981
1982</body></html>