PageRenderTime 42ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

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

https://gitlab.com/efabian/maya
PHP | 185 lines | 28 code | 1 blank | 156 comment | 0 complexity | 40a527dcc687efe5162d4199a4f00d63 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 resource. (playlists.delete)
  29. *
  30. * @param string $id
  31. * @param array $optParams Optional parameters.
  32. *
  33. * @opt_param string onBehalfOfContentOwner Note: This parameter is intended
  34. * exclusively for YouTube content partners.The onBehalfOfContentOwner parameter
  35. * indicates that the request's authorization credentials identify a YouTube CMS
  36. * user who is acting on behalf of the content owner specified in the parameter
  37. * value. This parameter is intended for YouTube content partners that own and
  38. * manage many different YouTube channels. It allows content owners to
  39. * authenticate once and get access to all their video and channel data, without
  40. * having to provide authentication credentials for each individual channel. The
  41. * CMS account that the user authenticates with must be linked to the specified
  42. * YouTube content owner.
  43. */
  44. public function delete($id, $optParams = array())
  45. {
  46. $params = array('id' => $id);
  47. $params = array_merge($params, $optParams);
  48. return $this->call('delete', array($params));
  49. }
  50. /**
  51. * Inserts a new resource into this collection. (playlists.insert)
  52. *
  53. * @param string|array $part The part parameter serves two purposes in this
  54. * operation. It identifies the properties that the write operation will set as
  55. * well as the properties that the API response will include.
  56. * @param Google_Service_YouTube_Playlist $postBody
  57. * @param array $optParams Optional parameters.
  58. *
  59. * @opt_param string onBehalfOfContentOwner Note: This parameter is intended
  60. * exclusively for YouTube content partners.The onBehalfOfContentOwner parameter
  61. * indicates that the request's authorization credentials identify a YouTube CMS
  62. * user who is acting on behalf of the content owner specified in the parameter
  63. * value. This parameter is intended for YouTube content partners that own and
  64. * manage many different YouTube channels. It allows content owners to
  65. * authenticate once and get access to all their video and channel data, without
  66. * having to provide authentication credentials for each individual channel. The
  67. * CMS account that the user authenticates with must be linked to the specified
  68. * YouTube content owner.
  69. * @opt_param string onBehalfOfContentOwnerChannel This parameter can only be
  70. * used in a properly authorized request. Note: This parameter is intended
  71. * exclusively for YouTube content partners.The onBehalfOfContentOwnerChannel
  72. * parameter specifies the YouTube channel ID of the channel to which a video is
  73. * being added. This parameter is required when a request specifies a value for
  74. * the onBehalfOfContentOwner parameter, and it can only be used in conjunction
  75. * with that parameter. In addition, the request must be authorized using a CMS
  76. * account that is linked to the content owner that the onBehalfOfContentOwner
  77. * parameter specifies. Finally, the channel that the
  78. * onBehalfOfContentOwnerChannel parameter value specifies must be linked to the
  79. * content owner that the onBehalfOfContentOwner parameter specifies.This
  80. * parameter is intended for YouTube content partners that own and manage many
  81. * different YouTube channels. It allows content owners to authenticate once and
  82. * perform actions on behalf of the channel specified in the parameter value,
  83. * without having to provide authentication credentials for each separate
  84. * channel.
  85. * @return Google_Service_YouTube_Playlist
  86. */
  87. public function insert($part, Google_Service_YouTube_Playlist $postBody, $optParams = array())
  88. {
  89. $params = array('part' => $part, 'postBody' => $postBody);
  90. $params = array_merge($params, $optParams);
  91. return $this->call('insert', array($params), "Google_Service_YouTube_Playlist");
  92. }
  93. /**
  94. * Retrieves a list of resources, possibly filtered. (playlists.listPlaylists)
  95. *
  96. * @param string|array $part The part parameter specifies a comma-separated list
  97. * of one or more playlist resource properties that the API response will
  98. * include.If the parameter identifies a property that contains child
  99. * properties, the child properties will be included in the response. For
  100. * example, in a playlist resource, the snippet property contains properties
  101. * like author, title, description, tags, and timeCreated. As such, if you set
  102. * part=snippet, the API response will contain all of those properties.
  103. * @param array $optParams Optional parameters.
  104. *
  105. * @opt_param string id Return the playlists with the given IDs for Stubby or
  106. * Apiary.
  107. * @opt_param string onBehalfOfContentOwner Note: This parameter is intended
  108. * exclusively for YouTube content partners.The onBehalfOfContentOwner parameter
  109. * indicates that the request's authorization credentials identify a YouTube CMS
  110. * user who is acting on behalf of the content owner specified in the parameter
  111. * value. This parameter is intended for YouTube content partners that own and
  112. * manage many different YouTube channels. It allows content owners to
  113. * authenticate once and get access to all their video and channel data, without
  114. * having to provide authentication credentials for each individual channel. The
  115. * CMS account that the user authenticates with must be linked to the specified
  116. * YouTube content owner.
  117. * @opt_param string maxResults The maxResults parameter specifies the maximum
  118. * number of items that should be returned in the result set.
  119. * @opt_param string channelId Return the playlists owned by the specified
  120. * channel ID.
  121. * @opt_param string pageToken The pageToken parameter identifies a specific
  122. * page in the result set that should be returned. In an API response, the
  123. * nextPageToken and prevPageToken properties identify other pages that could be
  124. * retrieved.
  125. * @opt_param string onBehalfOfContentOwnerChannel This parameter can only be
  126. * used in a properly authorized request. Note: This parameter is intended
  127. * exclusively for YouTube content partners.The onBehalfOfContentOwnerChannel
  128. * parameter specifies the YouTube channel ID of the channel to which a video is
  129. * being added. This parameter is required when a request specifies a value for
  130. * the onBehalfOfContentOwner parameter, and it can only be used in conjunction
  131. * with that parameter. In addition, the request must be authorized using a CMS
  132. * account that is linked to the content owner that the onBehalfOfContentOwner
  133. * parameter specifies. Finally, the channel that the
  134. * onBehalfOfContentOwnerChannel parameter value specifies must be linked to the
  135. * content owner that the onBehalfOfContentOwner parameter specifies.This
  136. * parameter is intended for YouTube content partners that own and manage many
  137. * different YouTube channels. It allows content owners to authenticate once and
  138. * perform actions on behalf of the channel specified in the parameter value,
  139. * without having to provide authentication credentials for each separate
  140. * channel.
  141. * @opt_param string hl Returen content in specified language
  142. * @opt_param bool mine Return the playlists owned by the authenticated user.
  143. * @return Google_Service_YouTube_PlaylistListResponse
  144. */
  145. public function listPlaylists($part, $optParams = array())
  146. {
  147. $params = array('part' => $part);
  148. $params = array_merge($params, $optParams);
  149. return $this->call('list', array($params), "Google_Service_YouTube_PlaylistListResponse");
  150. }
  151. /**
  152. * Updates an existing resource. (playlists.update)
  153. *
  154. * @param string|array $part The part parameter serves two purposes in this
  155. * operation. It identifies the properties that the write operation will set as
  156. * well as the properties that the API response will include.Note that this
  157. * method will override the existing values for mutable properties that are
  158. * contained in any parts that the request body specifies. For example, a
  159. * playlist's description is contained in the snippet part, which must be
  160. * included in the request body. If the request does not specify a value for the
  161. * snippet.description property, the playlist's existing description will be
  162. * deleted.
  163. * @param Google_Service_YouTube_Playlist $postBody
  164. * @param array $optParams Optional parameters.
  165. *
  166. * @opt_param string onBehalfOfContentOwner Note: This parameter is intended
  167. * exclusively for YouTube content partners.The onBehalfOfContentOwner parameter
  168. * indicates that the request's authorization credentials identify a YouTube CMS
  169. * user who is acting on behalf of the content owner specified in the parameter
  170. * value. This parameter is intended for YouTube content partners that own and
  171. * manage many different YouTube channels. It allows content owners to
  172. * authenticate once and get access to all their video and channel data, without
  173. * having to provide authentication credentials for each individual channel. The
  174. * CMS account that the user authenticates with must be linked to the specified
  175. * YouTube content owner.
  176. * @return Google_Service_YouTube_Playlist
  177. */
  178. public function update($part, Google_Service_YouTube_Playlist $postBody, $optParams = array())
  179. {
  180. $params = array('part' => $part, 'postBody' => $postBody);
  181. $params = array_merge($params, $optParams);
  182. return $this->call('update', array($params), "Google_Service_YouTube_Playlist");
  183. }
  184. }