Google_CommunityMessagesServiceResource

The "communityMessages" collection of methods.

Defined (1)

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

/inc/google-api-php-client/src/contrib/Google_OrkutService.php  
  1. class Google_CommunityMessagesServiceResource extends Google_ServiceResource { 
  2.  
  3.  
  4. /** 
  5. * Adds a message to a given community topic. (communityMessages.insert) 
  6. * @param int $communityId The ID of the community the message should be added to. 
  7. * @param string $topicId The ID of the topic the message should be added to. 
  8. * @param Google_CommunityMessage $postBody 
  9. * @param array $optParams Optional parameters. 
  10. * @return Google_CommunityMessage 
  11. */ 
  12. public function insert($communityId, $topicId, Google_CommunityMessage $postBody, $optParams = array()) { 
  13. $params = array('communityId' => $communityId, 'topicId' => $topicId, 'postBody' => $postBody); 
  14. $params = array_merge($params, $optParams); 
  15. $data = $this->__call('insert', array($params)); 
  16. if ($this->useObjects()) { 
  17. return new Google_CommunityMessage($data); 
  18. } else { 
  19. return $data; 
  20. /** 
  21. * Retrieves the messages of a topic of a community. (communityMessages.list) 
  22. * @param int $communityId The ID of the community which messages will be listed. 
  23. * @param string $topicId The ID of the topic which messages will be listed. 
  24. * @param array $optParams Optional parameters. 
  25. * @opt_param string pageToken A continuation token that allows pagination. 
  26. * @opt_param string maxResults The maximum number of messages to include in the response. 
  27. * @opt_param string hl Specifies the interface language (host language) of your user interface. 
  28. * @return Google_CommunityMessageList 
  29. */ 
  30. public function listCommunityMessages($communityId, $topicId, $optParams = array()) { 
  31. $params = array('communityId' => $communityId, 'topicId' => $topicId); 
  32. $params = array_merge($params, $optParams); 
  33. $data = $this->__call('list', array($params)); 
  34. if ($this->useObjects()) { 
  35. return new Google_CommunityMessageList($data); 
  36. } else { 
  37. return $data; 
  38. /** 
  39. * Moves a message of the community to the trash folder. (communityMessages.delete) 
  40. * @param int $communityId The ID of the community whose message will be moved to the trash folder. 
  41. * @param string $topicId The ID of the topic whose message will be moved to the trash folder. 
  42. * @param string $messageId The ID of the message to be moved to the trash folder. 
  43. * @param array $optParams Optional parameters. 
  44. */ 
  45. public function delete($communityId, $topicId, $messageId, $optParams = array()) { 
  46. $params = array('communityId' => $communityId, 'topicId' => $topicId, 'messageId' => $messageId); 
  47. $params = array_merge($params, $optParams); 
  48. $data = $this->__call('delete', array($params)); 
  49. return $data;