PageRenderTime 21ms CodeModel.GetById 13ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

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