Google_MomentsServiceResource

The "moments" collection of methods.

Defined (1)

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

/src/contrib/Google_PlusService.php  
  1. class Google_MomentsServiceResource extends Google_ServiceResource { 
  2.  
  3. /** 
  4. * Record a moment representing a user's activity such as making a purchase or commenting on a blog. 
  5. * (moments.insert) 
  6. * @param string $userId The ID of the user to record activities for. The only valid values are "me" and the ID of the authenticated user. 
  7. * @param string $collection The collection to which to write moments. 
  8. * @param Google_Moment $postBody 
  9. * @param array $optParams Optional parameters. 
  10. * @opt_param bool debug Return the moment as written. Should be used only for debugging. 
  11. * @return Google_Moment 
  12. */ 
  13. public function insert($userId, $collection, Google_Moment $postBody, $optParams = array()) { 
  14. $params = array('userId' => $userId, 'collection' => $collection, 'postBody' => $postBody); 
  15. $params = array_merge($params, $optParams); 
  16. $data = $this->__call('insert', array($params)); 
  17. if ($this->useObjects()) { 
  18. return new Google_Moment($data); 
  19. } else { 
  20. return $data; 
  21. /** 
  22. * List all of the moments for a particular user. (moments.list) 
  23. * @param string $userId The ID of the user to get moments for. The special value "me" can be used to indicate the authenticated user. 
  24. * @param string $collection The collection of moments to list. 
  25. * @param array $optParams Optional parameters. 
  26. * @opt_param string maxResults The maximum number of moments to include in the response, which is used for paging. For any response, the actual number returned might be less than the specified maxResults. 
  27. * @opt_param string pageToken The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of "nextPageToken" from the previous response. 
  28. * @opt_param string targetUrl Only moments containing this targetUrl will be returned. 
  29. * @opt_param string type Only moments of this type will be returned. 
  30. * @return Google_MomentsFeed 
  31. */ 
  32. public function listMoments($userId, $collection, $optParams = array()) { 
  33. $params = array('userId' => $userId, 'collection' => $collection); 
  34. $params = array_merge($params, $optParams); 
  35. $data = $this->__call('list', array($params)); 
  36. if ($this->useObjects()) { 
  37. return new Google_MomentsFeed($data); 
  38. } else { 
  39. return $data; 
  40. /** 
  41. * Delete a moment. (moments.remove) 
  42. * @param string $id The ID of the moment to delete. 
  43. * @param array $optParams Optional parameters. 
  44. */ 
  45. public function remove($id, $optParams = array()) { 
  46. $params = array('id' => $id); 
  47. $params = array_merge($params, $optParams); 
  48. $data = $this->__call('remove', array($params)); 
  49. return $data;