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

https://gitlab.com/vangtrangbac123/zinkaiuit.tk · PHP · 190 lines · 28 code · 1 blank · 161 comment · 0 complexity · 7ae1360f287cf0e750a7ab4d3b9b94ea 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 "channelSections" collection of methods.
  19. * Typical usage is:
  20. * <code>
  21. * $youtubeService = new Google_Service_YouTube(...);
  22. * $channelSections = $youtubeService->channelSections;
  23. * </code>
  24. */
  25. class Google_Service_YouTube_Resource_ChannelSections extends Google_Service_Resource
  26. {
  27. /**
  28. * Deletes a channelSection. (channelSections.delete)
  29. *
  30. * @param string $id The id parameter specifies the YouTube channelSection ID
  31. * for the resource that is being deleted. In a channelSection resource, the id
  32. * property specifies the YouTube channelSection 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. * Adds a channelSection for the authenticated user's channel.
  56. * (channelSections.insert)
  57. *
  58. * @param string $part The part parameter serves two purposes in this operation.
  59. * It identifies the properties that the write operation will set as well as the
  60. * properties that the API response will include.
  61. *
  62. * The part names that you can include in the parameter value are snippet and
  63. * contentDetails.
  64. * @param Google_Service_YouTube_ChannelSection $postBody
  65. * @param array $optParams Optional parameters.
  66. *
  67. * @opt_param string onBehalfOfContentOwner Note: This parameter is intended
  68. * exclusively for YouTube content partners.
  69. *
  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 string onBehalfOfContentOwnerChannel This parameter can only be
  80. * used in a properly authorized request. Note: This parameter is intended
  81. * exclusively for YouTube content partners.
  82. *
  83. * The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID
  84. * of the channel to which a video is being added. This parameter is required
  85. * when a request specifies a value for the onBehalfOfContentOwner parameter,
  86. * and it can only be used in conjunction with that parameter. In addition, the
  87. * request must be authorized using a CMS account that is linked to the content
  88. * owner that the onBehalfOfContentOwner parameter specifies. Finally, the
  89. * channel that the onBehalfOfContentOwnerChannel parameter value specifies must
  90. * be linked to the content owner that the onBehalfOfContentOwner parameter
  91. * specifies.
  92. *
  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. * @return Google_Service_YouTube_ChannelSection
  99. */
  100. public function insert($part, Google_Service_YouTube_ChannelSection $postBody, $optParams = array())
  101. {
  102. $params = array('part' => $part, 'postBody' => $postBody);
  103. $params = array_merge($params, $optParams);
  104. return $this->call('insert', array($params), "Google_Service_YouTube_ChannelSection");
  105. }
  106. /**
  107. * Returns channelSection resources that match the API request criteria.
  108. * (channelSections.listChannelSections)
  109. *
  110. * @param string $part The part parameter specifies a comma-separated list of
  111. * one or more channelSection resource properties that the API response will
  112. * include. The part names that you can include in the parameter value are id,
  113. * snippet, and contentDetails.
  114. *
  115. * If the parameter identifies a property that contains child properties, the
  116. * child properties will be included in the response. For example, in a
  117. * channelSection resource, the snippet property contains other properties, such
  118. * as a display title for the channelSection. If you set part=snippet, the API
  119. * response will also contain all of those nested properties.
  120. * @param array $optParams Optional parameters.
  121. *
  122. * @opt_param string channelId The channelId parameter specifies a YouTube
  123. * channel ID. The API will only return that channel's channelSections.
  124. * @opt_param string hl The hl parameter indicates that the snippet.localized
  125. * property values in the returned channelSection resources should be in the
  126. * specified language if localized values for that language are available. For
  127. * example, if the API request specifies hl=de, the snippet.localized properties
  128. * in the API response will contain German titles if German titles are
  129. * available. Channel owners can provide localized channel section titles using
  130. * either the channelSections.insert or channelSections.update method.
  131. * @opt_param string id The id parameter specifies a comma-separated list of the
  132. * YouTube channelSection ID(s) for the resource(s) that are being retrieved. In
  133. * a channelSection resource, the id property specifies the YouTube
  134. * channelSection ID.
  135. * @opt_param bool mine Set this parameter's value to true to retrieve a feed of
  136. * the authenticated user's channelSections.
  137. * @opt_param string onBehalfOfContentOwner Note: This parameter is intended
  138. * exclusively for YouTube content partners.
  139. *
  140. * The onBehalfOfContentOwner parameter indicates that the request's
  141. * authorization credentials identify a YouTube CMS user who is acting on behalf
  142. * of the content owner specified in the parameter value. This parameter is
  143. * intended for YouTube content partners that own and manage many different
  144. * YouTube channels. It allows content owners to authenticate once and get
  145. * access to all their video and channel data, without having to provide
  146. * authentication credentials for each individual channel. The CMS account that
  147. * the user authenticates with must be linked to the specified YouTube content
  148. * owner.
  149. * @return Google_Service_YouTube_ChannelSectionListResponse
  150. */
  151. public function listChannelSections($part, $optParams = array())
  152. {
  153. $params = array('part' => $part);
  154. $params = array_merge($params, $optParams);
  155. return $this->call('list', array($params), "Google_Service_YouTube_ChannelSectionListResponse");
  156. }
  157. /**
  158. * Update a channelSection. (channelSections.update)
  159. *
  160. * @param string $part The part parameter serves two purposes in this operation.
  161. * It identifies the properties that the write operation will set as well as the
  162. * properties that the API response will include.
  163. *
  164. * The part names that you can include in the parameter value are snippet and
  165. * contentDetails.
  166. * @param Google_Service_YouTube_ChannelSection $postBody
  167. * @param array $optParams Optional parameters.
  168. *
  169. * @opt_param string onBehalfOfContentOwner Note: This parameter is intended
  170. * exclusively for YouTube content partners.
  171. *
  172. * The onBehalfOfContentOwner parameter indicates that the request's
  173. * authorization credentials identify a YouTube CMS user who is acting on behalf
  174. * of the content owner specified in the parameter value. This parameter is
  175. * intended for YouTube content partners that own and manage many different
  176. * YouTube channels. It allows content owners to authenticate once and get
  177. * access to all their video and channel data, without having to provide
  178. * authentication credentials for each individual channel. The CMS account that
  179. * the user authenticates with must be linked to the specified YouTube content
  180. * owner.
  181. * @return Google_Service_YouTube_ChannelSection
  182. */
  183. public function update($part, Google_Service_YouTube_ChannelSection $postBody, $optParams = array())
  184. {
  185. $params = array('part' => $part, 'postBody' => $postBody);
  186. $params = array_merge($params, $optParams);
  187. return $this->call('update', array($params), "Google_Service_YouTube_ChannelSection");
  188. }
  189. }