Google_Service_YouTube_Activities_Resource

The "activities" collection of methods.

Defined (1)

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

/src/Google/Service/YouTube.php  
  1. class Google_Service_YouTube_Activities_Resource extends Google_Service_Resource 
  2.  
  3. /** 
  4. * Posts a bulletin for a specific channel. (The user submitting the request 
  5. * must be authorized to act on the channel's behalf.) 
  6. * Note: Even though an activity resource can contain information about actions 
  7. * like a user rating a video or marking a video as a favorite, you need to use 
  8. * other API methods to generate those activity resources. For example, you 
  9. * would use the API's videos.rate() method to rate a video and the 
  10. * playlistItems.insert() method to mark a video as a favorite. 
  11. * (activities.insert) 
  12. * @param string $part The part parameter serves two purposes in this operation. 
  13. * It identifies the properties that the write operation will set as well as the 
  14. * properties that the API response will include. 
  15. * The part names that you can include in the parameter value are snippet and 
  16. * contentDetails. 
  17. * @param Google_Activity $postBody 
  18. * @param array $optParams Optional parameters. 
  19. * @return Google_Service_YouTube_Activity 
  20. */ 
  21. public function insert($part, Google_Service_YouTube_Activity $postBody, $optParams = array()) 
  22. $params = array('part' => $part, 'postBody' => $postBody); 
  23. $params = array_merge($params, $optParams); 
  24. return $this->call('insert', array($params), "Google_Service_YouTube_Activity"); 
  25.  
  26. /** 
  27. * Returns a list of channel activity events that match the request criteria. 
  28. * For example, you can retrieve events associated with a particular channel,  
  29. * events associated with the user's subscriptions and Google+ friends, or the 
  30. * YouTube home page feed, which is customized for each user. 
  31. * (activities.listActivities) 
  32. * @param string $part The part parameter specifies a comma-separated list of 
  33. * one or more activity resource properties that the API response will include. 
  34. * The part names that you can include in the parameter value are id, snippet,  
  35. * and contentDetails. 
  36. * If the parameter identifies a property that contains child properties, the 
  37. * child properties will be included in the response. For example, in a activity 
  38. * resource, the snippet property contains other properties that identify the 
  39. * type of activity, a display title for the activity, and so forth. If you set 
  40. * part=snippet, the API response will also contain all of those nested 
  41. * properties. 
  42. * @param array $optParams Optional parameters. 
  43. * @opt_param string regionCode The regionCode parameter instructs the API to 
  44. * return results for the specified country. The parameter value is an ISO 
  45. * 3166-1 alpha-2 country code. YouTube uses this value when the authorized 
  46. * user's previous activity on YouTube does not provide enough information to 
  47. * generate the activity feed. 
  48. * @opt_param string publishedBefore The publishedBefore parameter specifies the 
  49. * date and time before which an activity must have occurred for that activity 
  50. * to be included in the API response. If the parameter value specifies a day,  
  51. * but not a time, then any activities that occurred that day will be excluded 
  52. * from the result set. The value is specified in ISO 8601 (YYYY-MM- 
  53. * DDThh:mm:ss.sZ) format. 
  54. * @opt_param string channelId The channelId parameter specifies a unique 
  55. * YouTube channel ID. The API will then return a list of that channel's 
  56. * activities. 
  57. * @opt_param bool mine Set this parameter's value to true to retrieve a feed of 
  58. * the authenticated user's activities. 
  59. * @opt_param string maxResults The maxResults parameter specifies the maximum 
  60. * number of items that should be returned in the result set. 
  61. * @opt_param string pageToken The pageToken parameter identifies a specific 
  62. * page in the result set that should be returned. In an API response, the 
  63. * nextPageToken and prevPageToken properties identify other pages that could be 
  64. * retrieved. 
  65. * @opt_param bool home Set this parameter's value to true to retrieve the 
  66. * activity feed that displays on the YouTube home page for the currently 
  67. * authenticated user. 
  68. * @opt_param string publishedAfter The publishedAfter parameter specifies the 
  69. * earliest date and time that an activity could have occurred for that activity 
  70. * to be included in the API response. If the parameter value specifies a day,  
  71. * but not a time, then any activities that occurred that day will be included 
  72. * in the result set. The value is specified in ISO 8601 (YYYY-MM- 
  73. * DDThh:mm:ss.sZ) format. 
  74. * @return Google_Service_YouTube_ActivityListResponse 
  75. */ 
  76. public function listActivities($part, $optParams = array()) 
  77. $params = array('part' => $part); 
  78. $params = array_merge($params, $optParams); 
  79. return $this->call('list', array($params), "Google_Service_YouTube_ActivityListResponse");