Google_RoomsServiceResource
The "rooms" collection of methods.
Defined (2)
The class is defined in the following location(s).
- /google-api-php-client/src/contrib/Google_GamesManagementService.php
- class Google_RoomsServiceResource extends Google_ServiceResource {
- /**
- * Reset all rooms for the currently authenticated player for your application. This method is only
- * accessible to whitelisted tester accounts for your application. (rooms.reset)
- *
- * @param array $optParams Optional parameters.
- */
- public function reset($optParams = array()) {
- $params = array();
- $params = array_merge($params, $optParams);
- $data = $this->__call('reset', array($params));
- return $data;
- }
- }
- /google-api-php-client/src/contrib/Google_GamesService.php
- class Google_RoomsServiceResource extends Google_ServiceResource {
- /**
- * Create a room. For internal use by the Games SDK only. Calling this method directly is
- * unsupported. (rooms.create)
- *
- * @param Google_RoomCreateRequest $postBody
- * @param array $optParams Optional parameters.
- *
- * @opt_param string language The preferred language to use for strings returned by this method.
- * @return Google_Room
- */
- public function create(Google_RoomCreateRequest $postBody, $optParams = array()) {
- $params = array('postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('create', array($params));
- if ($this->useObjects()) {
- return new Google_Room($data);
- } else {
- return $data;
- }
- }
- /**
- * Decline an invitation to join a room. For internal use by the Games SDK only. Calling this method
- * directly is unsupported. (rooms.decline)
- *
- * @param string $roomId The ID of the room.
- * @param array $optParams Optional parameters.
- * @return Google_Room
- */
- public function decline($roomId, $optParams = array()) {
- $params = array('roomId' => $roomId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('decline', array($params));
- if ($this->useObjects()) {
- return new Google_Room($data);
- } else {
- return $data;
- }
- }
- /**
- * Dismiss an invitation to join a room. For internal use by the Games SDK only. Calling this method
- * directly is unsupported. (rooms.dismiss)
- *
- * @param string $roomId The ID of the room.
- * @param array $optParams Optional parameters.
- */
- public function dismiss($roomId, $optParams = array()) {
- $params = array('roomId' => $roomId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('dismiss', array($params));
- return $data;
- }
- /**
- * Get the data for a room. (rooms.get)
- *
- * @param string $roomId The ID of the room.
- * @param array $optParams Optional parameters.
- *
- * @opt_param string language Specify the preferred language to use to format room info.
- * @return Google_Room
- */
- public function get($roomId, $optParams = array()) {
- $params = array('roomId' => $roomId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('get', array($params));
- if ($this->useObjects()) {
- return new Google_Room($data);
- } else {
- return $data;
- }
- }
- /**
- * Join a room. For internal use by the Games SDK only. Calling this method directly is unsupported.
- * (rooms.join)
- *
- * @param string $roomId The ID of the room.
- * @param Google_RoomJoinRequest $postBody
- * @param array $optParams Optional parameters.
- * @return Google_Room
- */
- public function join($roomId, Google_RoomJoinRequest $postBody, $optParams = array()) {
- $params = array('roomId' => $roomId, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('join', array($params));
- if ($this->useObjects()) {
- return new Google_Room($data);
- } else {
- return $data;
- }
- }
- /**
- * Leave a room. For internal use by the Games SDK only. Calling this method directly is
- * unsupported. (rooms.leave)
- *
- * @param string $roomId The ID of the room.
- * @param Google_RoomLeaveRequest $postBody
- * @param array $optParams Optional parameters.
- * @return Google_Room
- */
- public function leave($roomId, Google_RoomLeaveRequest $postBody, $optParams = array()) {
- $params = array('roomId' => $roomId, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('leave', array($params));
- if ($this->useObjects()) {
- return new Google_Room($data);
- } else {
- return $data;
- }
- }
- /**
- * Returns invitations to join rooms. (rooms.list)
- *
- * @param array $optParams Optional parameters.
- *
- * @opt_param string language The preferred language to use for strings returned by this method.
- * @opt_param int maxResults 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.
- * @opt_param string pageToken The token returned by the previous request.
- * @return Google_RoomList
- */
- public function listRooms($optParams = array()) {
- $params = array();
- $params = array_merge($params, $optParams);
- $data = $this->__call('list', array($params));
- if ($this->useObjects()) {
- return new Google_RoomList($data);
- } else {
- return $data;
- }
- }
- /**
- * 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. (rooms.reportStatus)
- *
- * @param string $roomId The ID of the room.
- * @param Google_RoomP2PStatuses $postBody
- * @param array $optParams Optional parameters.
- * @return Google_RoomStatus
- */
- public function reportStatus($roomId, Google_RoomP2PStatuses $postBody, $optParams = array()) {
- $params = array('roomId' => $roomId, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('reportStatus', array($params));
- if ($this->useObjects()) {
- return new Google_RoomStatus($data);
- } else {
- return $data;
- }
- }
- }