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\Slides\Resource;
19
20use Google\Service\Slides\Page;
21use Google\Service\Slides\Thumbnail;
22
23/**
24 * The "pages" collection of methods.
25 * Typical usage is:
26 *  <code>
27 *   $slidesService = new Google\Service\Slides(...);
28 *   $pages = $slidesService->pages;
29 *  </code>
30 */
31class PresentationsPages extends \Google\Service\Resource
32{
33  /**
34   * Gets the latest version of the specified page in the presentation.
35   * (pages.get)
36   *
37   * @param string $presentationId The ID of the presentation to retrieve.
38   * @param string $pageObjectId The object ID of the page to retrieve.
39   * @param array $optParams Optional parameters.
40   * @return Page
41   */
42  public function get($presentationId, $pageObjectId, $optParams = [])
43  {
44    $params = ['presentationId' => $presentationId, 'pageObjectId' => $pageObjectId];
45    $params = array_merge($params, $optParams);
46    return $this->call('get', [$params], Page::class);
47  }
48  /**
49   * Generates a thumbnail of the latest version of the specified page in the
50   * presentation and returns a URL to the thumbnail image. This request counts as
51   * an [expensive read request](/slides/limits) for quota purposes.
52   * (pages.getThumbnail)
53   *
54   * @param string $presentationId The ID of the presentation to retrieve.
55   * @param string $pageObjectId The object ID of the page whose thumbnail to
56   * retrieve.
57   * @param array $optParams Optional parameters.
58   *
59   * @opt_param string thumbnailProperties.mimeType The optional mime type of the
60   * thumbnail image. If you don't specify the mime type, the mime type defaults
61   * to PNG.
62   * @opt_param string thumbnailProperties.thumbnailSize The optional thumbnail
63   * image size. If you don't specify the size, the server chooses a default size
64   * of the image.
65   * @return Thumbnail
66   */
67  public function getThumbnail($presentationId, $pageObjectId, $optParams = [])
68  {
69    $params = ['presentationId' => $presentationId, 'pageObjectId' => $pageObjectId];
70    $params = array_merge($params, $optParams);
71    return $this->call('getThumbnail', [$params], Thumbnail::class);
72  }
73}
74
75// Adding a class alias for backwards compatibility with the previous class name.
76class_alias(PresentationsPages::class, 'Google_Service_Slides_Resource_PresentationsPages');
77