Represents the state of a room with multiple players.
For a list of methods for this resource, see the end of this page.
Resource representations
This is a JSON template for a room resource object.
{ "kind": "games#room", "roomId": string, "applicationId": string, "variant": integer, "status": string, "participants": [ { "kind": "games#roomParticipant", "id": string, "player": players Resource, "autoMatchedPlayer": { "kind": "games#anonymousPlayer", "displayName": string, "avatarImageUrl": string }, "autoMatched": boolean, "status": string, "clientAddress": { "kind": "games#roomClientAddress", "xmppAddress": string }, "connected": boolean, "leaveReason": string, "capabilities": [ string ] } ], "inviterId": string, "creationDetails": { "kind": "games#roomModification", "participantId": string, "modifiedTimestampMillis": long }, "lastUpdateDetails": { "kind": "games#roomModification", "participantId": string, "modifiedTimestampMillis": long }, "description": string, "autoMatchingCriteria": { "kind": "games#roomAutoMatchingCriteria", "minAutoMatchingPlayers": integer, "maxAutoMatchingPlayers": integer, "exclusiveBitmask": long }, "roomStatusVersion": integer, "autoMatchingStatus": { "kind": "games#roomAutoMatchStatus", "waitEstimateSeconds": integer } }
Property name | Value | Description | Notes |
---|---|---|---|
applicationId |
string |
The ID of the application being played. | |
autoMatchingCriteria |
nested object |
Criteria for auto-matching players into this room. | |
autoMatchingCriteria.exclusiveBitmask |
long |
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. | |
autoMatchingCriteria.kind |
string |
Uniquely identifies the type of this resource. Value is always the fixed string games#roomAutoMatchingCriteria . |
|
autoMatchingCriteria.maxAutoMatchingPlayers |
integer |
The maximum number of players that should be added to the room by auto-matching. | |
autoMatchingCriteria.minAutoMatchingPlayers |
integer |
The minimum number of players that should be added to the room by auto-matching. | |
autoMatchingStatus |
nested object |
Auto-matching status for this room. Not set if the room is not currently in the auto-matching queue. | |
autoMatchingStatus.kind |
string |
Uniquely identifies the type of this resource. Value is always the fixed string games#roomAutoMatchStatus . |
|
autoMatchingStatus.waitEstimateSeconds |
integer |
An estimate for the amount of time (in seconds) that auto-matching is expected to take to complete. | |
creationDetails |
nested object |
Details about the room creation. | |
creationDetails.kind |
string |
Uniquely identifies the type of this resource. Value is always the fixed string games#roomModification . |
|
creationDetails.modifiedTimestampMillis |
long |
The timestamp at which they modified the room, in milliseconds since the epoch in UTC. | |
creationDetails.participantId |
string |
The ID of the participant that modified the room. | |
description |
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.) | |
inviterId |
string |
The ID of the participant that invited the user to the room. Not set if the user was not invited to the room. | |
kind |
string |
Uniquely identifies the type of this resource. Value is always the fixed string games#room . |
|
lastUpdateDetails |
nested object |
Details about the last update to the room. | |
lastUpdateDetails.kind |
string |
Uniquely identifies the type of this resource. Value is always the fixed string games#roomModification . |
|
lastUpdateDetails.modifiedTimestampMillis |
long |
The timestamp at which they modified the room, in milliseconds since the epoch in UTC. | |
lastUpdateDetails.participantId |
string |
The ID of the participant that modified the room. | |
participants[] |
list |
The participants involved in the room, along with their statuses. Includes participants who have left or declined invitations. | |
participants[].autoMatched |
boolean |
True if this participant was auto-matched with the requesting player. | |
participants[].autoMatchedPlayer |
nested object |
Information about a player that has been anonymously auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.) |
|
participants[].autoMatchedPlayer.avatarImageUrl |
string |
The base URL for the image to display for the anonymous player. | |
participants[].autoMatchedPlayer.displayName |
string |
The name to display for the anonymous player. | |
participants[].autoMatchedPlayer.kind |
string |
Uniquely identifies the type of this resource. Value is always the fixed string games#anonymousPlayer . |
|
participants[].capabilities[] |
list |
The capabilities which can be used when communicating with this participant. | |
participants[].clientAddress |
nested object |
Client address for the participant. | |
participants[].clientAddress.kind |
string |
Uniquely identifies the type of this resource. Value is always the fixed string games#roomClientAddress . |
|
participants[].clientAddress.xmppAddress |
string |
The XMPP address of the client on the Google Games XMPP network. | |
participants[].connected |
boolean |
True if this participant is in the fully connected set of peers in the room. | |
participants[].id |
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. | |
participants[].kind |
string |
Uniquely identifies the type of this resource. Value is always the fixed string games#roomParticipant . |
|
participants[].leaveReason |
string |
The reason the participant left the room; populated if the participant status is PARTICIPANT_LEFT .Possible values are:
Acceptable values are:
|
|
participants[].player |
nested object |
Information about the player. Not populated if this player was anonymously auto-matched against the requesting player. (Either player or autoMatchedPlayer will be set.) |
|
participants[].status |
string |
The status of the participant with respect to the room. Possible values are:
Acceptable values are:
|
|
roomId |
string |
Globally unique ID for a room. | |
roomStatusVersion |
integer |
The version of the room status: an increasing counter, used by the client to ignore out-of-order updates to room status. | |
status |
string |
The status of the room. Possible values are:
Acceptable values are:
|
|
variant |
integer |
The variant / mode of the application being played; can be any integer value, or left blank. |
Methods
- create
- Create a room. For internal use by the Games SDK only. Calling this method directly is unsupported.
- decline
- Decline an invitation to join a room. For internal use by the Games SDK only. Calling this method directly is unsupported.
- dismiss
- Dismiss an invitation to join a room. For internal use by the Games SDK only. Calling this method directly is unsupported.
- get
- Get the data for a room.
- join
- Join a room. For internal use by the Games SDK only. Calling this method directly is unsupported.
- leave
- Leave a room. For internal use by the Games SDK only. Calling this method directly is unsupported.
- list
- Returns invitations to join rooms.
- reportStatus
- 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.