Google_Service_YouTube_Videos_Resource

The "videos" collection of methods.

Defined (1)

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

/includes/api-libs/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, localizations, player,  
  59. * processingDetails, recordingDetails, statistics, status, suggestions, and 
  60. * topicDetails. However, not all of those parts contain properties that can be 
  61. * set when setting or updating a video's metadata. For example, the statistics 
  62. * object encapsulates statistics that YouTube calculates for a video and does 
  63. * not contain values that you can set or modify. If the parameter value 
  64. * specifies a part that does not contain mutable values, that part will still 
  65. * be included in the API 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, localizations, player,  
  117. * processingDetails, recordingDetails, statistics, status, suggestions, and 
  118. * topicDetails. 
  119. * If the parameter identifies a property that contains child properties, the 
  120. * child properties will be included in the response. For example, in a video 
  121. * resource, the snippet property contains the channelId, title, description,  
  122. * tags, and categoryId properties. As such, if you set part=snippet, the API 
  123. * response will contain all of those properties. 
  124. * @param array $optParams Optional parameters. 
  125. * @opt_param string onBehalfOfContentOwner Note: This parameter is intended 
  126. * exclusively for YouTube content partners. 
  127. * The onBehalfOfContentOwner parameter indicates that the request's 
  128. * authorization credentials identify a YouTube CMS user who is acting on behalf 
  129. * of the content owner specified in the parameter value. This parameter is 
  130. * intended for YouTube content partners that own and manage many different 
  131. * YouTube channels. It allows content owners to authenticate once and get 
  132. * access to all their video and channel data, without having to provide 
  133. * authentication credentials for each individual channel. The CMS account that 
  134. * the user authenticates with must be linked to the specified YouTube content 
  135. * owner. 
  136. * @opt_param string regionCode The regionCode parameter instructs the API to 
  137. * select a video chart available in the specified region. This parameter can 
  138. * only be used in conjunction with the chart parameter. The parameter value is 
  139. * an ISO 3166-1 alpha-2 country code. 
  140. * @opt_param string locale DEPRECATED 
  141. * @opt_param string videoCategoryId The videoCategoryId parameter identifies 
  142. * the video category for which the chart should be retrieved. This parameter 
  143. * can only be used in conjunction with the chart parameter. By default, charts 
  144. * are not restricted to a particular category. 
  145. * @opt_param string chart The chart parameter identifies the chart that you 
  146. * want to retrieve. 
  147. * @opt_param string maxResults The maxResults parameter specifies the maximum 
  148. * number of items that should be returned in the result set. 
  149. * Note: This parameter is supported for use in conjunction with the myRating 
  150. * parameter, but it is not supported for use in conjunction with the id 
  151. * parameter. 
  152. * @opt_param string pageToken The pageToken parameter identifies a specific 
  153. * page in the result set that should be returned. In an API response, the 
  154. * nextPageToken and prevPageToken properties identify other pages that could be 
  155. * retrieved. 
  156. * Note: This parameter is supported for use in conjunction with the myRating 
  157. * parameter, but it is not supported for use in conjunction with the id 
  158. * parameter. 
  159. * @opt_param string hl The hl parameter instructs the API to return a localized 
  160. * version of the video details. If localized text is nor available for the 
  161. * requested language, the localizations object in the API response will contain 
  162. * the requested information in the default language instead. The parameter 
  163. * value is a BCP-47 language code. Your application can determine whether the 
  164. * requested localization was returned by checking the value of the 
  165. * snippet.localized.language property in the API response. 
  166. * @opt_param string myRating Set this parameter's value to like or dislike to 
  167. * instruct the API to only return videos liked or disliked by the authenticated 
  168. * user. 
  169. * @opt_param string id The id parameter specifies a comma-separated list of the 
  170. * YouTube video ID(s) for the resource(s) that are being retrieved. In a video 
  171. * resource, the id property specifies the video's ID. 
  172. * @return Google_Service_YouTube_VideoListResponse 
  173. */ 
  174. public function listVideos($part, $optParams = array()) 
  175. $params = array('part' => $part); 
  176. $params = array_merge($params, $optParams); 
  177. return $this->call('list', array($params), "Google_Service_YouTube_VideoListResponse"); 
  178.  
  179. /** 
  180. * Add a like or dislike rating to a video or remove a rating from a video. 
  181. * (videos.rate) 
  182. * @param string $id The id parameter specifies the YouTube video ID of the 
  183. * video that is being rated or having its rating removed. 
  184. * @param string $rating Specifies the rating to record. 
  185. * @param array $optParams Optional parameters. 
  186. * @opt_param string onBehalfOfContentOwner Note: This parameter is intended 
  187. * exclusively for YouTube content partners. 
  188. * The onBehalfOfContentOwner parameter indicates that the request's 
  189. * authorization credentials identify a YouTube CMS user who is acting on behalf 
  190. * of the content owner specified in the parameter value. This parameter is 
  191. * intended for YouTube content partners that own and manage many different 
  192. * YouTube channels. It allows content owners to authenticate once and get 
  193. * access to all their video and channel data, without having to provide 
  194. * authentication credentials for each individual channel. The CMS account that 
  195. * the user authenticates with must be linked to the specified YouTube content 
  196. * owner. 
  197. */ 
  198. public function rate($id, $rating, $optParams = array()) 
  199. $params = array('id' => $id, 'rating' => $rating); 
  200. $params = array_merge($params, $optParams); 
  201. return $this->call('rate', array($params)); 
  202.  
  203. /** 
  204. * Updates a video's metadata. (videos.update) 
  205. * @param string $part The part parameter serves two purposes in this operation. 
  206. * It identifies the properties that the write operation will set as well as the 
  207. * properties that the API response will include. 
  208. * The part names that you can include in the parameter value are snippet,  
  209. * contentDetails, fileDetails, liveStreamingDetails, localizations, player,  
  210. * processingDetails, recordingDetails, statistics, status, suggestions, and 
  211. * topicDetails. 
  212. * Note that this method will override the existing values for all of the 
  213. * mutable properties that are contained in any parts that the parameter value 
  214. * specifies. For example, a video's privacy setting is contained in the status 
  215. * part. As such, if your request is updating a private video, and the request's 
  216. * part parameter value includes the status part, the video's privacy setting 
  217. * will be updated to whatever value the request body specifies. If the request 
  218. * body does not specify a value, the existing privacy setting will be removed 
  219. * and the video will revert to the default privacy setting. 
  220. * In addition, not all of those parts contain properties that can be set when 
  221. * setting or updating a video's metadata. For example, the statistics object 
  222. * encapsulates statistics that YouTube calculates for a video and does not 
  223. * contain values that you can set or modify. If the parameter value specifies a 
  224. * part that does not contain mutable values, that part will still be included 
  225. * in the API response. 
  226. * @param Google_Video $postBody 
  227. * @param array $optParams Optional parameters. 
  228. * @opt_param string onBehalfOfContentOwner Note: This parameter is intended 
  229. * exclusively for YouTube content partners. 
  230. * The onBehalfOfContentOwner parameter indicates that the request's 
  231. * authorization credentials identify a YouTube CMS user who is acting on behalf 
  232. * of the content owner specified in the parameter value. This parameter is 
  233. * intended for YouTube content partners that own and manage many different 
  234. * YouTube channels. It allows content owners to authenticate once and get 
  235. * access to all their video and channel data, without having to provide 
  236. * authentication credentials for each individual channel. The actual CMS 
  237. * account that the user authenticates with must be linked to the specified 
  238. * YouTube content owner. 
  239. * @return Google_Service_YouTube_Video 
  240. */ 
  241. public function update($part, Google_Service_YouTube_Video $postBody, $optParams = array()) 
  242. $params = array('part' => $part, 'postBody' => $postBody); 
  243. $params = array_merge($params, $optParams); 
  244. return $this->call('update', array($params), "Google_Service_YouTube_Video");