[f9c482b] | 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;
|
---|
| 19 |
|
---|
| 20 | use Google\Client;
|
---|
| 21 |
|
---|
| 22 | /**
|
---|
| 23 | * Service definition for Slides (v1).
|
---|
| 24 | *
|
---|
| 25 | * <p>
|
---|
| 26 | * Reads and writes Google Slides presentations.</p>
|
---|
| 27 | *
|
---|
| 28 | * <p>
|
---|
| 29 | * For more information about this service, see the API
|
---|
| 30 | * <a href="https://developers.google.com/slides/" target="_blank">Documentation</a>
|
---|
| 31 | * </p>
|
---|
| 32 | *
|
---|
| 33 | * @author Google, Inc.
|
---|
| 34 | */
|
---|
| 35 | class Slides extends \Google\Service
|
---|
| 36 | {
|
---|
| 37 | /** See, edit, create, and delete all of your Google Drive files. */
|
---|
| 38 | const DRIVE =
|
---|
| 39 | "https://www.googleapis.com/auth/drive";
|
---|
| 40 | /** See, edit, create, and delete only the specific Google Drive files you use with this app. */
|
---|
| 41 | const DRIVE_FILE =
|
---|
| 42 | "https://www.googleapis.com/auth/drive.file";
|
---|
| 43 | /** See and download all your Google Drive files. */
|
---|
| 44 | const DRIVE_READONLY =
|
---|
| 45 | "https://www.googleapis.com/auth/drive.readonly";
|
---|
| 46 | /** See, edit, create, and delete all your Google Slides presentations. */
|
---|
| 47 | const PRESENTATIONS =
|
---|
| 48 | "https://www.googleapis.com/auth/presentations";
|
---|
| 49 | /** See all your Google Slides presentations. */
|
---|
| 50 | const PRESENTATIONS_READONLY =
|
---|
| 51 | "https://www.googleapis.com/auth/presentations.readonly";
|
---|
| 52 | /** See, edit, create, and delete all your Google Sheets spreadsheets. */
|
---|
| 53 | const SPREADSHEETS =
|
---|
| 54 | "https://www.googleapis.com/auth/spreadsheets";
|
---|
| 55 | /** See all your Google Sheets spreadsheets. */
|
---|
| 56 | const SPREADSHEETS_READONLY =
|
---|
| 57 | "https://www.googleapis.com/auth/spreadsheets.readonly";
|
---|
| 58 |
|
---|
| 59 | public $presentations;
|
---|
| 60 | public $presentations_pages;
|
---|
| 61 | public $rootUrlTemplate;
|
---|
| 62 |
|
---|
| 63 | /**
|
---|
| 64 | * Constructs the internal representation of the Slides service.
|
---|
| 65 | *
|
---|
| 66 | * @param Client|array $clientOrConfig The client used to deliver requests, or a
|
---|
| 67 | * config array to pass to a new Client instance.
|
---|
| 68 | * @param string $rootUrl The root URL used for requests to the service.
|
---|
| 69 | */
|
---|
| 70 | public function __construct($clientOrConfig = [], $rootUrl = null)
|
---|
| 71 | {
|
---|
| 72 | parent::__construct($clientOrConfig);
|
---|
| 73 | $this->rootUrl = $rootUrl ?: 'https://slides.googleapis.com/';
|
---|
| 74 | $this->rootUrlTemplate = $rootUrl ?: 'https://slides.UNIVERSE_DOMAIN/';
|
---|
| 75 | $this->servicePath = '';
|
---|
| 76 | $this->batchPath = 'batch';
|
---|
| 77 | $this->version = 'v1';
|
---|
| 78 | $this->serviceName = 'slides';
|
---|
| 79 |
|
---|
| 80 | $this->presentations = new Slides\Resource\Presentations(
|
---|
| 81 | $this,
|
---|
| 82 | $this->serviceName,
|
---|
| 83 | 'presentations',
|
---|
| 84 | [
|
---|
| 85 | 'methods' => [
|
---|
| 86 | 'batchUpdate' => [
|
---|
| 87 | 'path' => 'v1/presentations/{presentationId}:batchUpdate',
|
---|
| 88 | 'httpMethod' => 'POST',
|
---|
| 89 | 'parameters' => [
|
---|
| 90 | 'presentationId' => [
|
---|
| 91 | 'location' => 'path',
|
---|
| 92 | 'type' => 'string',
|
---|
| 93 | 'required' => true,
|
---|
| 94 | ],
|
---|
| 95 | ],
|
---|
| 96 | ],'create' => [
|
---|
| 97 | 'path' => 'v1/presentations',
|
---|
| 98 | 'httpMethod' => 'POST',
|
---|
| 99 | 'parameters' => [],
|
---|
| 100 | ],'get' => [
|
---|
| 101 | 'path' => 'v1/presentations/{+presentationId}',
|
---|
| 102 | 'httpMethod' => 'GET',
|
---|
| 103 | 'parameters' => [
|
---|
| 104 | 'presentationId' => [
|
---|
| 105 | 'location' => 'path',
|
---|
| 106 | 'type' => 'string',
|
---|
| 107 | 'required' => true,
|
---|
| 108 | ],
|
---|
| 109 | ],
|
---|
| 110 | ],
|
---|
| 111 | ]
|
---|
| 112 | ]
|
---|
| 113 | );
|
---|
| 114 | $this->presentations_pages = new Slides\Resource\PresentationsPages(
|
---|
| 115 | $this,
|
---|
| 116 | $this->serviceName,
|
---|
| 117 | 'pages',
|
---|
| 118 | [
|
---|
| 119 | 'methods' => [
|
---|
| 120 | 'get' => [
|
---|
| 121 | 'path' => 'v1/presentations/{presentationId}/pages/{pageObjectId}',
|
---|
| 122 | 'httpMethod' => 'GET',
|
---|
| 123 | 'parameters' => [
|
---|
| 124 | 'presentationId' => [
|
---|
| 125 | 'location' => 'path',
|
---|
| 126 | 'type' => 'string',
|
---|
| 127 | 'required' => true,
|
---|
| 128 | ],
|
---|
| 129 | 'pageObjectId' => [
|
---|
| 130 | 'location' => 'path',
|
---|
| 131 | 'type' => 'string',
|
---|
| 132 | 'required' => true,
|
---|
| 133 | ],
|
---|
| 134 | ],
|
---|
| 135 | ],'getThumbnail' => [
|
---|
| 136 | 'path' => 'v1/presentations/{presentationId}/pages/{pageObjectId}/thumbnail',
|
---|
| 137 | 'httpMethod' => 'GET',
|
---|
| 138 | 'parameters' => [
|
---|
| 139 | 'presentationId' => [
|
---|
| 140 | 'location' => 'path',
|
---|
| 141 | 'type' => 'string',
|
---|
| 142 | 'required' => true,
|
---|
| 143 | ],
|
---|
| 144 | 'pageObjectId' => [
|
---|
| 145 | 'location' => 'path',
|
---|
| 146 | 'type' => 'string',
|
---|
| 147 | 'required' => true,
|
---|
| 148 | ],
|
---|
| 149 | 'thumbnailProperties.mimeType' => [
|
---|
| 150 | 'location' => 'query',
|
---|
| 151 | 'type' => 'string',
|
---|
| 152 | ],
|
---|
| 153 | 'thumbnailProperties.thumbnailSize' => [
|
---|
| 154 | 'location' => 'query',
|
---|
| 155 | 'type' => 'string',
|
---|
| 156 | ],
|
---|
| 157 | ],
|
---|
| 158 | ],
|
---|
| 159 | ]
|
---|
| 160 | ]
|
---|
| 161 | );
|
---|
| 162 | }
|
---|
| 163 | }
|
---|
| 164 |
|
---|
| 165 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 166 | class_alias(Slides::class, 'Google_Service_Slides');
|
---|