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