blob: 510bc9a9c39bb529012bbe2bc675fe4f6fa86024 [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.rooms.html">rooms</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#create">create(body, language=None)</a></code></p>
79<p class="firstline">Create a room. For internal use by the Games SDK only. Calling this method directly is unsupported.</p>
80<p class="toc_element">
81 <code><a href="#decline">decline(roomId, language=None)</a></code></p>
82<p class="firstline">Decline an invitation to join a room. For internal use by the Games SDK only. Calling this method directly is unsupported.</p>
83<p class="toc_element">
84 <code><a href="#dismiss">dismiss(roomId)</a></code></p>
85<p class="firstline">Dismiss an invitation to join a room. For internal use by the Games SDK only. Calling this method directly is unsupported.</p>
86<p class="toc_element">
87 <code><a href="#get">get(roomId, language=None)</a></code></p>
88<p class="firstline">Get the data for a room.</p>
89<p class="toc_element">
90 <code><a href="#join">join(roomId, body, language=None)</a></code></p>
91<p class="firstline">Join a room. For internal use by the Games SDK only. Calling this method directly is unsupported.</p>
92<p class="toc_element">
93 <code><a href="#leave">leave(roomId, body, language=None)</a></code></p>
94<p class="firstline">Leave a room. For internal use by the Games SDK only. Calling this method directly is unsupported.</p>
95<p class="toc_element">
96 <code><a href="#list">list(pageToken=None, language=None, maxResults=None)</a></code></p>
97<p class="firstline">Returns invitations to join rooms.</p>
98<p class="toc_element">
99 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
100<p class="firstline">Retrieves the next page of results.</p>
101<p class="toc_element">
102 <code><a href="#reportStatus">reportStatus(roomId, body, language=None)</a></code></p>
103<p class="firstline">Updates sent by a client reporting the status of peers in a room. For internal use by the Games SDK only. Calling this method directly is unsupported.</p>
104<h3>Method Details</h3>
105<div class="method">
106 <code class="details" id="create">create(body, language=None)</code>
107 <pre>Create a room. For internal use by the Games SDK only. Calling this method directly is unsupported.
108
109Args:
110 body: object, The request body. (required)
111 The object takes the form of:
112
113{ # This is a JSON template for a room creation request.
114 "kind": "games#roomCreateRequest", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomCreateRequest.
115 "autoMatchingCriteria": { # This is a JSON template for a room auto-match criteria object. # Criteria for auto-matching players into this room.
116 "kind": "games#roomAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomAutoMatchingCriteria.
117 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the room by auto-matching.
118 "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.
119 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the room by auto-matching.
120 },
121 "invitedPlayerIds": [ # The player IDs to invite to the room.
122 "A String",
123 ],
124 "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.
125 "capabilities": [ # The capabilities that this client supports for realtime communication.
126 "A String",
127 ],
128 "networkDiagnostics": { # This is a JSON template for network diagnostics reported for a client. # Network diagnostics for the client creating the room.
129 "registrationLatencyMillis": 42, # The amount of time in milliseconds it took for the client to establish a connection with the XMPP server.
130 "iosNetworkType": 42, # iOS network type as defined in Reachability.h.
131 "kind": "games#networkDiagnostics", # Uniquely identifies the type of this resource. Value is always the fixed string games#networkDiagnostics.
132 "androidNetworkSubtype": 42, # The Android network subtype.
133 "androidNetworkType": 42, # The Android network type.
134 },
135 "clientAddress": { # This is a JSON template for the client address when setting up a room. # Client address for the player creating the room.
136 "kind": "games#roomClientAddress", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomClientAddress.
137 "xmppAddress": "A String", # The XMPP address of the client on the Google Games XMPP network.
138 },
139 "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.
140 }
141
142 language: string, The preferred language to use for strings returned by this method.
143
144Returns:
145 An object of the form:
146
147 { # This is a JSON template for a room resource object.
148 "status": "A String", # The status of the room.
149 # Possible values are:
150 # - "ROOM_INVITING" - One or more players have been invited and not responded.
151 # - "ROOM_AUTO_MATCHING" - One or more slots need to be filled by auto-matching.
152 # - "ROOM_CONNECTING" - Players have joined and are connecting to each other (either before or after auto-matching).
153 # - "ROOM_ACTIVE" - All players have joined and connected to each other.
154 # - "ROOM_DELETED" - The room should no longer be shown on the client. Returned in sync calls when a player joins a room (as a tombstone), or for rooms where all joined participants have left.
155 "kind": "games#room", # Uniquely identifies the type of this resource. Value is always the fixed string games#room.
156 "autoMatchingCriteria": { # This is a JSON template for a room auto-match criteria object. # Criteria for auto-matching players into this room.
157 "kind": "games#roomAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomAutoMatchingCriteria.
158 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the room by auto-matching.
159 "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.
160 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the room by auto-matching.
161 },
162 "creationDetails": { # This is a JSON template for room modification metadata. # Details about the room creation.
163 "kind": "games#roomModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomModification.
164 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the room, in milliseconds since the epoch in UTC.
165 "participantId": "A String", # The ID of the participant that modified the room.
166 },
167 "description": "A String", # This short description is generated by our servers and worded relative to the player requesting the room. It is intended to be displayed when the room is shown in a list (that is, an invitation to a room.)
168 "roomId": "A String", # Globally unique ID for a room.
169 "autoMatchingStatus": { # This is a JSON template for status of room automatching that is in progress. # Auto-matching status for this room. Not set if the room is not currently in the auto-matching queue.
170 "kind": "games#roomAutoMatchStatus", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomAutoMatchStatus.
171 "waitEstimateSeconds": 42, # An estimate for the amount of time (in seconds) that auto-matching is expected to take to complete.
172 },
173 "participants": [ # The participants involved in the room, along with their statuses. Includes participants who have left or declined invitations.
174 { # This is a JSON template for a participant in a room.
175 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
176 "status": "A String", # The status of the participant with respect to the room.
177 # Possible values are:
178 # - "PARTICIPANT_INVITED" - The participant has been invited to join the room, but has not yet responded.
179 # - "PARTICIPANT_JOINED" - The participant has joined the room (either after creating it or accepting an invitation.)
180 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the room.
181 # - "PARTICIPANT_LEFT" - The participant joined the room and then left it.
182 "kind": "games#roomParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomParticipant.
183 "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.)
184 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
185 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
186 "displayName": "A String", # The name to display for the anonymous player.
187 },
188 "leaveReason": "A String", # The reason the participant left the room; populated if the participant status is PARTICIPANT_LEFT.
189 # Possible values are:
190 # - "PLAYER_LEFT" - The player explicitly chose to leave the room.
191 # - "GAME_LEFT" - The game chose to remove the player from the room.
192 # - "ABANDONED" - The player switched to another application and abandoned the room.
193 # - "PEER_CONNECTION_FAILURE" - The client was unable to establish or maintain a connection to other peer(s) in the room.
194 # - "SERVER_ERROR" - The client received an error response when it tried to communicate with the server.
195 # - "TIMEOUT" - The client timed out while waiting for players to join and connect.
196 # - "PRESENCE_FAILURE" - The client's XMPP connection ended abruptly.
197 "capabilities": [ # The capabilities which can be used when communicating with this participant.
198 "A String",
199 ],
200 "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.)
201 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
202 "displayName": "A String", # The name to display for the player.
203 "name": { # An object representation of the individual components of the player's name.
204 "givenName": "A String", # The given name (first name) of this player.
205 "familyName": "A String", # The family name (last name) of this player.
206 },
207 "lastPlayedWith": { # This is a JSON template for 3P metadata about a player playing a game. # Details about the last time this player played a multiplayer game with the currently authenticated player. Populated for PLAYED_WITH player collection members.
208 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
209 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
210 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
211 },
212 "playerId": "A String", # The ID of the player.
213 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
214 },
215 "clientAddress": { # This is a JSON template for the client address when setting up a room. # Client address for the participant.
216 "kind": "games#roomClientAddress", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomClientAddress.
217 "xmppAddress": "A String", # The XMPP address of the client on the Google Games XMPP network.
218 },
219 "connected": True or False, # True if this participant is in the fully connected set of peers in the room.
220 "id": "A String", # An identifier for the participant in the scope of the room. Cannot be used to identify a player across rooms or in other contexts.
221 },
222 ],
223 "roomStatusVersion": 42, # The version of the room status: an increasing counter, used by the client to ignore out-of-order updates to room status.
224 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
225 "lastUpdateDetails": { # This is a JSON template for room modification metadata. # Details about the last update to the room.
226 "kind": "games#roomModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomModification.
227 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the room, in milliseconds since the epoch in UTC.
228 "participantId": "A String", # The ID of the participant that modified the room.
229 },
230 "applicationId": "A String", # The ID of the application being played.
231 "inviterId": "A String", # The ID of the participant that invited the user to the room. Not set if the user was not invited to the room.
232 }</pre>
233</div>
234
235<div class="method">
236 <code class="details" id="decline">decline(roomId, language=None)</code>
237 <pre>Decline an invitation to join a room. For internal use by the Games SDK only. Calling this method directly is unsupported.
238
239Args:
240 roomId: string, The ID of the room. (required)
241 language: string, The preferred language to use for strings returned by this method.
242
243Returns:
244 An object of the form:
245
246 { # This is a JSON template for a room resource object.
247 "status": "A String", # The status of the room.
248 # Possible values are:
249 # - "ROOM_INVITING" - One or more players have been invited and not responded.
250 # - "ROOM_AUTO_MATCHING" - One or more slots need to be filled by auto-matching.
251 # - "ROOM_CONNECTING" - Players have joined and are connecting to each other (either before or after auto-matching).
252 # - "ROOM_ACTIVE" - All players have joined and connected to each other.
253 # - "ROOM_DELETED" - The room should no longer be shown on the client. Returned in sync calls when a player joins a room (as a tombstone), or for rooms where all joined participants have left.
254 "kind": "games#room", # Uniquely identifies the type of this resource. Value is always the fixed string games#room.
255 "autoMatchingCriteria": { # This is a JSON template for a room auto-match criteria object. # Criteria for auto-matching players into this room.
256 "kind": "games#roomAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomAutoMatchingCriteria.
257 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the room by auto-matching.
258 "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.
259 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the room by auto-matching.
260 },
261 "creationDetails": { # This is a JSON template for room modification metadata. # Details about the room creation.
262 "kind": "games#roomModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomModification.
263 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the room, in milliseconds since the epoch in UTC.
264 "participantId": "A String", # The ID of the participant that modified the room.
265 },
266 "description": "A String", # This short description is generated by our servers and worded relative to the player requesting the room. It is intended to be displayed when the room is shown in a list (that is, an invitation to a room.)
267 "roomId": "A String", # Globally unique ID for a room.
268 "autoMatchingStatus": { # This is a JSON template for status of room automatching that is in progress. # Auto-matching status for this room. Not set if the room is not currently in the auto-matching queue.
269 "kind": "games#roomAutoMatchStatus", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomAutoMatchStatus.
270 "waitEstimateSeconds": 42, # An estimate for the amount of time (in seconds) that auto-matching is expected to take to complete.
271 },
272 "participants": [ # The participants involved in the room, along with their statuses. Includes participants who have left or declined invitations.
273 { # This is a JSON template for a participant in a room.
274 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
275 "status": "A String", # The status of the participant with respect to the room.
276 # Possible values are:
277 # - "PARTICIPANT_INVITED" - The participant has been invited to join the room, but has not yet responded.
278 # - "PARTICIPANT_JOINED" - The participant has joined the room (either after creating it or accepting an invitation.)
279 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the room.
280 # - "PARTICIPANT_LEFT" - The participant joined the room and then left it.
281 "kind": "games#roomParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomParticipant.
282 "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.)
283 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
284 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
285 "displayName": "A String", # The name to display for the anonymous player.
286 },
287 "leaveReason": "A String", # The reason the participant left the room; populated if the participant status is PARTICIPANT_LEFT.
288 # Possible values are:
289 # - "PLAYER_LEFT" - The player explicitly chose to leave the room.
290 # - "GAME_LEFT" - The game chose to remove the player from the room.
291 # - "ABANDONED" - The player switched to another application and abandoned the room.
292 # - "PEER_CONNECTION_FAILURE" - The client was unable to establish or maintain a connection to other peer(s) in the room.
293 # - "SERVER_ERROR" - The client received an error response when it tried to communicate with the server.
294 # - "TIMEOUT" - The client timed out while waiting for players to join and connect.
295 # - "PRESENCE_FAILURE" - The client's XMPP connection ended abruptly.
296 "capabilities": [ # The capabilities which can be used when communicating with this participant.
297 "A String",
298 ],
299 "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.)
300 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
301 "displayName": "A String", # The name to display for the player.
302 "name": { # An object representation of the individual components of the player's name.
303 "givenName": "A String", # The given name (first name) of this player.
304 "familyName": "A String", # The family name (last name) of this player.
305 },
306 "lastPlayedWith": { # This is a JSON template for 3P metadata about a player playing a game. # Details about the last time this player played a multiplayer game with the currently authenticated player. Populated for PLAYED_WITH player collection members.
307 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
308 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
309 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
310 },
311 "playerId": "A String", # The ID of the player.
312 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
313 },
314 "clientAddress": { # This is a JSON template for the client address when setting up a room. # Client address for the participant.
315 "kind": "games#roomClientAddress", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomClientAddress.
316 "xmppAddress": "A String", # The XMPP address of the client on the Google Games XMPP network.
317 },
318 "connected": True or False, # True if this participant is in the fully connected set of peers in the room.
319 "id": "A String", # An identifier for the participant in the scope of the room. Cannot be used to identify a player across rooms or in other contexts.
320 },
321 ],
322 "roomStatusVersion": 42, # The version of the room status: an increasing counter, used by the client to ignore out-of-order updates to room status.
323 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
324 "lastUpdateDetails": { # This is a JSON template for room modification metadata. # Details about the last update to the room.
325 "kind": "games#roomModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomModification.
326 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the room, in milliseconds since the epoch in UTC.
327 "participantId": "A String", # The ID of the participant that modified the room.
328 },
329 "applicationId": "A String", # The ID of the application being played.
330 "inviterId": "A String", # The ID of the participant that invited the user to the room. Not set if the user was not invited to the room.
331 }</pre>
332</div>
333
334<div class="method">
335 <code class="details" id="dismiss">dismiss(roomId)</code>
336 <pre>Dismiss an invitation to join a room. For internal use by the Games SDK only. Calling this method directly is unsupported.
337
338Args:
339 roomId: string, The ID of the room. (required)
340</pre>
341</div>
342
343<div class="method">
344 <code class="details" id="get">get(roomId, language=None)</code>
345 <pre>Get the data for a room.
346
347Args:
348 roomId: string, The ID of the room. (required)
349 language: string, The preferred language to use for strings returned by this method.
350
351Returns:
352 An object of the form:
353
354 { # This is a JSON template for a room resource object.
355 "status": "A String", # The status of the room.
356 # Possible values are:
357 # - "ROOM_INVITING" - One or more players have been invited and not responded.
358 # - "ROOM_AUTO_MATCHING" - One or more slots need to be filled by auto-matching.
359 # - "ROOM_CONNECTING" - Players have joined and are connecting to each other (either before or after auto-matching).
360 # - "ROOM_ACTIVE" - All players have joined and connected to each other.
361 # - "ROOM_DELETED" - The room should no longer be shown on the client. Returned in sync calls when a player joins a room (as a tombstone), or for rooms where all joined participants have left.
362 "kind": "games#room", # Uniquely identifies the type of this resource. Value is always the fixed string games#room.
363 "autoMatchingCriteria": { # This is a JSON template for a room auto-match criteria object. # Criteria for auto-matching players into this room.
364 "kind": "games#roomAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomAutoMatchingCriteria.
365 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the room by auto-matching.
366 "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.
367 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the room by auto-matching.
368 },
369 "creationDetails": { # This is a JSON template for room modification metadata. # Details about the room creation.
370 "kind": "games#roomModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomModification.
371 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the room, in milliseconds since the epoch in UTC.
372 "participantId": "A String", # The ID of the participant that modified the room.
373 },
374 "description": "A String", # This short description is generated by our servers and worded relative to the player requesting the room. It is intended to be displayed when the room is shown in a list (that is, an invitation to a room.)
375 "roomId": "A String", # Globally unique ID for a room.
376 "autoMatchingStatus": { # This is a JSON template for status of room automatching that is in progress. # Auto-matching status for this room. Not set if the room is not currently in the auto-matching queue.
377 "kind": "games#roomAutoMatchStatus", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomAutoMatchStatus.
378 "waitEstimateSeconds": 42, # An estimate for the amount of time (in seconds) that auto-matching is expected to take to complete.
379 },
380 "participants": [ # The participants involved in the room, along with their statuses. Includes participants who have left or declined invitations.
381 { # This is a JSON template for a participant in a room.
382 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
383 "status": "A String", # The status of the participant with respect to the room.
384 # Possible values are:
385 # - "PARTICIPANT_INVITED" - The participant has been invited to join the room, but has not yet responded.
386 # - "PARTICIPANT_JOINED" - The participant has joined the room (either after creating it or accepting an invitation.)
387 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the room.
388 # - "PARTICIPANT_LEFT" - The participant joined the room and then left it.
389 "kind": "games#roomParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomParticipant.
390 "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.)
391 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
392 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
393 "displayName": "A String", # The name to display for the anonymous player.
394 },
395 "leaveReason": "A String", # The reason the participant left the room; populated if the participant status is PARTICIPANT_LEFT.
396 # Possible values are:
397 # - "PLAYER_LEFT" - The player explicitly chose to leave the room.
398 # - "GAME_LEFT" - The game chose to remove the player from the room.
399 # - "ABANDONED" - The player switched to another application and abandoned the room.
400 # - "PEER_CONNECTION_FAILURE" - The client was unable to establish or maintain a connection to other peer(s) in the room.
401 # - "SERVER_ERROR" - The client received an error response when it tried to communicate with the server.
402 # - "TIMEOUT" - The client timed out while waiting for players to join and connect.
403 # - "PRESENCE_FAILURE" - The client's XMPP connection ended abruptly.
404 "capabilities": [ # The capabilities which can be used when communicating with this participant.
405 "A String",
406 ],
407 "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.)
408 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
409 "displayName": "A String", # The name to display for the player.
410 "name": { # An object representation of the individual components of the player's name.
411 "givenName": "A String", # The given name (first name) of this player.
412 "familyName": "A String", # The family name (last name) of this player.
413 },
414 "lastPlayedWith": { # This is a JSON template for 3P metadata about a player playing a game. # Details about the last time this player played a multiplayer game with the currently authenticated player. Populated for PLAYED_WITH player collection members.
415 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
416 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
417 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
418 },
419 "playerId": "A String", # The ID of the player.
420 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
421 },
422 "clientAddress": { # This is a JSON template for the client address when setting up a room. # Client address for the participant.
423 "kind": "games#roomClientAddress", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomClientAddress.
424 "xmppAddress": "A String", # The XMPP address of the client on the Google Games XMPP network.
425 },
426 "connected": True or False, # True if this participant is in the fully connected set of peers in the room.
427 "id": "A String", # An identifier for the participant in the scope of the room. Cannot be used to identify a player across rooms or in other contexts.
428 },
429 ],
430 "roomStatusVersion": 42, # The version of the room status: an increasing counter, used by the client to ignore out-of-order updates to room status.
431 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
432 "lastUpdateDetails": { # This is a JSON template for room modification metadata. # Details about the last update to the room.
433 "kind": "games#roomModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomModification.
434 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the room, in milliseconds since the epoch in UTC.
435 "participantId": "A String", # The ID of the participant that modified the room.
436 },
437 "applicationId": "A String", # The ID of the application being played.
438 "inviterId": "A String", # The ID of the participant that invited the user to the room. Not set if the user was not invited to the room.
439 }</pre>
440</div>
441
442<div class="method">
443 <code class="details" id="join">join(roomId, body, language=None)</code>
444 <pre>Join a room. For internal use by the Games SDK only. Calling this method directly is unsupported.
445
446Args:
447 roomId: string, The ID of the room. (required)
448 body: object, The request body. (required)
449 The object takes the form of:
450
451{ # This is a JSON template for a join room request.
452 "networkDiagnostics": { # This is a JSON template for network diagnostics reported for a client. # Network diagnostics for the client joining the room.
453 "registrationLatencyMillis": 42, # The amount of time in milliseconds it took for the client to establish a connection with the XMPP server.
454 "iosNetworkType": 42, # iOS network type as defined in Reachability.h.
455 "kind": "games#networkDiagnostics", # Uniquely identifies the type of this resource. Value is always the fixed string games#networkDiagnostics.
456 "androidNetworkSubtype": 42, # The Android network subtype.
457 "androidNetworkType": 42, # The Android network type.
458 },
459 "clientAddress": { # This is a JSON template for the client address when setting up a room. # Client address for the player joining the room.
460 "kind": "games#roomClientAddress", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomClientAddress.
461 "xmppAddress": "A String", # The XMPP address of the client on the Google Games XMPP network.
462 },
463 "kind": "games#roomJoinRequest", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomJoinRequest.
464 "capabilities": [ # The capabilities that this client supports for realtime communication.
465 "A String",
466 ],
467 }
468
469 language: string, The preferred language to use for strings returned by this method.
470
471Returns:
472 An object of the form:
473
474 { # This is a JSON template for a room resource object.
475 "status": "A String", # The status of the room.
476 # Possible values are:
477 # - "ROOM_INVITING" - One or more players have been invited and not responded.
478 # - "ROOM_AUTO_MATCHING" - One or more slots need to be filled by auto-matching.
479 # - "ROOM_CONNECTING" - Players have joined and are connecting to each other (either before or after auto-matching).
480 # - "ROOM_ACTIVE" - All players have joined and connected to each other.
481 # - "ROOM_DELETED" - The room should no longer be shown on the client. Returned in sync calls when a player joins a room (as a tombstone), or for rooms where all joined participants have left.
482 "kind": "games#room", # Uniquely identifies the type of this resource. Value is always the fixed string games#room.
483 "autoMatchingCriteria": { # This is a JSON template for a room auto-match criteria object. # Criteria for auto-matching players into this room.
484 "kind": "games#roomAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomAutoMatchingCriteria.
485 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the room by auto-matching.
486 "exclusiveBitmask": "A String", # A bitmask indicating when auto-matches are valid. When ANDed with other exclusive bitmasks, the result must be zero. Can be used to support exclusive roles within a game.
487 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the room by auto-matching.
488 },
489 "creationDetails": { # This is a JSON template for room modification metadata. # Details about the room creation.
490 "kind": "games#roomModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomModification.
491 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the room, in milliseconds since the epoch in UTC.
492 "participantId": "A String", # The ID of the participant that modified the room.
493 },
494 "description": "A String", # This short description is generated by our servers and worded relative to the player requesting the room. It is intended to be displayed when the room is shown in a list (that is, an invitation to a room.)
495 "roomId": "A String", # Globally unique ID for a room.
496 "autoMatchingStatus": { # This is a JSON template for status of room automatching that is in progress. # Auto-matching status for this room. Not set if the room is not currently in the auto-matching queue.
497 "kind": "games#roomAutoMatchStatus", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomAutoMatchStatus.
498 "waitEstimateSeconds": 42, # An estimate for the amount of time (in seconds) that auto-matching is expected to take to complete.
499 },
500 "participants": [ # The participants involved in the room, along with their statuses. Includes participants who have left or declined invitations.
501 { # This is a JSON template for a participant in a room.
502 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
503 "status": "A String", # The status of the participant with respect to the room.
504 # Possible values are:
505 # - "PARTICIPANT_INVITED" - The participant has been invited to join the room, but has not yet responded.
506 # - "PARTICIPANT_JOINED" - The participant has joined the room (either after creating it or accepting an invitation.)
507 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the room.
508 # - "PARTICIPANT_LEFT" - The participant joined the room and then left it.
509 "kind": "games#roomParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomParticipant.
510 "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.)
511 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
512 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
513 "displayName": "A String", # The name to display for the anonymous player.
514 },
515 "leaveReason": "A String", # The reason the participant left the room; populated if the participant status is PARTICIPANT_LEFT.
516 # Possible values are:
517 # - "PLAYER_LEFT" - The player explicitly chose to leave the room.
518 # - "GAME_LEFT" - The game chose to remove the player from the room.
519 # - "ABANDONED" - The player switched to another application and abandoned the room.
520 # - "PEER_CONNECTION_FAILURE" - The client was unable to establish or maintain a connection to other peer(s) in the room.
521 # - "SERVER_ERROR" - The client received an error response when it tried to communicate with the server.
522 # - "TIMEOUT" - The client timed out while waiting for players to join and connect.
523 # - "PRESENCE_FAILURE" - The client's XMPP connection ended abruptly.
524 "capabilities": [ # The capabilities which can be used when communicating with this participant.
525 "A String",
526 ],
527 "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.)
528 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
529 "displayName": "A String", # The name to display for the player.
530 "name": { # An object representation of the individual components of the player's name.
531 "givenName": "A String", # The given name (first name) of this player.
532 "familyName": "A String", # The family name (last name) of this player.
533 },
534 "lastPlayedWith": { # This is a JSON template for 3P metadata about a player playing a game. # Details about the last time this player played a multiplayer game with the currently authenticated player. Populated for PLAYED_WITH player collection members.
535 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
536 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
537 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
538 },
539 "playerId": "A String", # The ID of the player.
540 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
541 },
542 "clientAddress": { # This is a JSON template for the client address when setting up a room. # Client address for the participant.
543 "kind": "games#roomClientAddress", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomClientAddress.
544 "xmppAddress": "A String", # The XMPP address of the client on the Google Games XMPP network.
545 },
546 "connected": True or False, # True if this participant is in the fully connected set of peers in the room.
547 "id": "A String", # An identifier for the participant in the scope of the room. Cannot be used to identify a player across rooms or in other contexts.
548 },
549 ],
550 "roomStatusVersion": 42, # The version of the room status: an increasing counter, used by the client to ignore out-of-order updates to room status.
551 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
552 "lastUpdateDetails": { # This is a JSON template for room modification metadata. # Details about the last update to the room.
553 "kind": "games#roomModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomModification.
554 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the room, in milliseconds since the epoch in UTC.
555 "participantId": "A String", # The ID of the participant that modified the room.
556 },
557 "applicationId": "A String", # The ID of the application being played.
558 "inviterId": "A String", # The ID of the participant that invited the user to the room. Not set if the user was not invited to the room.
559 }</pre>
560</div>
561
562<div class="method">
563 <code class="details" id="leave">leave(roomId, body, language=None)</code>
564 <pre>Leave a room. For internal use by the Games SDK only. Calling this method directly is unsupported.
565
566Args:
567 roomId: string, The ID of the room. (required)
568 body: object, The request body. (required)
569 The object takes the form of:
570
571{ # This is a JSON template for a leave room request.
572 "kind": "games#roomLeaveRequest", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomLeaveRequest.
573 "reason": "A String", # Reason for leaving the match.
574 # Possible values are:
575 # - "PLAYER_LEFT" - The player chose to leave the room..
576 # - "GAME_LEFT" - The game chose to remove the player from the room.
577 # - "REALTIME_ABANDONED" - The player switched to another application and abandoned the room.
578 # - "REALTIME_PEER_CONNECTION_FAILURE" - The client was unable to establish a connection to other peer(s).
579 # - "REALTIME_SERVER_CONNECTION_FAILURE" - The client was unable to communicate with the server.
580 # - "REALTIME_SERVER_ERROR" - The client received an error response when it tried to communicate with the server.
581 # - "REALTIME_TIMEOUT" - The client timed out while waiting for a room.
582 "leaveDiagnostics": { # This is a JSON template for room leave diagnostics. # Diagnostics for a player leaving the room.
583 "kind": "games#roomLeaveDiagnostics", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomLeaveDiagnostics.
584 "socketsUsed": True or False, # Whether or not sockets were used.
585 "iosNetworkType": 42, # iOS network type as defined in Reachability.h.
586 "peerSession": [ # Diagnostics about all peer sessions.
587 { # This is a JSON template for peer session diagnostics.
588 "unreliableChannel": { # This is a JSON template for peer channel diagnostics. # Unreliable channel diagnostics.
589 "bytesReceived": { # This is a JSON template for aggregate stats. # Number of bytes received.
590 "count": "A String", # The number of messages sent between a pair of peers.
591 "max": "A String", # The maximum amount.
592 "kind": "games#aggregateStats", # Uniquely identifies the type of this resource. Value is always the fixed string games#aggregateStats.
593 "sum": "A String", # The total number of bytes sent for messages between a pair of peers.
594 "min": "A String", # The minimum amount.
595 },
596 "kind": "games#peerChannelDiagnostics", # Uniquely identifies the type of this resource. Value is always the fixed string games#peerChannelDiagnostics.
597 "bytesSent": { # This is a JSON template for aggregate stats. # Number of bytes sent.
598 "count": "A String", # The number of messages sent between a pair of peers.
599 "max": "A String", # The maximum amount.
600 "kind": "games#aggregateStats", # Uniquely identifies the type of this resource. Value is always the fixed string games#aggregateStats.
601 "sum": "A String", # The total number of bytes sent for messages between a pair of peers.
602 "min": "A String", # The minimum amount.
603 },
604 "numSendFailures": 42, # Number of send failures.
605 "numMessagesLost": 42, # Number of messages lost.
606 "numMessagesReceived": 42, # Number of messages received.
607 "numMessagesSent": 42, # Number of messages sent.
608 "roundtripLatencyMillis": { # This is a JSON template for aggregate stats. # Roundtrip latency stats in milliseconds.
609 "count": "A String", # The number of messages sent between a pair of peers.
610 "max": "A String", # The maximum amount.
611 "kind": "games#aggregateStats", # Uniquely identifies the type of this resource. Value is always the fixed string games#aggregateStats.
612 "sum": "A String", # The total number of bytes sent for messages between a pair of peers.
613 "min": "A String", # The minimum amount.
614 },
615 },
616 "kind": "games#peerSessionDiagnostics", # Uniquely identifies the type of this resource. Value is always the fixed string games#peerSessionDiagnostics.
617 "reliableChannel": { # This is a JSON template for peer channel diagnostics. # Reliable channel diagnostics.
618 "bytesReceived": { # This is a JSON template for aggregate stats. # Number of bytes received.
619 "count": "A String", # The number of messages sent between a pair of peers.
620 "max": "A String", # The maximum amount.
621 "kind": "games#aggregateStats", # Uniquely identifies the type of this resource. Value is always the fixed string games#aggregateStats.
622 "sum": "A String", # The total number of bytes sent for messages between a pair of peers.
623 "min": "A String", # The minimum amount.
624 },
625 "kind": "games#peerChannelDiagnostics", # Uniquely identifies the type of this resource. Value is always the fixed string games#peerChannelDiagnostics.
626 "bytesSent": { # This is a JSON template for aggregate stats. # Number of bytes sent.
627 "count": "A String", # The number of messages sent between a pair of peers.
628 "max": "A String", # The maximum amount.
629 "kind": "games#aggregateStats", # Uniquely identifies the type of this resource. Value is always the fixed string games#aggregateStats.
630 "sum": "A String", # The total number of bytes sent for messages between a pair of peers.
631 "min": "A String", # The minimum amount.
632 },
633 "numSendFailures": 42, # Number of send failures.
634 "numMessagesLost": 42, # Number of messages lost.
635 "numMessagesReceived": 42, # Number of messages received.
636 "numMessagesSent": 42, # Number of messages sent.
637 "roundtripLatencyMillis": { # This is a JSON template for aggregate stats. # Roundtrip latency stats in milliseconds.
638 "count": "A String", # The number of messages sent between a pair of peers.
639 "max": "A String", # The maximum amount.
640 "kind": "games#aggregateStats", # Uniquely identifies the type of this resource. Value is always the fixed string games#aggregateStats.
641 "sum": "A String", # The total number of bytes sent for messages between a pair of peers.
642 "min": "A String", # The minimum amount.
643 },
644 },
645 "connectedTimestampMillis": "A String", # Connected time in milliseconds.
646 "participantId": "A String", # The participant ID of the peer.
647 },
648 ],
649 "androidNetworkSubtype": 42, # Android network subtype. http://developer.android.com/reference/android/net/NetworkInfo.html#getSubtype()
650 "androidNetworkType": 42, # Android network type. http://developer.android.com/reference/android/net/NetworkInfo.html#getType()
651 },
652 }
653
654 language: string, The preferred language to use for strings returned by this method.
655
656Returns:
657 An object of the form:
658
659 { # This is a JSON template for a room resource object.
660 "status": "A String", # The status of the room.
661 # Possible values are:
662 # - "ROOM_INVITING" - One or more players have been invited and not responded.
663 # - "ROOM_AUTO_MATCHING" - One or more slots need to be filled by auto-matching.
664 # - "ROOM_CONNECTING" - Players have joined and are connecting to each other (either before or after auto-matching).
665 # - "ROOM_ACTIVE" - All players have joined and connected to each other.
666 # - "ROOM_DELETED" - The room should no longer be shown on the client. Returned in sync calls when a player joins a room (as a tombstone), or for rooms where all joined participants have left.
667 "kind": "games#room", # Uniquely identifies the type of this resource. Value is always the fixed string games#room.
668 "autoMatchingCriteria": { # This is a JSON template for a room auto-match criteria object. # Criteria for auto-matching players into this room.
669 "kind": "games#roomAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomAutoMatchingCriteria.
670 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the room by auto-matching.
671 "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.
672 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the room by auto-matching.
673 },
674 "creationDetails": { # This is a JSON template for room modification metadata. # Details about the room creation.
675 "kind": "games#roomModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomModification.
676 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the room, in milliseconds since the epoch in UTC.
677 "participantId": "A String", # The ID of the participant that modified the room.
678 },
679 "description": "A String", # This short description is generated by our servers and worded relative to the player requesting the room. It is intended to be displayed when the room is shown in a list (that is, an invitation to a room.)
680 "roomId": "A String", # Globally unique ID for a room.
681 "autoMatchingStatus": { # This is a JSON template for status of room automatching that is in progress. # Auto-matching status for this room. Not set if the room is not currently in the auto-matching queue.
682 "kind": "games#roomAutoMatchStatus", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomAutoMatchStatus.
683 "waitEstimateSeconds": 42, # An estimate for the amount of time (in seconds) that auto-matching is expected to take to complete.
684 },
685 "participants": [ # The participants involved in the room, along with their statuses. Includes participants who have left or declined invitations.
686 { # This is a JSON template for a participant in a room.
687 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
688 "status": "A String", # The status of the participant with respect to the room.
689 # Possible values are:
690 # - "PARTICIPANT_INVITED" - The participant has been invited to join the room, but has not yet responded.
691 # - "PARTICIPANT_JOINED" - The participant has joined the room (either after creating it or accepting an invitation.)
692 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the room.
693 # - "PARTICIPANT_LEFT" - The participant joined the room and then left it.
694 "kind": "games#roomParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomParticipant.
695 "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.)
696 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
697 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
698 "displayName": "A String", # The name to display for the anonymous player.
699 },
700 "leaveReason": "A String", # The reason the participant left the room; populated if the participant status is PARTICIPANT_LEFT.
701 # Possible values are:
702 # - "PLAYER_LEFT" - The player explicitly chose to leave the room.
703 # - "GAME_LEFT" - The game chose to remove the player from the room.
704 # - "ABANDONED" - The player switched to another application and abandoned the room.
705 # - "PEER_CONNECTION_FAILURE" - The client was unable to establish or maintain a connection to other peer(s) in the room.
706 # - "SERVER_ERROR" - The client received an error response when it tried to communicate with the server.
707 # - "TIMEOUT" - The client timed out while waiting for players to join and connect.
708 # - "PRESENCE_FAILURE" - The client's XMPP connection ended abruptly.
709 "capabilities": [ # The capabilities which can be used when communicating with this participant.
710 "A String",
711 ],
712 "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.)
713 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
714 "displayName": "A String", # The name to display for the player.
715 "name": { # An object representation of the individual components of the player's name.
716 "givenName": "A String", # The given name (first name) of this player.
717 "familyName": "A String", # The family name (last name) of this player.
718 },
719 "lastPlayedWith": { # This is a JSON template for 3P metadata about a player playing a game. # Details about the last time this player played a multiplayer game with the currently authenticated player. Populated for PLAYED_WITH player collection members.
720 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
721 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
722 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
723 },
724 "playerId": "A String", # The ID of the player.
725 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
726 },
727 "clientAddress": { # This is a JSON template for the client address when setting up a room. # Client address for the participant.
728 "kind": "games#roomClientAddress", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomClientAddress.
729 "xmppAddress": "A String", # The XMPP address of the client on the Google Games XMPP network.
730 },
731 "connected": True or False, # True if this participant is in the fully connected set of peers in the room.
732 "id": "A String", # An identifier for the participant in the scope of the room. Cannot be used to identify a player across rooms or in other contexts.
733 },
734 ],
735 "roomStatusVersion": 42, # The version of the room status: an increasing counter, used by the client to ignore out-of-order updates to room status.
736 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
737 "lastUpdateDetails": { # This is a JSON template for room modification metadata. # Details about the last update to the room.
738 "kind": "games#roomModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomModification.
739 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the room, in milliseconds since the epoch in UTC.
740 "participantId": "A String", # The ID of the participant that modified the room.
741 },
742 "applicationId": "A String", # The ID of the application being played.
743 "inviterId": "A String", # The ID of the participant that invited the user to the room. Not set if the user was not invited to the room.
744 }</pre>
745</div>
746
747<div class="method">
748 <code class="details" id="list">list(pageToken=None, language=None, maxResults=None)</code>
749 <pre>Returns invitations to join rooms.
750
751Args:
752 pageToken: string, The token returned by the previous request.
753 language: string, The preferred language to use for strings returned by this method.
754 maxResults: integer, The maximum number of rooms to return in the response, used for paging. For any response, the actual number of rooms to return may be less than the specified maxResults.
755
756Returns:
757 An object of the form:
758
759 { # This is a JSON template for a list of rooms.
760 "nextPageToken": "A String", # The pagination token for the next page of results.
761 "items": [ # The rooms.
762 { # This is a JSON template for a room resource object.
763 "status": "A String", # The status of the room.
764 # Possible values are:
765 # - "ROOM_INVITING" - One or more players have been invited and not responded.
766 # - "ROOM_AUTO_MATCHING" - One or more slots need to be filled by auto-matching.
767 # - "ROOM_CONNECTING" - Players have joined and are connecting to each other (either before or after auto-matching).
768 # - "ROOM_ACTIVE" - All players have joined and connected to each other.
769 # - "ROOM_DELETED" - The room should no longer be shown on the client. Returned in sync calls when a player joins a room (as a tombstone), or for rooms where all joined participants have left.
770 "kind": "games#room", # Uniquely identifies the type of this resource. Value is always the fixed string games#room.
771 "autoMatchingCriteria": { # This is a JSON template for a room auto-match criteria object. # Criteria for auto-matching players into this room.
772 "kind": "games#roomAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomAutoMatchingCriteria.
773 "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the room by auto-matching.
774 "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.
775 "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the room by auto-matching.
776 },
777 "creationDetails": { # This is a JSON template for room modification metadata. # Details about the room creation.
778 "kind": "games#roomModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomModification.
779 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the room, in milliseconds since the epoch in UTC.
780 "participantId": "A String", # The ID of the participant that modified the room.
781 },
782 "description": "A String", # This short description is generated by our servers and worded relative to the player requesting the room. It is intended to be displayed when the room is shown in a list (that is, an invitation to a room.)
783 "roomId": "A String", # Globally unique ID for a room.
784 "autoMatchingStatus": { # This is a JSON template for status of room automatching that is in progress. # Auto-matching status for this room. Not set if the room is not currently in the auto-matching queue.
785 "kind": "games#roomAutoMatchStatus", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomAutoMatchStatus.
786 "waitEstimateSeconds": 42, # An estimate for the amount of time (in seconds) that auto-matching is expected to take to complete.
787 },
788 "participants": [ # The participants involved in the room, along with their statuses. Includes participants who have left or declined invitations.
789 { # This is a JSON template for a participant in a room.
790 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
791 "status": "A String", # The status of the participant with respect to the room.
792 # Possible values are:
793 # - "PARTICIPANT_INVITED" - The participant has been invited to join the room, but has not yet responded.
794 # - "PARTICIPANT_JOINED" - The participant has joined the room (either after creating it or accepting an invitation.)
795 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the room.
796 # - "PARTICIPANT_LEFT" - The participant joined the room and then left it.
797 "kind": "games#roomParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomParticipant.
798 "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.)
799 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
800 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
801 "displayName": "A String", # The name to display for the anonymous player.
802 },
803 "leaveReason": "A String", # The reason the participant left the room; populated if the participant status is PARTICIPANT_LEFT.
804 # Possible values are:
805 # - "PLAYER_LEFT" - The player explicitly chose to leave the room.
806 # - "GAME_LEFT" - The game chose to remove the player from the room.
807 # - "ABANDONED" - The player switched to another application and abandoned the room.
808 # - "PEER_CONNECTION_FAILURE" - The client was unable to establish or maintain a connection to other peer(s) in the room.
809 # - "SERVER_ERROR" - The client received an error response when it tried to communicate with the server.
810 # - "TIMEOUT" - The client timed out while waiting for players to join and connect.
811 # - "PRESENCE_FAILURE" - The client's XMPP connection ended abruptly.
812 "capabilities": [ # The capabilities which can be used when communicating with this participant.
813 "A String",
814 ],
815 "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.)
816 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
817 "displayName": "A String", # The name to display for the player.
818 "name": { # An object representation of the individual components of the player's name.
819 "givenName": "A String", # The given name (first name) of this player.
820 "familyName": "A String", # The family name (last name) of this player.
821 },
822 "lastPlayedWith": { # This is a JSON template for 3P metadata about a player playing a game. # Details about the last time this player played a multiplayer game with the currently authenticated player. Populated for PLAYED_WITH player collection members.
823 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
824 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
825 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
826 },
827 "playerId": "A String", # The ID of the player.
828 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
829 },
830 "clientAddress": { # This is a JSON template for the client address when setting up a room. # Client address for the participant.
831 "kind": "games#roomClientAddress", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomClientAddress.
832 "xmppAddress": "A String", # The XMPP address of the client on the Google Games XMPP network.
833 },
834 "connected": True or False, # True if this participant is in the fully connected set of peers in the room.
835 "id": "A String", # An identifier for the participant in the scope of the room. Cannot be used to identify a player across rooms or in other contexts.
836 },
837 ],
838 "roomStatusVersion": 42, # The version of the room status: an increasing counter, used by the client to ignore out-of-order updates to room status.
839 "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank.
840 "lastUpdateDetails": { # This is a JSON template for room modification metadata. # Details about the last update to the room.
841 "kind": "games#roomModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomModification.
842 "modifiedTimestampMillis": "A String", # The timestamp at which they modified the room, in milliseconds since the epoch in UTC.
843 "participantId": "A String", # The ID of the participant that modified the room.
844 },
845 "applicationId": "A String", # The ID of the application being played.
846 "inviterId": "A String", # The ID of the participant that invited the user to the room. Not set if the user was not invited to the room.
847 },
848 ],
849 "kind": "games#roomList", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomList.
850 }</pre>
851</div>
852
853<div class="method">
854 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
855 <pre>Retrieves the next page of results.
856
857Args:
858 previous_request: The request for the previous page. (required)
859 previous_response: The response from the request for the previous page. (required)
860
861Returns:
862 A request object that you can call 'execute()' on to request the next
863 page. Returns None if there are no more items in the collection.
864 </pre>
865</div>
866
867<div class="method">
868 <code class="details" id="reportStatus">reportStatus(roomId, body, language=None)</code>
869 <pre>Updates sent by a client reporting the status of peers in a room. For internal use by the Games SDK only. Calling this method directly is unsupported.
870
871Args:
872 roomId: string, The ID of the room. (required)
873 body: object, The request body. (required)
874 The object takes the form of:
875
876{ # This is a JSON template for an update on the status of peers in a room.
877 "kind": "games#roomP2PStatuses", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomP2PStatuses.
878 "updates": [ # The updates for the peers.
879 { # This is a JSON template for an update on the status of a peer in a room.
880 "status": "A String", # The status of the peer in the room.
881 # Possible values are:
882 # - "CONNECTION_ESTABLISHED" - The client established a P2P connection with the peer.
883 # - "CONNECTION_FAILED" - The client failed to establish directed presence with the peer.
884 "kind": "games#roomP2PStatus", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomP2PStatus.
885 "participantId": "A String", # The ID of the participant.
886 "unreliableRoundtripLatencyMillis": 42, # The amount of time in milliseconds it took to send packets back and forth on the unreliable channel with this peer.
887 "connectionSetupLatencyMillis": 42, # The amount of time in milliseconds it took to establish connections with this peer.
888 "error": "A String", # The error code in event of a failure.
889 # Possible values are:
890 # - "P2P_FAILED" - The client failed to establish a P2P connection with the peer.
891 # - "PRESENCE_FAILED" - The client failed to register to receive P2P connections.
892 # - "RELAY_SERVER_FAILED" - The client received an error when trying to use the relay server to establish a P2P connection with the peer.
893 "error_reason": "A String", # More detailed diagnostic message returned in event of a failure.
894 },
895 ],
896 }
897
898 language: string, The preferred language to use for strings returned by this method.
899
900Returns:
901 An object of the form:
902
903 { # This is a JSON template for the status of a room that the player has joined.
904 "status": "A String", # The status of the room.
905 # Possible values are:
906 # - "ROOM_INVITING" - One or more players have been invited and not responded.
907 # - "ROOM_AUTO_MATCHING" - One or more slots need to be filled by auto-matching.
908 # - "ROOM_CONNECTING" - Players have joined are connecting to each other (either before or after auto-matching).
909 # - "ROOM_ACTIVE" - All players have joined and connected to each other.
910 # - "ROOM_DELETED" - All joined players have left.
911 "kind": "games#roomStatus", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomStatus.
912 "autoMatchingStatus": { # This is a JSON template for status of room automatching that is in progress. # Auto-matching status for this room. Not set if the room is not currently in the automatching queue.
913 "kind": "games#roomAutoMatchStatus", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomAutoMatchStatus.
914 "waitEstimateSeconds": 42, # An estimate for the amount of time (in seconds) that auto-matching is expected to take to complete.
915 },
916 "participants": [ # The participants involved in the room, along with their statuses. Includes participants who have left or declined invitations.
917 { # This is a JSON template for a participant in a room.
918 "autoMatched": True or False, # True if this participant was auto-matched with the requesting player.
919 "status": "A String", # The status of the participant with respect to the room.
920 # Possible values are:
921 # - "PARTICIPANT_INVITED" - The participant has been invited to join the room, but has not yet responded.
922 # - "PARTICIPANT_JOINED" - The participant has joined the room (either after creating it or accepting an invitation.)
923 # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the room.
924 # - "PARTICIPANT_LEFT" - The participant joined the room and then left it.
925 "kind": "games#roomParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomParticipant.
926 "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.)
927 "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer.
928 "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player.
929 "displayName": "A String", # The name to display for the anonymous player.
930 },
931 "leaveReason": "A String", # The reason the participant left the room; populated if the participant status is PARTICIPANT_LEFT.
932 # Possible values are:
933 # - "PLAYER_LEFT" - The player explicitly chose to leave the room.
934 # - "GAME_LEFT" - The game chose to remove the player from the room.
935 # - "ABANDONED" - The player switched to another application and abandoned the room.
936 # - "PEER_CONNECTION_FAILURE" - The client was unable to establish or maintain a connection to other peer(s) in the room.
937 # - "SERVER_ERROR" - The client received an error response when it tried to communicate with the server.
938 # - "TIMEOUT" - The client timed out while waiting for players to join and connect.
939 # - "PRESENCE_FAILURE" - The client's XMPP connection ended abruptly.
940 "capabilities": [ # The capabilities which can be used when communicating with this participant.
941 "A String",
942 ],
943 "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.)
944 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player.
945 "displayName": "A String", # The name to display for the player.
946 "name": { # An object representation of the individual components of the player's name.
947 "givenName": "A String", # The given name (first name) of this player.
948 "familyName": "A String", # The family name (last name) of this player.
949 },
950 "lastPlayedWith": { # This is a JSON template for 3P metadata about a player playing a game. # Details about the last time this player played a multiplayer game with the currently authenticated player. Populated for PLAYED_WITH player collection members.
951 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user.
952 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played.
953 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC.
954 },
955 "playerId": "A String", # The ID of the player.
956 "avatarImageUrl": "A String", # The base URL for the image that represents the player.
957 },
958 "clientAddress": { # This is a JSON template for the client address when setting up a room. # Client address for the participant.
959 "kind": "games#roomClientAddress", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomClientAddress.
960 "xmppAddress": "A String", # The XMPP address of the client on the Google Games XMPP network.
961 },
962 "connected": True or False, # True if this participant is in the fully connected set of peers in the room.
963 "id": "A String", # An identifier for the participant in the scope of the room. Cannot be used to identify a player across rooms or in other contexts.
964 },
965 ],
966 "statusVersion": 42, # The version of the status for the room: an increasing counter, used by the client to ignore out-of-order updates to room status.
967 "roomId": "A String", # Globally unique ID for a room.
968 }</pre>
969</div>
970
971</body></html>