Google_RoomsServiceResource

The "rooms" collection of methods.

Defined (1)

The class is defined in the following location(s).

/google-api/src/contrib/Google_GamesService.php  
  1. class Google_RoomsServiceResource extends Google_ServiceResource { 
  2.  
  3.  
  4. /** 
  5. * Create a room. For internal use by the Games SDK only. Calling this method directly is 
  6. * unsupported. (rooms.create) 
  7. * @param Google_RoomCreateRequest $postBody 
  8. * @param array $optParams Optional parameters. 
  9. * @opt_param string language The preferred language to use for strings returned by this method. 
  10. * @return Google_Room 
  11. */ 
  12. public function create(Google_RoomCreateRequest $postBody, $optParams = array()) { 
  13. $params = array('postBody' => $postBody); 
  14. $params = array_merge($params, $optParams); 
  15. $data = $this->__call('create', array($params)); 
  16. if ($this->useObjects()) { 
  17. return new Google_Room($data); 
  18. } else { 
  19. return $data; 
  20. /** 
  21. * Decline an invitation to join a room. For internal use by the Games SDK only. Calling this method 
  22. * directly is unsupported. (rooms.decline) 
  23. * @param string $roomId The ID of the room. 
  24. * @param array $optParams Optional parameters. 
  25. * @return Google_Room 
  26. */ 
  27. public function decline($roomId, $optParams = array()) { 
  28. $params = array('roomId' => $roomId); 
  29. $params = array_merge($params, $optParams); 
  30. $data = $this->__call('decline', array($params)); 
  31. if ($this->useObjects()) { 
  32. return new Google_Room($data); 
  33. } else { 
  34. return $data; 
  35. /** 
  36. * Dismiss an invitation to join a room. For internal use by the Games SDK only. Calling this method 
  37. * directly is unsupported. (rooms.dismiss) 
  38. * @param string $roomId The ID of the room. 
  39. * @param array $optParams Optional parameters. 
  40. */ 
  41. public function dismiss($roomId, $optParams = array()) { 
  42. $params = array('roomId' => $roomId); 
  43. $params = array_merge($params, $optParams); 
  44. $data = $this->__call('dismiss', array($params)); 
  45. return $data; 
  46. /** 
  47. * Get the data for a room. (rooms.get) 
  48. * @param string $roomId The ID of the room. 
  49. * @param array $optParams Optional parameters. 
  50. * @opt_param string language Specify the preferred language to use to format room info. 
  51. * @return Google_Room 
  52. */ 
  53. public function get($roomId, $optParams = array()) { 
  54. $params = array('roomId' => $roomId); 
  55. $params = array_merge($params, $optParams); 
  56. $data = $this->__call('get', array($params)); 
  57. if ($this->useObjects()) { 
  58. return new Google_Room($data); 
  59. } else { 
  60. return $data; 
  61. /** 
  62. * Join a room. For internal use by the Games SDK only. Calling this method directly is unsupported. 
  63. * (rooms.join) 
  64. * @param string $roomId The ID of the room. 
  65. * @param Google_RoomJoinRequest $postBody 
  66. * @param array $optParams Optional parameters. 
  67. * @return Google_Room 
  68. */ 
  69. public function join($roomId, Google_RoomJoinRequest $postBody, $optParams = array()) { 
  70. $params = array('roomId' => $roomId, 'postBody' => $postBody); 
  71. $params = array_merge($params, $optParams); 
  72. $data = $this->__call('join', array($params)); 
  73. if ($this->useObjects()) { 
  74. return new Google_Room($data); 
  75. } else { 
  76. return $data; 
  77. /** 
  78. * Leave a room. For internal use by the Games SDK only. Calling this method directly is 
  79. * unsupported. (rooms.leave) 
  80. * @param string $roomId The ID of the room. 
  81. * @param Google_RoomLeaveRequest $postBody 
  82. * @param array $optParams Optional parameters. 
  83. * @return Google_Room 
  84. */ 
  85. public function leave($roomId, Google_RoomLeaveRequest $postBody, $optParams = array()) { 
  86. $params = array('roomId' => $roomId, 'postBody' => $postBody); 
  87. $params = array_merge($params, $optParams); 
  88. $data = $this->__call('leave', array($params)); 
  89. if ($this->useObjects()) { 
  90. return new Google_Room($data); 
  91. } else { 
  92. return $data; 
  93. /** 
  94. * Returns invitations to join rooms. (rooms.list) 
  95. * @param array $optParams Optional parameters. 
  96. * @opt_param string language The preferred language to use for strings returned by this method. 
  97. * @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. 
  98. * @opt_param string pageToken The token returned by the previous request. 
  99. * @return Google_RoomList 
  100. */ 
  101. public function listRooms($optParams = array()) { 
  102. $params = array(); 
  103. $params = array_merge($params, $optParams); 
  104. $data = $this->__call('list', array($params)); 
  105. if ($this->useObjects()) { 
  106. return new Google_RoomList($data); 
  107. } else { 
  108. return $data; 
  109. /** 
  110. * Updates sent by a client reporting the status of peers in a room. For internal use by the Games 
  111. * SDK only. Calling this method directly is unsupported. (rooms.reportStatus) 
  112. * @param string $roomId The ID of the room. 
  113. * @param Google_RoomP2PStatuses $postBody 
  114. * @param array $optParams Optional parameters. 
  115. * @return Google_RoomStatus 
  116. */ 
  117. public function reportStatus($roomId, Google_RoomP2PStatuses $postBody, $optParams = array()) { 
  118. $params = array('roomId' => $roomId, 'postBody' => $postBody); 
  119. $params = array_merge($params, $optParams); 
  120. $data = $this->__call('reportStatus', array($params)); 
  121. if ($this->useObjects()) { 
  122. return new Google_RoomStatus($data); 
  123. } else { 
  124. return $data;