/library/Google/vendor/google/apiclient-services/src/Google/Service/YouTube/Resource/Playlists.php

https://gitlab.com/vangtrangbac123/zinkaiuit.tk · PHP · 211 lines · 28 code · 1 blank · 182 comment · 0 complexity · e26a39bd6a60f2af30fa9e0a6e411dff MD5 · raw file

  1. <?php
  2. /*
  3. * Copyright 2014 Google Inc.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  6. * use this file except in compliance with the License. You may obtain a copy of
  7. * the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  13. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  14. * License for the specific language governing permissions and limitations under
  15. * the License.
  16. */
  17. /**
  18. * The "playlists" collection of methods.
  19. * Typical usage is:
  20. * <code>
  21. * $youtubeService = new Google_Service_YouTube(...);
  22. * $playlists = $youtubeService->playlists;
  23. * </code>
  24. */
  25. class Google_Service_YouTube_Resource_Playlists extends Google_Service_Resource
  26. {
  27. /**
  28. * Deletes a playlist. (playlists.delete)
  29. *
  30. * @param string $id The id parameter specifies the YouTube playlist ID for the
  31. * playlist that is being deleted. In a playlist resource, the id property
  32. * specifies the playlist's ID.
  33. * @param array $optParams Optional parameters.
  34. *
  35. * @opt_param string onBehalfOfContentOwner Note: This parameter is intended
  36. * exclusively for YouTube content partners.
  37. *
  38. * The onBehalfOfContentOwner parameter indicates that the request's
  39. * authorization credentials identify a YouTube CMS user who is acting on behalf
  40. * of the content owner specified in the parameter value. This parameter is
  41. * intended for YouTube content partners that own and manage many different
  42. * YouTube channels. It allows content owners to authenticate once and get
  43. * access to all their video and channel data, without having to provide
  44. * authentication credentials for each individual channel. The CMS account that
  45. * the user authenticates with must be linked to the specified YouTube content
  46. * owner.
  47. */
  48. public function delete($id, $optParams = array())
  49. {
  50. $params = array('id' => $id);
  51. $params = array_merge($params, $optParams);
  52. return $this->call('delete', array($params));
  53. }
  54. /**
  55. * Creates a playlist. (playlists.insert)
  56. *
  57. * @param string $part The part parameter serves two purposes in this operation.
  58. * It identifies the properties that the write operation will set as well as the
  59. * properties that the API response will include.
  60. * @param Google_Service_YouTube_Playlist $postBody
  61. * @param array $optParams Optional parameters.
  62. *
  63. * @opt_param string onBehalfOfContentOwner Note: This parameter is intended
  64. * exclusively for YouTube content partners.
  65. *
  66. * The onBehalfOfContentOwner parameter indicates that the request's
  67. * authorization credentials identify a YouTube CMS user who is acting on behalf
  68. * of the content owner specified in the parameter value. This parameter is
  69. * intended for YouTube content partners that own and manage many different
  70. * YouTube channels. It allows content owners to authenticate once and get
  71. * access to all their video and channel data, without having to provide
  72. * authentication credentials for each individual channel. The CMS account that
  73. * the user authenticates with must be linked to the specified YouTube content
  74. * owner.
  75. * @opt_param string onBehalfOfContentOwnerChannel This parameter can only be
  76. * used in a properly authorized request. Note: This parameter is intended
  77. * exclusively for YouTube content partners.
  78. *
  79. * The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID
  80. * of the channel to which a video is being added. This parameter is required
  81. * when a request specifies a value for the onBehalfOfContentOwner parameter,
  82. * and it can only be used in conjunction with that parameter. In addition, the
  83. * request must be authorized using a CMS account that is linked to the content
  84. * owner that the onBehalfOfContentOwner parameter specifies. Finally, the
  85. * channel that the onBehalfOfContentOwnerChannel parameter value specifies must
  86. * be linked to the content owner that the onBehalfOfContentOwner parameter
  87. * specifies.
  88. *
  89. * This parameter is intended for YouTube content partners that own and manage
  90. * many different YouTube channels. It allows content owners to authenticate
  91. * once and perform actions on behalf of the channel specified in the parameter
  92. * value, without having to provide authentication credentials for each separate
  93. * channel.
  94. * @return Google_Service_YouTube_Playlist
  95. */
  96. public function insert($part, Google_Service_YouTube_Playlist $postBody, $optParams = array())
  97. {
  98. $params = array('part' => $part, 'postBody' => $postBody);
  99. $params = array_merge($params, $optParams);
  100. return $this->call('insert', array($params), "Google_Service_YouTube_Playlist");
  101. }
  102. /**
  103. * Returns a collection of playlists that match the API request parameters. For
  104. * example, you can retrieve all playlists that the authenticated user owns, or
  105. * you can retrieve one or more playlists by their unique IDs.
  106. * (playlists.listPlaylists)
  107. *
  108. * @param string $part The part parameter specifies a comma-separated list of
  109. * one or more playlist resource properties that the API response will include.
  110. *
  111. * If the parameter identifies a property that contains child properties, the
  112. * child properties will be included in the response. For example, in a playlist
  113. * resource, the snippet property contains properties like author, title,
  114. * description, tags, and timeCreated. As such, if you set part=snippet, the API
  115. * response will contain all of those properties.
  116. * @param array $optParams Optional parameters.
  117. *
  118. * @opt_param string channelId This value indicates that the API should only
  119. * return the specified channel's playlists.
  120. * @opt_param string hl The hl parameter should be used for filter out the
  121. * properties that are not in the given language. Used for the snippet part.
  122. * @opt_param string id The id parameter specifies a comma-separated list of the
  123. * YouTube playlist ID(s) for the resource(s) that are being retrieved. In a
  124. * playlist resource, the id property specifies the playlist's YouTube playlist
  125. * ID.
  126. * @opt_param string maxResults The maxResults parameter specifies the maximum
  127. * number of items that should be returned in the result set.
  128. * @opt_param bool mine Set this parameter's value to true to instruct the API
  129. * to only return playlists owned by the authenticated user.
  130. * @opt_param string onBehalfOfContentOwner Note: This parameter is intended
  131. * exclusively for YouTube content partners.
  132. *
  133. * The onBehalfOfContentOwner parameter indicates that the request's
  134. * authorization credentials identify a YouTube CMS user who is acting on behalf
  135. * of the content owner specified in the parameter value. This parameter is
  136. * intended for YouTube content partners that own and manage many different
  137. * YouTube channels. It allows content owners to authenticate once and get
  138. * access to all their video and channel data, without having to provide
  139. * authentication credentials for each individual channel. The CMS account that
  140. * the user authenticates with must be linked to the specified YouTube content
  141. * owner.
  142. * @opt_param string onBehalfOfContentOwnerChannel This parameter can only be
  143. * used in a properly authorized request. Note: This parameter is intended
  144. * exclusively for YouTube content partners.
  145. *
  146. * The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID
  147. * of the channel to which a video is being added. This parameter is required
  148. * when a request specifies a value for the onBehalfOfContentOwner parameter,
  149. * and it can only be used in conjunction with that parameter. In addition, the
  150. * request must be authorized using a CMS account that is linked to the content
  151. * owner that the onBehalfOfContentOwner parameter specifies. Finally, the
  152. * channel that the onBehalfOfContentOwnerChannel parameter value specifies must
  153. * be linked to the content owner that the onBehalfOfContentOwner parameter
  154. * specifies.
  155. *
  156. * This parameter is intended for YouTube content partners that own and manage
  157. * many different YouTube channels. It allows content owners to authenticate
  158. * once and perform actions on behalf of the channel specified in the parameter
  159. * value, without having to provide authentication credentials for each separate
  160. * channel.
  161. * @opt_param string pageToken The pageToken parameter identifies a specific
  162. * page in the result set that should be returned. In an API response, the
  163. * nextPageToken and prevPageToken properties identify other pages that could be
  164. * retrieved.
  165. * @return Google_Service_YouTube_PlaylistListResponse
  166. */
  167. public function listPlaylists($part, $optParams = array())
  168. {
  169. $params = array('part' => $part);
  170. $params = array_merge($params, $optParams);
  171. return $this->call('list', array($params), "Google_Service_YouTube_PlaylistListResponse");
  172. }
  173. /**
  174. * Modifies a playlist. For example, you could change a playlist's title,
  175. * description, or privacy status. (playlists.update)
  176. *
  177. * @param string $part The part parameter serves two purposes in this operation.
  178. * It identifies the properties that the write operation will set as well as the
  179. * properties that the API response will include.
  180. *
  181. * Note that this method will override the existing values for mutable
  182. * properties that are contained in any parts that the request body specifies.
  183. * For example, a playlist's description is contained in the snippet part, which
  184. * must be included in the request body. If the request does not specify a value
  185. * for the snippet.description property, the playlist's existing description
  186. * will be deleted.
  187. * @param Google_Service_YouTube_Playlist $postBody
  188. * @param array $optParams Optional parameters.
  189. *
  190. * @opt_param string onBehalfOfContentOwner Note: This parameter is intended
  191. * exclusively for YouTube content partners.
  192. *
  193. * The onBehalfOfContentOwner parameter indicates that the request's
  194. * authorization credentials identify a YouTube CMS user who is acting on behalf
  195. * of the content owner specified in the parameter value. This parameter is
  196. * intended for YouTube content partners that own and manage many different
  197. * YouTube channels. It allows content owners to authenticate once and get
  198. * access to all their video and channel data, without having to provide
  199. * authentication credentials for each individual channel. The CMS account that
  200. * the user authenticates with must be linked to the specified YouTube content
  201. * owner.
  202. * @return Google_Service_YouTube_Playlist
  203. */
  204. public function update($part, Google_Service_YouTube_Playlist $postBody, $optParams = array())
  205. {
  206. $params = array('part' => $part, 'postBody' => $postBody);
  207. $params = array_merge($params, $optParams);
  208. return $this->call('update', array($params), "Google_Service_YouTube_Playlist");
  209. }
  210. }