Joe Gregorio | 37802c3 | 2013-08-06 12:24:05 -0400 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, 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 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, 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)</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)</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)</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)</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 | |
| 109 | Args: |
| 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 | "kind": "games#networkDiagnostics", # Uniquely identifies the type of this resource. Value is always the fixed string games#networkDiagnostics. |
| 131 | "androidNetworkSubtype": 42, # The Android network subtype. |
| 132 | "androidNetworkType": 42, # The Android network type. |
| 133 | }, |
| 134 | "clientAddress": { # This is a JSON template for the client address when setting up a room. # Client address for the player creating the room. |
| 135 | "kind": "games#roomClientAddress", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomClientAddress. |
| 136 | "xmppAddress": "A String", # The XMPP address of the client on the Google Games XMPP network. |
| 137 | }, |
| 138 | } |
| 139 | |
| 140 | language: string, The preferred language to use for strings returned by this method. |
| 141 | |
| 142 | Returns: |
| 143 | An object of the form: |
| 144 | |
| 145 | { # This is a JSON template for a room resource object. |
| 146 | "status": "A String", # The status of the room. |
| 147 | # Possible values are: |
| 148 | # - "ROOM_INVITING" - One or more players have been invited and not responded. |
| 149 | # - "ROOM_AUTO_MATCHING" - One or more slots need to be filled by auto-matching. |
| 150 | # - "ROOM_CONNECTING" - Players have joined and are connecting to each other (either before or after auto-matching). |
| 151 | # - "ROOM_ACTIVE" - All players have joined and connected to each other. |
| 152 | # - "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. |
| 153 | "kind": "games#room", # Uniquely identifies the type of this resource. Value is always the fixed string games#room. |
| 154 | "autoMatchingCriteria": { # This is a JSON template for a room auto-match criteria object. # Criteria for auto-matching players into this room. |
| 155 | "kind": "games#roomAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomAutoMatchingCriteria. |
| 156 | "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the room by auto-matching. |
| 157 | "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. |
| 158 | "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the room by auto-matching. |
| 159 | }, |
| 160 | "creationDetails": { # This is a JSON template for room modification metadata. # Details about the room creation. |
| 161 | "kind": "games#roomModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomModification. |
| 162 | "modifiedTimestampMillis": "A String", # The timestamp at which they modified the room, in milliseconds since the epoch in UTC. |
| 163 | "participantId": "A String", # The ID of the participant that modified the room. |
| 164 | }, |
| 165 | "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.) |
| 166 | "roomId": "A String", # Globally unique ID for a room. |
| 167 | "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 status. |
| 168 | "kind": "games#roomAutoMatchStatus", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomAutoMatchStatus. |
| 169 | "waitEstimateSeconds": 42, # An estimate for the amount of time that automatching is expected to take to complete. |
| 170 | }, |
| 171 | "participants": [ # The participants involved in the room, along with their statuses. Includes participants who have left or declined invitations. |
| 172 | { # This is a JSON template for a participant in a room. |
| 173 | "status": "A String", # The status of the participant with respect to the room. |
| 174 | # Possible values are: |
| 175 | # - "PARTICIPANT_INVITED" - The participant has been invited to join the room, but has not yet responded. |
| 176 | # - "PARTICIPANT_JOINED" - The participant has joined the room (either after creating it or accepting an invitation.) |
| 177 | # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the room. |
| 178 | # - "PARTICIPANT_LEFT" - The participant joined the room and then left it. |
| 179 | "kind": "games#roomParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomParticipant. |
| 180 | "autoMatchedPlayer": { # This is a JSON template for an anonymous player # Information about a player that has been auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.) |
| 181 | "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer. |
| 182 | "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player. |
| 183 | "displayName": "A String", # The name to display for the anonymous player. |
| 184 | }, |
| 185 | "leaveReason": "A String", # The reason the participant left the room; populated if the participant status is PARTICIPANT_LEFT. |
| 186 | # Possible values are: |
| 187 | # - "PLAYER_LEFT" - The player explicitly chose to leave the room. |
| 188 | # - "GAME_LEFT" - The game chose to remove the player from the room. |
| 189 | # - "ABANDONED" - The player switched to another application and abandoned the room. |
| 190 | # - "PEER_CONNECTION_FAILURE" - The client was unable to establish or maintain a connection to other peer(s) in the room. |
| 191 | # - "SERVER_ERROR" - The client received an error response when it tried to communicate with the server. |
| 192 | # - "TIMEOUT" - The client timed out while waiting for players to join and connect. |
| 193 | # - "PRESENCE_FAILURE" - The client's XMPP connection ended abruptly. |
| 194 | "capabilities": [ # The capabilities which can be used when communicating with this participant. |
| 195 | "A String", |
| 196 | ], |
| 197 | "player": { # This is a JSON template for a Player resource. # Information about the player. Not populated if this player was auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.) |
| 198 | "playerId": "A String", # The ID of the player. |
| 199 | "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player. |
| 200 | "avatarImageUrl": "A String", # The base URL for the image that represents the player. |
| 201 | "displayName": "A String", # The name to display for the player. |
| 202 | }, |
| 203 | "clientAddress": { # This is a JSON template for the client address when setting up a room. # Client address for the participant. |
| 204 | "kind": "games#roomClientAddress", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomClientAddress. |
| 205 | "xmppAddress": "A String", # The XMPP address of the client on the Google Games XMPP network. |
| 206 | }, |
| 207 | "connected": True or False, # True if this participant is in the fully connected set of peers in the room. |
| 208 | "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. |
| 209 | }, |
| 210 | ], |
| 211 | "roomStatusVersion": 42, # The version of the room status: an increasing counter, used by the client to ignore out-of-order updates to room status. |
| 212 | "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank. |
| 213 | "lastUpdateDetails": { # This is a JSON template for room modification metadata. # Details about the last update to the room. |
| 214 | "kind": "games#roomModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomModification. |
| 215 | "modifiedTimestampMillis": "A String", # The timestamp at which they modified the room, in milliseconds since the epoch in UTC. |
| 216 | "participantId": "A String", # The ID of the participant that modified the room. |
| 217 | }, |
| 218 | "applicationId": "A String", # The ID of the application being played. |
| 219 | }</pre> |
| 220 | </div> |
| 221 | |
| 222 | <div class="method"> |
| 223 | <code class="details" id="decline">decline(roomId)</code> |
| 224 | <pre>Decline an invitation to join a room. For internal use by the Games SDK only. Calling this method directly is unsupported. |
| 225 | |
| 226 | Args: |
| 227 | roomId: string, The ID of the room. (required) |
| 228 | |
| 229 | Returns: |
| 230 | An object of the form: |
| 231 | |
| 232 | { # This is a JSON template for a room resource object. |
| 233 | "status": "A String", # The status of the room. |
| 234 | # Possible values are: |
| 235 | # - "ROOM_INVITING" - One or more players have been invited and not responded. |
| 236 | # - "ROOM_AUTO_MATCHING" - One or more slots need to be filled by auto-matching. |
| 237 | # - "ROOM_CONNECTING" - Players have joined and are connecting to each other (either before or after auto-matching). |
| 238 | # - "ROOM_ACTIVE" - All players have joined and connected to each other. |
| 239 | # - "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. |
| 240 | "kind": "games#room", # Uniquely identifies the type of this resource. Value is always the fixed string games#room. |
| 241 | "autoMatchingCriteria": { # This is a JSON template for a room auto-match criteria object. # Criteria for auto-matching players into this room. |
| 242 | "kind": "games#roomAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomAutoMatchingCriteria. |
| 243 | "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the room by auto-matching. |
| 244 | "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. |
| 245 | "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the room by auto-matching. |
| 246 | }, |
| 247 | "creationDetails": { # This is a JSON template for room modification metadata. # Details about the room creation. |
| 248 | "kind": "games#roomModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomModification. |
| 249 | "modifiedTimestampMillis": "A String", # The timestamp at which they modified the room, in milliseconds since the epoch in UTC. |
| 250 | "participantId": "A String", # The ID of the participant that modified the room. |
| 251 | }, |
| 252 | "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.) |
| 253 | "roomId": "A String", # Globally unique ID for a room. |
| 254 | "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 status. |
| 255 | "kind": "games#roomAutoMatchStatus", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomAutoMatchStatus. |
| 256 | "waitEstimateSeconds": 42, # An estimate for the amount of time that automatching is expected to take to complete. |
| 257 | }, |
| 258 | "participants": [ # The participants involved in the room, along with their statuses. Includes participants who have left or declined invitations. |
| 259 | { # This is a JSON template for a participant in a room. |
| 260 | "status": "A String", # The status of the participant with respect to the room. |
| 261 | # Possible values are: |
| 262 | # - "PARTICIPANT_INVITED" - The participant has been invited to join the room, but has not yet responded. |
| 263 | # - "PARTICIPANT_JOINED" - The participant has joined the room (either after creating it or accepting an invitation.) |
| 264 | # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the room. |
| 265 | # - "PARTICIPANT_LEFT" - The participant joined the room and then left it. |
| 266 | "kind": "games#roomParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomParticipant. |
| 267 | "autoMatchedPlayer": { # This is a JSON template for an anonymous player # Information about a player that has been auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.) |
| 268 | "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer. |
| 269 | "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player. |
| 270 | "displayName": "A String", # The name to display for the anonymous player. |
| 271 | }, |
| 272 | "leaveReason": "A String", # The reason the participant left the room; populated if the participant status is PARTICIPANT_LEFT. |
| 273 | # Possible values are: |
| 274 | # - "PLAYER_LEFT" - The player explicitly chose to leave the room. |
| 275 | # - "GAME_LEFT" - The game chose to remove the player from the room. |
| 276 | # - "ABANDONED" - The player switched to another application and abandoned the room. |
| 277 | # - "PEER_CONNECTION_FAILURE" - The client was unable to establish or maintain a connection to other peer(s) in the room. |
| 278 | # - "SERVER_ERROR" - The client received an error response when it tried to communicate with the server. |
| 279 | # - "TIMEOUT" - The client timed out while waiting for players to join and connect. |
| 280 | # - "PRESENCE_FAILURE" - The client's XMPP connection ended abruptly. |
| 281 | "capabilities": [ # The capabilities which can be used when communicating with this participant. |
| 282 | "A String", |
| 283 | ], |
| 284 | "player": { # This is a JSON template for a Player resource. # Information about the player. Not populated if this player was auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.) |
| 285 | "playerId": "A String", # The ID of the player. |
| 286 | "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player. |
| 287 | "avatarImageUrl": "A String", # The base URL for the image that represents the player. |
| 288 | "displayName": "A String", # The name to display for the player. |
| 289 | }, |
| 290 | "clientAddress": { # This is a JSON template for the client address when setting up a room. # Client address for the participant. |
| 291 | "kind": "games#roomClientAddress", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomClientAddress. |
| 292 | "xmppAddress": "A String", # The XMPP address of the client on the Google Games XMPP network. |
| 293 | }, |
| 294 | "connected": True or False, # True if this participant is in the fully connected set of peers in the room. |
| 295 | "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. |
| 296 | }, |
| 297 | ], |
| 298 | "roomStatusVersion": 42, # The version of the room status: an increasing counter, used by the client to ignore out-of-order updates to room status. |
| 299 | "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank. |
| 300 | "lastUpdateDetails": { # This is a JSON template for room modification metadata. # Details about the last update to the room. |
| 301 | "kind": "games#roomModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomModification. |
| 302 | "modifiedTimestampMillis": "A String", # The timestamp at which they modified the room, in milliseconds since the epoch in UTC. |
| 303 | "participantId": "A String", # The ID of the participant that modified the room. |
| 304 | }, |
| 305 | "applicationId": "A String", # The ID of the application being played. |
| 306 | }</pre> |
| 307 | </div> |
| 308 | |
| 309 | <div class="method"> |
| 310 | <code class="details" id="dismiss">dismiss(roomId)</code> |
| 311 | <pre>Dismiss an invitation to join a room. For internal use by the Games SDK only. Calling this method directly is unsupported. |
| 312 | |
| 313 | Args: |
| 314 | roomId: string, The ID of the room. (required) |
| 315 | </pre> |
| 316 | </div> |
| 317 | |
| 318 | <div class="method"> |
| 319 | <code class="details" id="get">get(roomId, language=None)</code> |
| 320 | <pre>Get the data for a room. |
| 321 | |
| 322 | Args: |
| 323 | roomId: string, The ID of the room. (required) |
| 324 | language: string, Specify the preferred language to use to format room info. |
| 325 | |
| 326 | Returns: |
| 327 | An object of the form: |
| 328 | |
| 329 | { # This is a JSON template for a room resource object. |
| 330 | "status": "A String", # The status of the room. |
| 331 | # Possible values are: |
| 332 | # - "ROOM_INVITING" - One or more players have been invited and not responded. |
| 333 | # - "ROOM_AUTO_MATCHING" - One or more slots need to be filled by auto-matching. |
| 334 | # - "ROOM_CONNECTING" - Players have joined and are connecting to each other (either before or after auto-matching). |
| 335 | # - "ROOM_ACTIVE" - All players have joined and connected to each other. |
| 336 | # - "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. |
| 337 | "kind": "games#room", # Uniquely identifies the type of this resource. Value is always the fixed string games#room. |
| 338 | "autoMatchingCriteria": { # This is a JSON template for a room auto-match criteria object. # Criteria for auto-matching players into this room. |
| 339 | "kind": "games#roomAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomAutoMatchingCriteria. |
| 340 | "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the room by auto-matching. |
| 341 | "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. |
| 342 | "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the room by auto-matching. |
| 343 | }, |
| 344 | "creationDetails": { # This is a JSON template for room modification metadata. # Details about the room creation. |
| 345 | "kind": "games#roomModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomModification. |
| 346 | "modifiedTimestampMillis": "A String", # The timestamp at which they modified the room, in milliseconds since the epoch in UTC. |
| 347 | "participantId": "A String", # The ID of the participant that modified the room. |
| 348 | }, |
| 349 | "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.) |
| 350 | "roomId": "A String", # Globally unique ID for a room. |
| 351 | "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 status. |
| 352 | "kind": "games#roomAutoMatchStatus", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomAutoMatchStatus. |
| 353 | "waitEstimateSeconds": 42, # An estimate for the amount of time that automatching is expected to take to complete. |
| 354 | }, |
| 355 | "participants": [ # The participants involved in the room, along with their statuses. Includes participants who have left or declined invitations. |
| 356 | { # This is a JSON template for a participant in a room. |
| 357 | "status": "A String", # The status of the participant with respect to the room. |
| 358 | # Possible values are: |
| 359 | # - "PARTICIPANT_INVITED" - The participant has been invited to join the room, but has not yet responded. |
| 360 | # - "PARTICIPANT_JOINED" - The participant has joined the room (either after creating it or accepting an invitation.) |
| 361 | # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the room. |
| 362 | # - "PARTICIPANT_LEFT" - The participant joined the room and then left it. |
| 363 | "kind": "games#roomParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomParticipant. |
| 364 | "autoMatchedPlayer": { # This is a JSON template for an anonymous player # Information about a player that has been auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.) |
| 365 | "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer. |
| 366 | "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player. |
| 367 | "displayName": "A String", # The name to display for the anonymous player. |
| 368 | }, |
| 369 | "leaveReason": "A String", # The reason the participant left the room; populated if the participant status is PARTICIPANT_LEFT. |
| 370 | # Possible values are: |
| 371 | # - "PLAYER_LEFT" - The player explicitly chose to leave the room. |
| 372 | # - "GAME_LEFT" - The game chose to remove the player from the room. |
| 373 | # - "ABANDONED" - The player switched to another application and abandoned the room. |
| 374 | # - "PEER_CONNECTION_FAILURE" - The client was unable to establish or maintain a connection to other peer(s) in the room. |
| 375 | # - "SERVER_ERROR" - The client received an error response when it tried to communicate with the server. |
| 376 | # - "TIMEOUT" - The client timed out while waiting for players to join and connect. |
| 377 | # - "PRESENCE_FAILURE" - The client's XMPP connection ended abruptly. |
| 378 | "capabilities": [ # The capabilities which can be used when communicating with this participant. |
| 379 | "A String", |
| 380 | ], |
| 381 | "player": { # This is a JSON template for a Player resource. # Information about the player. Not populated if this player was auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.) |
| 382 | "playerId": "A String", # The ID of the player. |
| 383 | "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player. |
| 384 | "avatarImageUrl": "A String", # The base URL for the image that represents the player. |
| 385 | "displayName": "A String", # The name to display for the player. |
| 386 | }, |
| 387 | "clientAddress": { # This is a JSON template for the client address when setting up a room. # Client address for the participant. |
| 388 | "kind": "games#roomClientAddress", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomClientAddress. |
| 389 | "xmppAddress": "A String", # The XMPP address of the client on the Google Games XMPP network. |
| 390 | }, |
| 391 | "connected": True or False, # True if this participant is in the fully connected set of peers in the room. |
| 392 | "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. |
| 393 | }, |
| 394 | ], |
| 395 | "roomStatusVersion": 42, # The version of the room status: an increasing counter, used by the client to ignore out-of-order updates to room status. |
| 396 | "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank. |
| 397 | "lastUpdateDetails": { # This is a JSON template for room modification metadata. # Details about the last update to the room. |
| 398 | "kind": "games#roomModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomModification. |
| 399 | "modifiedTimestampMillis": "A String", # The timestamp at which they modified the room, in milliseconds since the epoch in UTC. |
| 400 | "participantId": "A String", # The ID of the participant that modified the room. |
| 401 | }, |
| 402 | "applicationId": "A String", # The ID of the application being played. |
| 403 | }</pre> |
| 404 | </div> |
| 405 | |
| 406 | <div class="method"> |
| 407 | <code class="details" id="join">join(roomId, body)</code> |
| 408 | <pre>Join a room. For internal use by the Games SDK only. Calling this method directly is unsupported. |
| 409 | |
| 410 | Args: |
| 411 | roomId: string, The ID of the room. (required) |
| 412 | body: object, The request body. (required) |
| 413 | The object takes the form of: |
| 414 | |
| 415 | { # This is a JSON template for a join room request. |
| 416 | "networkDiagnostics": { # This is a JSON template for network diagnostics reported for a client. # Network diagnostics for the client joining the room. |
| 417 | "registrationLatencyMillis": 42, # The amount of time in milliseconds it took for the client to establish a connection with the XMPP server. |
| 418 | "kind": "games#networkDiagnostics", # Uniquely identifies the type of this resource. Value is always the fixed string games#networkDiagnostics. |
| 419 | "androidNetworkSubtype": 42, # The Android network subtype. |
| 420 | "androidNetworkType": 42, # The Android network type. |
| 421 | }, |
| 422 | "clientAddress": { # This is a JSON template for the client address when setting up a room. # Client address for the player joining the room. |
| 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 | "kind": "games#roomJoinRequest", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomJoinRequest. |
| 427 | "capabilities": [ # The capabilities that this client supports for realtime communication. |
| 428 | "A String", |
| 429 | ], |
| 430 | } |
| 431 | |
| 432 | |
| 433 | Returns: |
| 434 | An object of the form: |
| 435 | |
| 436 | { # This is a JSON template for a room resource object. |
| 437 | "status": "A String", # The status of the room. |
| 438 | # Possible values are: |
| 439 | # - "ROOM_INVITING" - One or more players have been invited and not responded. |
| 440 | # - "ROOM_AUTO_MATCHING" - One or more slots need to be filled by auto-matching. |
| 441 | # - "ROOM_CONNECTING" - Players have joined and are connecting to each other (either before or after auto-matching). |
| 442 | # - "ROOM_ACTIVE" - All players have joined and connected to each other. |
| 443 | # - "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. |
| 444 | "kind": "games#room", # Uniquely identifies the type of this resource. Value is always the fixed string games#room. |
| 445 | "autoMatchingCriteria": { # This is a JSON template for a room auto-match criteria object. # Criteria for auto-matching players into this room. |
| 446 | "kind": "games#roomAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomAutoMatchingCriteria. |
| 447 | "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the room by auto-matching. |
| 448 | "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. |
| 449 | "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the room by auto-matching. |
| 450 | }, |
| 451 | "creationDetails": { # This is a JSON template for room modification metadata. # Details about the room creation. |
| 452 | "kind": "games#roomModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomModification. |
| 453 | "modifiedTimestampMillis": "A String", # The timestamp at which they modified the room, in milliseconds since the epoch in UTC. |
| 454 | "participantId": "A String", # The ID of the participant that modified the room. |
| 455 | }, |
| 456 | "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.) |
| 457 | "roomId": "A String", # Globally unique ID for a room. |
| 458 | "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 status. |
| 459 | "kind": "games#roomAutoMatchStatus", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomAutoMatchStatus. |
| 460 | "waitEstimateSeconds": 42, # An estimate for the amount of time that automatching is expected to take to complete. |
| 461 | }, |
| 462 | "participants": [ # The participants involved in the room, along with their statuses. Includes participants who have left or declined invitations. |
| 463 | { # This is a JSON template for a participant in a room. |
| 464 | "status": "A String", # The status of the participant with respect to the room. |
| 465 | # Possible values are: |
| 466 | # - "PARTICIPANT_INVITED" - The participant has been invited to join the room, but has not yet responded. |
| 467 | # - "PARTICIPANT_JOINED" - The participant has joined the room (either after creating it or accepting an invitation.) |
| 468 | # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the room. |
| 469 | # - "PARTICIPANT_LEFT" - The participant joined the room and then left it. |
| 470 | "kind": "games#roomParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomParticipant. |
| 471 | "autoMatchedPlayer": { # This is a JSON template for an anonymous player # Information about a player that has been auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.) |
| 472 | "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer. |
| 473 | "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player. |
| 474 | "displayName": "A String", # The name to display for the anonymous player. |
| 475 | }, |
| 476 | "leaveReason": "A String", # The reason the participant left the room; populated if the participant status is PARTICIPANT_LEFT. |
| 477 | # Possible values are: |
| 478 | # - "PLAYER_LEFT" - The player explicitly chose to leave the room. |
| 479 | # - "GAME_LEFT" - The game chose to remove the player from the room. |
| 480 | # - "ABANDONED" - The player switched to another application and abandoned the room. |
| 481 | # - "PEER_CONNECTION_FAILURE" - The client was unable to establish or maintain a connection to other peer(s) in the room. |
| 482 | # - "SERVER_ERROR" - The client received an error response when it tried to communicate with the server. |
| 483 | # - "TIMEOUT" - The client timed out while waiting for players to join and connect. |
| 484 | # - "PRESENCE_FAILURE" - The client's XMPP connection ended abruptly. |
| 485 | "capabilities": [ # The capabilities which can be used when communicating with this participant. |
| 486 | "A String", |
| 487 | ], |
| 488 | "player": { # This is a JSON template for a Player resource. # Information about the player. Not populated if this player was auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.) |
| 489 | "playerId": "A String", # The ID of the player. |
| 490 | "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player. |
| 491 | "avatarImageUrl": "A String", # The base URL for the image that represents the player. |
| 492 | "displayName": "A String", # The name to display for the player. |
| 493 | }, |
| 494 | "clientAddress": { # This is a JSON template for the client address when setting up a room. # Client address for the participant. |
| 495 | "kind": "games#roomClientAddress", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomClientAddress. |
| 496 | "xmppAddress": "A String", # The XMPP address of the client on the Google Games XMPP network. |
| 497 | }, |
| 498 | "connected": True or False, # True if this participant is in the fully connected set of peers in the room. |
| 499 | "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. |
| 500 | }, |
| 501 | ], |
| 502 | "roomStatusVersion": 42, # The version of the room status: an increasing counter, used by the client to ignore out-of-order updates to room status. |
| 503 | "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank. |
| 504 | "lastUpdateDetails": { # This is a JSON template for room modification metadata. # Details about the last update to the room. |
| 505 | "kind": "games#roomModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomModification. |
| 506 | "modifiedTimestampMillis": "A String", # The timestamp at which they modified the room, in milliseconds since the epoch in UTC. |
| 507 | "participantId": "A String", # The ID of the participant that modified the room. |
| 508 | }, |
| 509 | "applicationId": "A String", # The ID of the application being played. |
| 510 | }</pre> |
| 511 | </div> |
| 512 | |
| 513 | <div class="method"> |
| 514 | <code class="details" id="leave">leave(roomId, body)</code> |
| 515 | <pre>Leave a room. For internal use by the Games SDK only. Calling this method directly is unsupported. |
| 516 | |
| 517 | Args: |
| 518 | roomId: string, The ID of the room. (required) |
| 519 | body: object, The request body. (required) |
| 520 | The object takes the form of: |
| 521 | |
| 522 | { # This is a JSON template for a leave room request. |
| 523 | "kind": "games#roomLeaveRequest", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomLeaveRequest. |
| 524 | "reason": "A String", # Reason for leaving the match. |
| 525 | # Possible values are: |
| 526 | # - "PLAYER_LEFT" - The player chose to leave the room.. |
| 527 | # - "GAME_LEFT" - The game chose to remove the player from the room. |
| 528 | # - "REALTIME_ABANDONED" - The player switched to another application and abandoned the room. |
| 529 | # - "REALTIME_PEER_CONNECTION_FAILURE" - The client was unable to establish a connection to other peer(s). |
| 530 | # - "REALTIME_SERVER_CONNECTION_FAILURE" - The client was unable to communicate with the server. |
| 531 | # - "REALTIME_SERVER_ERROR" - The client received an error response when it tried to communicate with the server. |
| 532 | # - "REALTIME_TIMEOUT" - The client timed out while waiting for a room. |
| 533 | "leaveDiagnostics": { # This is a JSON template for room leave diagnostics. # Diagnostics for a player leaving the room. |
| 534 | "kind": "games#roomLeaveDiagnostics", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomLeaveDiagnostics. |
| 535 | "peerSession": [ # Diagnostics about all peer sessions. |
| 536 | { # This is a JSON template for peer session diagnostics. |
| 537 | "unreliableChannel": { # This is a JSON template for peer channel diagnostics. # Unreliable channel diagnostics. |
| 538 | "bytesReceived": { # This is a JSON template for aggregate stats. # Number of bytes received. |
| 539 | "count": "A String", # The number of messages sent between a pair of peers. |
| 540 | "max": "A String", # The maximum amount. |
| 541 | "kind": "games#aggregateStats", # Uniquely identifies the type of this resource. Value is always the fixed string games#aggregateStats. |
| 542 | "sum": "A String", # The total number of bytes sent for messages between a pair of peers. |
| 543 | "min": "A String", # The minimum amount. |
| 544 | }, |
| 545 | "kind": "games#peerChannelDiagnostics", # Uniquely identifies the type of this resource. Value is always the fixed string games#peerChannelDiagnostics. |
| 546 | "bytesSent": { # This is a JSON template for aggregate stats. # Number of bytes sent. |
| 547 | "count": "A String", # The number of messages sent between a pair of peers. |
| 548 | "max": "A String", # The maximum amount. |
| 549 | "kind": "games#aggregateStats", # Uniquely identifies the type of this resource. Value is always the fixed string games#aggregateStats. |
| 550 | "sum": "A String", # The total number of bytes sent for messages between a pair of peers. |
| 551 | "min": "A String", # The minimum amount. |
| 552 | }, |
| 553 | "numSendFailures": 42, # Number of send failures. |
| 554 | "numMessagesLost": 42, # Number of messages lost. |
| 555 | "numMessagesReceived": 42, # Number of messages received. |
| 556 | "numMessagesSent": 42, # Number of messages sent. |
| 557 | "roundtripLatencyMillis": { # This is a JSON template for aggregate stats. # Roundtrip latency stats in milliseconds. |
| 558 | "count": "A String", # The number of messages sent between a pair of peers. |
| 559 | "max": "A String", # The maximum amount. |
| 560 | "kind": "games#aggregateStats", # Uniquely identifies the type of this resource. Value is always the fixed string games#aggregateStats. |
| 561 | "sum": "A String", # The total number of bytes sent for messages between a pair of peers. |
| 562 | "min": "A String", # The minimum amount. |
| 563 | }, |
| 564 | }, |
| 565 | "kind": "games#peerSessionDiagnostics", # Uniquely identifies the type of this resource. Value is always the fixed string games#peerSessionDiagnostics. |
| 566 | "reliableChannel": { # This is a JSON template for peer channel diagnostics. # Reliable channel diagnostics. |
| 567 | "bytesReceived": { # This is a JSON template for aggregate stats. # Number of bytes received. |
| 568 | "count": "A String", # The number of messages sent between a pair of peers. |
| 569 | "max": "A String", # The maximum amount. |
| 570 | "kind": "games#aggregateStats", # Uniquely identifies the type of this resource. Value is always the fixed string games#aggregateStats. |
| 571 | "sum": "A String", # The total number of bytes sent for messages between a pair of peers. |
| 572 | "min": "A String", # The minimum amount. |
| 573 | }, |
| 574 | "kind": "games#peerChannelDiagnostics", # Uniquely identifies the type of this resource. Value is always the fixed string games#peerChannelDiagnostics. |
| 575 | "bytesSent": { # This is a JSON template for aggregate stats. # Number of bytes sent. |
| 576 | "count": "A String", # The number of messages sent between a pair of peers. |
| 577 | "max": "A String", # The maximum amount. |
| 578 | "kind": "games#aggregateStats", # Uniquely identifies the type of this resource. Value is always the fixed string games#aggregateStats. |
| 579 | "sum": "A String", # The total number of bytes sent for messages between a pair of peers. |
| 580 | "min": "A String", # The minimum amount. |
| 581 | }, |
| 582 | "numSendFailures": 42, # Number of send failures. |
| 583 | "numMessagesLost": 42, # Number of messages lost. |
| 584 | "numMessagesReceived": 42, # Number of messages received. |
| 585 | "numMessagesSent": 42, # Number of messages sent. |
| 586 | "roundtripLatencyMillis": { # This is a JSON template for aggregate stats. # Roundtrip latency stats in milliseconds. |
| 587 | "count": "A String", # The number of messages sent between a pair of peers. |
| 588 | "max": "A String", # The maximum amount. |
| 589 | "kind": "games#aggregateStats", # Uniquely identifies the type of this resource. Value is always the fixed string games#aggregateStats. |
| 590 | "sum": "A String", # The total number of bytes sent for messages between a pair of peers. |
| 591 | "min": "A String", # The minimum amount. |
| 592 | }, |
| 593 | }, |
| 594 | "connectedTimestampMillis": "A String", # Connected time in milliseconds. |
| 595 | "participantId": "A String", # The participant ID of the peer. |
| 596 | }, |
| 597 | ], |
| 598 | "androidNetworkSubtype": 42, # Android network subtype. http://developer.android.com/reference/android/net/NetworkInfo.html#getSubtype() |
| 599 | "socketsUsed": True or False, # Whether or not sockets were used. |
| 600 | "androidNetworkType": 42, # Android network type. http://developer.android.com/reference/android/net/NetworkInfo.html#getType() |
| 601 | }, |
| 602 | } |
| 603 | |
| 604 | |
| 605 | Returns: |
| 606 | An object of the form: |
| 607 | |
| 608 | { # This is a JSON template for a room resource object. |
| 609 | "status": "A String", # The status of the room. |
| 610 | # Possible values are: |
| 611 | # - "ROOM_INVITING" - One or more players have been invited and not responded. |
| 612 | # - "ROOM_AUTO_MATCHING" - One or more slots need to be filled by auto-matching. |
| 613 | # - "ROOM_CONNECTING" - Players have joined and are connecting to each other (either before or after auto-matching). |
| 614 | # - "ROOM_ACTIVE" - All players have joined and connected to each other. |
| 615 | # - "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. |
| 616 | "kind": "games#room", # Uniquely identifies the type of this resource. Value is always the fixed string games#room. |
| 617 | "autoMatchingCriteria": { # This is a JSON template for a room auto-match criteria object. # Criteria for auto-matching players into this room. |
| 618 | "kind": "games#roomAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomAutoMatchingCriteria. |
| 619 | "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the room by auto-matching. |
| 620 | "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. |
| 621 | "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the room by auto-matching. |
| 622 | }, |
| 623 | "creationDetails": { # This is a JSON template for room modification metadata. # Details about the room creation. |
| 624 | "kind": "games#roomModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomModification. |
| 625 | "modifiedTimestampMillis": "A String", # The timestamp at which they modified the room, in milliseconds since the epoch in UTC. |
| 626 | "participantId": "A String", # The ID of the participant that modified the room. |
| 627 | }, |
| 628 | "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.) |
| 629 | "roomId": "A String", # Globally unique ID for a room. |
| 630 | "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 status. |
| 631 | "kind": "games#roomAutoMatchStatus", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomAutoMatchStatus. |
| 632 | "waitEstimateSeconds": 42, # An estimate for the amount of time that automatching is expected to take to complete. |
| 633 | }, |
| 634 | "participants": [ # The participants involved in the room, along with their statuses. Includes participants who have left or declined invitations. |
| 635 | { # This is a JSON template for a participant in a room. |
| 636 | "status": "A String", # The status of the participant with respect to the room. |
| 637 | # Possible values are: |
| 638 | # - "PARTICIPANT_INVITED" - The participant has been invited to join the room, but has not yet responded. |
| 639 | # - "PARTICIPANT_JOINED" - The participant has joined the room (either after creating it or accepting an invitation.) |
| 640 | # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the room. |
| 641 | # - "PARTICIPANT_LEFT" - The participant joined the room and then left it. |
| 642 | "kind": "games#roomParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomParticipant. |
| 643 | "autoMatchedPlayer": { # This is a JSON template for an anonymous player # Information about a player that has been auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.) |
| 644 | "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer. |
| 645 | "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player. |
| 646 | "displayName": "A String", # The name to display for the anonymous player. |
| 647 | }, |
| 648 | "leaveReason": "A String", # The reason the participant left the room; populated if the participant status is PARTICIPANT_LEFT. |
| 649 | # Possible values are: |
| 650 | # - "PLAYER_LEFT" - The player explicitly chose to leave the room. |
| 651 | # - "GAME_LEFT" - The game chose to remove the player from the room. |
| 652 | # - "ABANDONED" - The player switched to another application and abandoned the room. |
| 653 | # - "PEER_CONNECTION_FAILURE" - The client was unable to establish or maintain a connection to other peer(s) in the room. |
| 654 | # - "SERVER_ERROR" - The client received an error response when it tried to communicate with the server. |
| 655 | # - "TIMEOUT" - The client timed out while waiting for players to join and connect. |
| 656 | # - "PRESENCE_FAILURE" - The client's XMPP connection ended abruptly. |
| 657 | "capabilities": [ # The capabilities which can be used when communicating with this participant. |
| 658 | "A String", |
| 659 | ], |
| 660 | "player": { # This is a JSON template for a Player resource. # Information about the player. Not populated if this player was auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.) |
| 661 | "playerId": "A String", # The ID of the player. |
| 662 | "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player. |
| 663 | "avatarImageUrl": "A String", # The base URL for the image that represents the player. |
| 664 | "displayName": "A String", # The name to display for the player. |
| 665 | }, |
| 666 | "clientAddress": { # This is a JSON template for the client address when setting up a room. # Client address for the participant. |
| 667 | "kind": "games#roomClientAddress", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomClientAddress. |
| 668 | "xmppAddress": "A String", # The XMPP address of the client on the Google Games XMPP network. |
| 669 | }, |
| 670 | "connected": True or False, # True if this participant is in the fully connected set of peers in the room. |
| 671 | "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. |
| 672 | }, |
| 673 | ], |
| 674 | "roomStatusVersion": 42, # The version of the room status: an increasing counter, used by the client to ignore out-of-order updates to room status. |
| 675 | "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank. |
| 676 | "lastUpdateDetails": { # This is a JSON template for room modification metadata. # Details about the last update to the room. |
| 677 | "kind": "games#roomModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomModification. |
| 678 | "modifiedTimestampMillis": "A String", # The timestamp at which they modified the room, in milliseconds since the epoch in UTC. |
| 679 | "participantId": "A String", # The ID of the participant that modified the room. |
| 680 | }, |
| 681 | "applicationId": "A String", # The ID of the application being played. |
| 682 | }</pre> |
| 683 | </div> |
| 684 | |
| 685 | <div class="method"> |
| 686 | <code class="details" id="list">list(pageToken=None, language=None, maxResults=None)</code> |
| 687 | <pre>Returns invitations to join rooms. |
| 688 | |
| 689 | Args: |
| 690 | pageToken: string, The token returned by the previous request. |
| 691 | language: string, The preferred language to use for strings returned by this method. |
| 692 | 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. |
| 693 | |
| 694 | Returns: |
| 695 | An object of the form: |
| 696 | |
| 697 | { # This is a JSON template for a list of rooms. |
| 698 | "nextPageToken": "A String", # The pagination token for the next page of results. |
| 699 | "items": [ # The rooms. |
| 700 | { # This is a JSON template for a room resource object. |
| 701 | "status": "A String", # The status of the room. |
| 702 | # Possible values are: |
| 703 | # - "ROOM_INVITING" - One or more players have been invited and not responded. |
| 704 | # - "ROOM_AUTO_MATCHING" - One or more slots need to be filled by auto-matching. |
| 705 | # - "ROOM_CONNECTING" - Players have joined and are connecting to each other (either before or after auto-matching). |
| 706 | # - "ROOM_ACTIVE" - All players have joined and connected to each other. |
| 707 | # - "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. |
| 708 | "kind": "games#room", # Uniquely identifies the type of this resource. Value is always the fixed string games#room. |
| 709 | "autoMatchingCriteria": { # This is a JSON template for a room auto-match criteria object. # Criteria for auto-matching players into this room. |
| 710 | "kind": "games#roomAutoMatchingCriteria", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomAutoMatchingCriteria. |
| 711 | "minAutoMatchingPlayers": 42, # The minimum number of players that should be added to the room by auto-matching. |
| 712 | "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. |
| 713 | "maxAutoMatchingPlayers": 42, # The maximum number of players that should be added to the room by auto-matching. |
| 714 | }, |
| 715 | "creationDetails": { # This is a JSON template for room modification metadata. # Details about the room creation. |
| 716 | "kind": "games#roomModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomModification. |
| 717 | "modifiedTimestampMillis": "A String", # The timestamp at which they modified the room, in milliseconds since the epoch in UTC. |
| 718 | "participantId": "A String", # The ID of the participant that modified the room. |
| 719 | }, |
| 720 | "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.) |
| 721 | "roomId": "A String", # Globally unique ID for a room. |
| 722 | "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 status. |
| 723 | "kind": "games#roomAutoMatchStatus", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomAutoMatchStatus. |
| 724 | "waitEstimateSeconds": 42, # An estimate for the amount of time that automatching is expected to take to complete. |
| 725 | }, |
| 726 | "participants": [ # The participants involved in the room, along with their statuses. Includes participants who have left or declined invitations. |
| 727 | { # This is a JSON template for a participant in a room. |
| 728 | "status": "A String", # The status of the participant with respect to the room. |
| 729 | # Possible values are: |
| 730 | # - "PARTICIPANT_INVITED" - The participant has been invited to join the room, but has not yet responded. |
| 731 | # - "PARTICIPANT_JOINED" - The participant has joined the room (either after creating it or accepting an invitation.) |
| 732 | # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the room. |
| 733 | # - "PARTICIPANT_LEFT" - The participant joined the room and then left it. |
| 734 | "kind": "games#roomParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomParticipant. |
| 735 | "autoMatchedPlayer": { # This is a JSON template for an anonymous player # Information about a player that has been auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.) |
| 736 | "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer. |
| 737 | "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player. |
| 738 | "displayName": "A String", # The name to display for the anonymous player. |
| 739 | }, |
| 740 | "leaveReason": "A String", # The reason the participant left the room; populated if the participant status is PARTICIPANT_LEFT. |
| 741 | # Possible values are: |
| 742 | # - "PLAYER_LEFT" - The player explicitly chose to leave the room. |
| 743 | # - "GAME_LEFT" - The game chose to remove the player from the room. |
| 744 | # - "ABANDONED" - The player switched to another application and abandoned the room. |
| 745 | # - "PEER_CONNECTION_FAILURE" - The client was unable to establish or maintain a connection to other peer(s) in the room. |
| 746 | # - "SERVER_ERROR" - The client received an error response when it tried to communicate with the server. |
| 747 | # - "TIMEOUT" - The client timed out while waiting for players to join and connect. |
| 748 | # - "PRESENCE_FAILURE" - The client's XMPP connection ended abruptly. |
| 749 | "capabilities": [ # The capabilities which can be used when communicating with this participant. |
| 750 | "A String", |
| 751 | ], |
| 752 | "player": { # This is a JSON template for a Player resource. # Information about the player. Not populated if this player was auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.) |
| 753 | "playerId": "A String", # The ID of the player. |
| 754 | "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player. |
| 755 | "avatarImageUrl": "A String", # The base URL for the image that represents the player. |
| 756 | "displayName": "A String", # The name to display for the player. |
| 757 | }, |
| 758 | "clientAddress": { # This is a JSON template for the client address when setting up a room. # Client address for the participant. |
| 759 | "kind": "games#roomClientAddress", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomClientAddress. |
| 760 | "xmppAddress": "A String", # The XMPP address of the client on the Google Games XMPP network. |
| 761 | }, |
| 762 | "connected": True or False, # True if this participant is in the fully connected set of peers in the room. |
| 763 | "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. |
| 764 | }, |
| 765 | ], |
| 766 | "roomStatusVersion": 42, # The version of the room status: an increasing counter, used by the client to ignore out-of-order updates to room status. |
| 767 | "variant": 42, # The variant / mode of the application being played; can be any integer value, or left blank. |
| 768 | "lastUpdateDetails": { # This is a JSON template for room modification metadata. # Details about the last update to the room. |
| 769 | "kind": "games#roomModification", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomModification. |
| 770 | "modifiedTimestampMillis": "A String", # The timestamp at which they modified the room, in milliseconds since the epoch in UTC. |
| 771 | "participantId": "A String", # The ID of the participant that modified the room. |
| 772 | }, |
| 773 | "applicationId": "A String", # The ID of the application being played. |
| 774 | }, |
| 775 | ], |
| 776 | "kind": "games#roomList", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomList. |
| 777 | }</pre> |
| 778 | </div> |
| 779 | |
| 780 | <div class="method"> |
| 781 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 782 | <pre>Retrieves the next page of results. |
| 783 | |
| 784 | Args: |
| 785 | previous_request: The request for the previous page. (required) |
| 786 | previous_response: The response from the request for the previous page. (required) |
| 787 | |
| 788 | Returns: |
| 789 | A request object that you can call 'execute()' on to request the next |
| 790 | page. Returns None if there are no more items in the collection. |
| 791 | </pre> |
| 792 | </div> |
| 793 | |
| 794 | <div class="method"> |
| 795 | <code class="details" id="reportStatus">reportStatus(roomId, body)</code> |
| 796 | <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. |
| 797 | |
| 798 | Args: |
| 799 | roomId: string, The ID of the room. (required) |
| 800 | body: object, The request body. (required) |
| 801 | The object takes the form of: |
| 802 | |
| 803 | { # This is a JSON template for an update on the status of peers in a room. |
| 804 | "kind": "games#roomP2PStatuses", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomP2PStatuses. |
| 805 | "updates": [ # The updates for the peers. |
| 806 | { # This is a JSON template for an update on the status of a peer in a room. |
| 807 | "status": "A String", # The status of the peer in the room. |
| 808 | # Possible values are: |
| 809 | # - "CONNECTION_ESTABLISHED" - The client established a P2P connection with the peer. |
| 810 | # - "CONNECTION_FAILED" - The client failed to establish directed presence with the peer. |
| 811 | "kind": "games#roomP2PStatus", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomP2PStatus. |
| 812 | "participantId": "A String", # The ID of the participant. |
| 813 | "unreliableRoundtripLatencyMillis": 42, # The amount of time in milliseconds it took to send packets back and forth on the unreliable channel with this peer. |
| 814 | "connectionSetupLatencyMillis": 42, # The amount of time in milliseconds it took to establish connections with this peer. |
| 815 | "error": "A String", # The error code in event of a failure. |
| 816 | # Possible values are: |
| 817 | # - "P2P_FAILED" - The client failed to establish a P2P connection with the peer. |
| 818 | # - "PRESENCE_FAILED" - The client failed to register to receive P2P connections. |
| 819 | # - "RELAY_SERVER_FAILED" - The client received an error when trying to use the relay server to establish a P2P connection with the peer. |
| 820 | "error_reason": "A String", # More detailed diagnostic message returned in event of a failure. |
| 821 | }, |
| 822 | ], |
| 823 | } |
| 824 | |
| 825 | |
| 826 | Returns: |
| 827 | An object of the form: |
| 828 | |
| 829 | { # This is a JSON template for the status of a room that the player has joined. |
| 830 | "status": "A String", # The status of the room. |
| 831 | # Possible values are: |
| 832 | # - "ROOM_INVITING" - One or more players have been invited and not responded. |
| 833 | # - "ROOM_AUTO_MATCHING" - One or more slots need to be filled by auto-matching. |
| 834 | # - "ROOM_CONNECTING" - Players have joined are connecting to each other (either before or after auto-matching). |
| 835 | # - "ROOM_ACTIVE" - All players have joined and connected to each other. |
| 836 | # - "ROOM_DELETED" - All joined players have left. |
| 837 | "kind": "games#roomStatus", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomStatus. |
| 838 | "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. |
| 839 | "kind": "games#roomAutoMatchStatus", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomAutoMatchStatus. |
| 840 | "waitEstimateSeconds": 42, # An estimate for the amount of time that automatching is expected to take to complete. |
| 841 | }, |
| 842 | "participants": [ # The participants involved in the room, along with their statuses. Includes participants who have left or declined invitations. |
| 843 | { # This is a JSON template for a participant in a room. |
| 844 | "status": "A String", # The status of the participant with respect to the room. |
| 845 | # Possible values are: |
| 846 | # - "PARTICIPANT_INVITED" - The participant has been invited to join the room, but has not yet responded. |
| 847 | # - "PARTICIPANT_JOINED" - The participant has joined the room (either after creating it or accepting an invitation.) |
| 848 | # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the room. |
| 849 | # - "PARTICIPANT_LEFT" - The participant joined the room and then left it. |
| 850 | "kind": "games#roomParticipant", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomParticipant. |
| 851 | "autoMatchedPlayer": { # This is a JSON template for an anonymous player # Information about a player that has been auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.) |
| 852 | "kind": "games#anonymousPlayer", # Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer. |
| 853 | "avatarImageUrl": "A String", # The base URL for the image to display for the anonymous player. |
| 854 | "displayName": "A String", # The name to display for the anonymous player. |
| 855 | }, |
| 856 | "leaveReason": "A String", # The reason the participant left the room; populated if the participant status is PARTICIPANT_LEFT. |
| 857 | # Possible values are: |
| 858 | # - "PLAYER_LEFT" - The player explicitly chose to leave the room. |
| 859 | # - "GAME_LEFT" - The game chose to remove the player from the room. |
| 860 | # - "ABANDONED" - The player switched to another application and abandoned the room. |
| 861 | # - "PEER_CONNECTION_FAILURE" - The client was unable to establish or maintain a connection to other peer(s) in the room. |
| 862 | # - "SERVER_ERROR" - The client received an error response when it tried to communicate with the server. |
| 863 | # - "TIMEOUT" - The client timed out while waiting for players to join and connect. |
| 864 | # - "PRESENCE_FAILURE" - The client's XMPP connection ended abruptly. |
| 865 | "capabilities": [ # The capabilities which can be used when communicating with this participant. |
| 866 | "A String", |
| 867 | ], |
| 868 | "player": { # This is a JSON template for a Player resource. # Information about the player. Not populated if this player was auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.) |
| 869 | "playerId": "A String", # The ID of the player. |
| 870 | "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player. |
| 871 | "avatarImageUrl": "A String", # The base URL for the image that represents the player. |
| 872 | "displayName": "A String", # The name to display for the player. |
| 873 | }, |
| 874 | "clientAddress": { # This is a JSON template for the client address when setting up a room. # Client address for the participant. |
| 875 | "kind": "games#roomClientAddress", # Uniquely identifies the type of this resource. Value is always the fixed string games#roomClientAddress. |
| 876 | "xmppAddress": "A String", # The XMPP address of the client on the Google Games XMPP network. |
| 877 | }, |
| 878 | "connected": True or False, # True if this participant is in the fully connected set of peers in the room. |
| 879 | "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. |
| 880 | }, |
| 881 | ], |
| 882 | "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. |
| 883 | "roomId": "A String", # Globally unique ID for a room. |
| 884 | }</pre> |
| 885 | </div> |
| 886 | |
| 887 | </body></html> |