Google_Service_YouTube_Videos_Resource

The "videos" collection of methods.

Defined (1)

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

/src/Google/Service/YouTube.php  
  1. class Google_Service_YouTube_Videos_Resource extends Google_Service_Resource 
  2.  
  3. /** 
  4. * Deletes a YouTube video. (videos.delete) 
  5. * @param string $id The id parameter specifies the YouTube video ID for the 
  6. * resource that is being deleted. In a video resource, the id property 
  7. * specifies the video's ID. 
  8. * @param array $optParams Optional parameters. 
  9. * @opt_param string onBehalfOfContentOwner Note: This parameter is intended 
  10. * exclusively for YouTube content partners. 
  11. * The onBehalfOfContentOwner parameter indicates that the request's 
  12. * authorization credentials identify a YouTube CMS user who is acting on behalf 
  13. * of the content owner specified in the parameter value. This parameter is 
  14. * intended for YouTube content partners that own and manage many different 
  15. * YouTube channels. It allows content owners to authenticate once and get 
  16. * access to all their video and channel data, without having to provide 
  17. * authentication credentials for each individual channel. The actual CMS 
  18. * account that the user authenticates with must be linked to the specified 
  19. * YouTube content owner. 
  20. */ 
  21. public function delete($id, $optParams = array()) 
  22. $params = array('id' => $id); 
  23. $params = array_merge($params, $optParams); 
  24. return $this->call('delete', array($params)); 
  25.  
  26. /** 
  27. * Retrieves the ratings that the authorized user gave to a list of specified 
  28. * videos. (videos.getRating) 
  29. * @param string $id The id parameter specifies a comma-separated list of the 
  30. * YouTube video ID(s) for the resource(s) for which you are retrieving rating 
  31. * data. In a video resource, the id property specifies the video's ID. 
  32. * @param array $optParams Optional parameters. 
  33. * @opt_param string onBehalfOfContentOwner Note: This parameter is intended 
  34. * exclusively for YouTube content partners. 
  35. * The onBehalfOfContentOwner parameter indicates that the request's 
  36. * authorization credentials identify a YouTube CMS user who is acting on behalf 
  37. * of the content owner specified in the parameter value. This parameter is 
  38. * intended for YouTube content partners that own and manage many different 
  39. * YouTube channels. It allows content owners to authenticate once and get 
  40. * access to all their video and channel data, without having to provide 
  41. * authentication credentials for each individual channel. The CMS account that 
  42. * the user authenticates with must be linked to the specified YouTube content 
  43. * owner. 
  44. * @return Google_Service_YouTube_VideoGetRatingResponse 
  45. */ 
  46. public function getRating($id, $optParams = array()) 
  47. $params = array('id' => $id); 
  48. $params = array_merge($params, $optParams); 
  49. return $this->call('getRating', array($params), "Google_Service_YouTube_VideoGetRatingResponse"); 
  50.  
  51. /** 
  52. * Uploads a video to YouTube and optionally sets the video's metadata. 
  53. * (videos.insert) 
  54. * @param string $part The part parameter serves two purposes in this operation. 
  55. * It identifies the properties that the write operation will set as well as the 
  56. * properties that the API response will include. 
  57. * The part names that you can include in the parameter value are snippet,  
  58. * contentDetails, fileDetails, liveStreamingDetails, player, processingDetails,  
  59. * recordingDetails, statistics, status, suggestions, and topicDetails. However,  
  60. * not all of those parts contain properties that can be set when setting or 
  61. * updating a video's metadata. For example, the statistics object encapsulates 
  62. * statistics that YouTube calculates for a video and does not contain values 
  63. * that you can set or modify. If the parameter value specifies a part that does 
  64. * not contain mutable values, that part will still be included in the API 
  65. * response. 
  66. * @param Google_Video $postBody 
  67. * @param array $optParams Optional parameters. 
  68. * @opt_param string onBehalfOfContentOwner Note: This parameter is intended 
  69. * exclusively for YouTube content partners. 
  70. * The onBehalfOfContentOwner parameter indicates that the request's 
  71. * authorization credentials identify a YouTube CMS user who is acting on behalf 
  72. * of the content owner specified in the parameter value. This parameter is 
  73. * intended for YouTube content partners that own and manage many different 
  74. * YouTube channels. It allows content owners to authenticate once and get 
  75. * access to all their video and channel data, without having to provide 
  76. * authentication credentials for each individual channel. The CMS account that 
  77. * the user authenticates with must be linked to the specified YouTube content 
  78. * owner. 
  79. * @opt_param bool stabilize The stabilize parameter indicates whether YouTube 
  80. * should adjust the video to remove shaky camera motions. 
  81. * @opt_param string onBehalfOfContentOwnerChannel This parameter can only be 
  82. * used in a properly authorized request. Note: This parameter is intended 
  83. * exclusively for YouTube content partners. 
  84. * The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID 
  85. * of the channel to which a video is being added. This parameter is required 
  86. * when a request specifies a value for the onBehalfOfContentOwner parameter,  
  87. * and it can only be used in conjunction with that parameter. In addition, the 
  88. * request must be authorized using a CMS account that is linked to the content 
  89. * owner that the onBehalfOfContentOwner parameter specifies. Finally, the 
  90. * channel that the onBehalfOfContentOwnerChannel parameter value specifies must 
  91. * be linked to the content owner that the onBehalfOfContentOwner parameter 
  92. * specifies. 
  93. * This parameter is intended for YouTube content partners that own and manage 
  94. * many different YouTube channels. It allows content owners to authenticate 
  95. * once and perform actions on behalf of the channel specified in the parameter 
  96. * value, without having to provide authentication credentials for each separate 
  97. * channel. 
  98. * @opt_param bool notifySubscribers The notifySubscribers parameter indicates 
  99. * whether YouTube should send notification to subscribers about the inserted 
  100. * video. 
  101. * @opt_param bool autoLevels The autoLevels parameter indicates whether YouTube 
  102. * should automatically enhance the video's lighting and color. 
  103. * @return Google_Service_YouTube_Video 
  104. */ 
  105. public function insert($part, Google_Service_YouTube_Video $postBody, $optParams = array()) 
  106. $params = array('part' => $part, 'postBody' => $postBody); 
  107. $params = array_merge($params, $optParams); 
  108. return $this->call('insert', array($params), "Google_Service_YouTube_Video"); 
  109.  
  110. /** 
  111. * Returns a list of videos that match the API request parameters. 
  112. * (videos.listVideos) 
  113. * @param string $part The part parameter specifies a comma-separated list of 
  114. * one or more video resource properties that the API response will include. The 
  115. * part names that you can include in the parameter value are id, snippet,  
  116. * contentDetails, fileDetails, liveStreamingDetails, player, processingDetails,  
  117. * recordingDetails, statistics, status, suggestions, and topicDetails. 
  118. * If the parameter identifies a property that contains child properties, the 
  119. * child properties will be included in the response. For example, in a video 
  120. * resource, the snippet property contains the channelId, title, description,  
  121. * tags, and categoryId properties. As such, if you set part=snippet, the API 
  122. * response will contain all of those properties. 
  123. * @param array $optParams Optional parameters. 
  124. * @opt_param string onBehalfOfContentOwner Note: This parameter is intended 
  125. * exclusively for YouTube content partners. 
  126. * The onBehalfOfContentOwner parameter indicates that the request's 
  127. * authorization credentials identify a YouTube CMS user who is acting on behalf 
  128. * of the content owner specified in the parameter value. This parameter is 
  129. * intended for YouTube content partners that own and manage many different 
  130. * YouTube channels. It allows content owners to authenticate once and get 
  131. * access to all their video and channel data, without having to provide 
  132. * authentication credentials for each individual channel. The CMS account that 
  133. * the user authenticates with must be linked to the specified YouTube content 
  134. * owner. 
  135. * @opt_param string regionCode The regionCode parameter instructs the API to 
  136. * select a video chart available in the specified region. This parameter can 
  137. * only be used in conjunction with the chart parameter. The parameter value is 
  138. * an ISO 3166-1 alpha-2 country code. 
  139. * @opt_param string locale DEPRECATED 
  140. * @opt_param string videoCategoryId The videoCategoryId parameter identifies 
  141. * the video category for which the chart should be retrieved. This parameter 
  142. * can only be used in conjunction with the chart parameter. By default, charts 
  143. * are not restricted to a particular category. 
  144. * @opt_param string chart The chart parameter identifies the chart that you 
  145. * want to retrieve. 
  146. * @opt_param string maxResults The maxResults parameter specifies the maximum 
  147. * number of items that should be returned in the result set. 
  148. * Note: This parameter is supported for use in conjunction with the myRating 
  149. * parameter, but it is not supported for use in conjunction with the id 
  150. * parameter. 
  151. * @opt_param string pageToken The pageToken parameter identifies a specific 
  152. * page in the result set that should be returned. In an API response, the 
  153. * nextPageToken and prevPageToken properties identify other pages that could be 
  154. * retrieved. 
  155. * Note: This parameter is supported for use in conjunction with the myRating 
  156. * parameter, but it is not supported for use in conjunction with the id 
  157. * parameter. 
  158. * @opt_param string myRating Set this parameter's value to like or dislike to 
  159. * instruct the API to only return videos liked or disliked by the authenticated 
  160. * user. 
  161. * @opt_param string id The id parameter specifies a comma-separated list of the 
  162. * YouTube video ID(s) for the resource(s) that are being retrieved. In a video 
  163. * resource, the id property specifies the video's ID. 
  164. * @return Google_Service_YouTube_VideoListResponse 
  165. */ 
  166. public function listVideos($part, $optParams = array()) 
  167. $params = array('part' => $part); 
  168. $params = array_merge($params, $optParams); 
  169. return $this->call('list', array($params), "Google_Service_YouTube_VideoListResponse"); 
  170.  
  171. /** 
  172. * Add a like or dislike rating to a video or remove a rating from a video. 
  173. * (videos.rate) 
  174. * @param string $id The id parameter specifies the YouTube video ID of the 
  175. * video that is being rated or having its rating removed. 
  176. * @param string $rating Specifies the rating to record. 
  177. * @param array $optParams Optional parameters. 
  178. * @opt_param string onBehalfOfContentOwner Note: This parameter is intended 
  179. * exclusively for YouTube content partners. 
  180. * The onBehalfOfContentOwner parameter indicates that the request's 
  181. * authorization credentials identify a YouTube CMS user who is acting on behalf 
  182. * of the content owner specified in the parameter value. This parameter is 
  183. * intended for YouTube content partners that own and manage many different 
  184. * YouTube channels. It allows content owners to authenticate once and get 
  185. * access to all their video and channel data, without having to provide 
  186. * authentication credentials for each individual channel. The CMS account that 
  187. * the user authenticates with must be linked to the specified YouTube content 
  188. * owner. 
  189. */ 
  190. public function rate($id, $rating, $optParams = array()) 
  191. $params = array('id' => $id, 'rating' => $rating); 
  192. $params = array_merge($params, $optParams); 
  193. return $this->call('rate', array($params)); 
  194.  
  195. /** 
  196. * Updates a video's metadata. (videos.update) 
  197. * @param string $part The part parameter serves two purposes in this operation. 
  198. * It identifies the properties that the write operation will set as well as the 
  199. * properties that the API response will include. 
  200. * The part names that you can include in the parameter value are snippet,  
  201. * contentDetails, fileDetails, liveStreamingDetails, player, processingDetails,  
  202. * recordingDetails, statistics, status, suggestions, and topicDetails. 
  203. * Note that this method will override the existing values for all of the 
  204. * mutable properties that are contained in any parts that the parameter value 
  205. * specifies. For example, a video's privacy setting is contained in the status 
  206. * part. As such, if your request is updating a private video, and the request's 
  207. * part parameter value includes the status part, the video's privacy setting 
  208. * will be updated to whatever value the request body specifies. If the request 
  209. * body does not specify a value, the existing privacy setting will be removed 
  210. * and the video will revert to the default privacy setting. 
  211. * In addition, not all of those parts contain properties that can be set when 
  212. * setting or updating a video's metadata. For example, the statistics object 
  213. * encapsulates statistics that YouTube calculates for a video and does not 
  214. * contain values that you can set or modify. If the parameter value specifies a 
  215. * part that does not contain mutable values, that part will still be included 
  216. * in the API response. 
  217. * @param Google_Video $postBody 
  218. * @param array $optParams Optional parameters. 
  219. * @opt_param string onBehalfOfContentOwner Note: This parameter is intended 
  220. * exclusively for YouTube content partners. 
  221. * The onBehalfOfContentOwner parameter indicates that the request's 
  222. * authorization credentials identify a YouTube CMS user who is acting on behalf 
  223. * of the content owner specified in the parameter value. This parameter is 
  224. * intended for YouTube content partners that own and manage many different 
  225. * YouTube channels. It allows content owners to authenticate once and get 
  226. * access to all their video and channel data, without having to provide 
  227. * authentication credentials for each individual channel. The actual CMS 
  228. * account that the user authenticates with must be linked to the specified 
  229. * YouTube content owner. 
  230. * @return Google_Service_YouTube_Video 
  231. */ 
  232. public function update($part, Google_Service_YouTube_Video $postBody, $optParams = array()) 
  233. $params = array('part' => $part, 'postBody' => $postBody); 
  234. $params = array_merge($params, $optParams); 
  235. return $this->call('update', array($params), "Google_Service_YouTube_Video");