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
18namespace Google\Service\YouTube\Resource;
19
20use Google\Service\YouTube\ThumbnailSetResponse;
21
22/**
23 * The "thumbnails" collection of methods.
24 * Typical usage is:
25 *  <code>
26 *   $youtubeService = new Google\Service\YouTube(...);
27 *   $thumbnails = $youtubeService->thumbnails;
28 *  </code>
29 */
30class Thumbnails extends \Google\Service\Resource
31{
32  /**
33   * As this is not an insert in a strict sense (it supports uploading/setting of
34   * a thumbnail for multiple videos, which doesn't result in creation of a single
35   * resource), I use a custom verb here. (thumbnails.set)
36   *
37   * @param string $videoId Returns the Thumbnail with the given video IDs for
38   * Stubby or Apiary.
39   * @param array $optParams Optional parameters.
40   *
41   * @opt_param string onBehalfOfContentOwner *Note:* This parameter is intended
42   * exclusively for YouTube content partners. The *onBehalfOfContentOwner*
43   * parameter indicates that the request's authorization credentials identify a
44   * YouTube CMS user who is acting on behalf of the content owner specified in
45   * the parameter value. This parameter is intended for YouTube content partners
46   * that own and manage many different YouTube channels. It allows content owners
47   * to authenticate once and get access to all their video and channel data,
48   * without having to provide authentication credentials for each individual
49   * channel. The actual CMS account that the user authenticates with must be
50   * linked to the specified YouTube content owner.
51   * @return ThumbnailSetResponse
52   */
53  public function set($videoId, $optParams = [])
54  {
55    $params = ['videoId' => $videoId];
56    $params = array_merge($params, $optParams);
57    return $this->call('set', [$params], ThumbnailSetResponse::class);
58  }
59}
60
61// Adding a class alias for backwards compatibility with the previous class name.
62class_alias(Thumbnails::class, 'Google_Service_YouTube_Resource_Thumbnails');
63