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