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;
19
20use 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 */
35class 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
62  /**
63   * Constructs the internal representation of the Slides service.
64   *
65   * @param Client|array $clientOrConfig The client used to deliver requests, or a
66   *                                     config array to pass to a new Client instance.
67   * @param string $rootUrl The root URL used for requests to the service.
68   */
69  public function __construct($clientOrConfig = [], $rootUrl = null)
70  {
71    parent::__construct($clientOrConfig);
72    $this->rootUrl = $rootUrl ?: 'https://slides.googleapis.com/';
73    $this->servicePath = '';
74    $this->batchPath = 'batch';
75    $this->version = 'v1';
76    $this->serviceName = 'slides';
77
78    $this->presentations = new Slides\Resource\Presentations(
79        $this,
80        $this->serviceName,
81        'presentations',
82        [
83          'methods' => [
84            'batchUpdate' => [
85              'path' => 'v1/presentations/{presentationId}:batchUpdate',
86              'httpMethod' => 'POST',
87              'parameters' => [
88                'presentationId' => [
89                  'location' => 'path',
90                  'type' => 'string',
91                  'required' => true,
92                ],
93              ],
94            ],'create' => [
95              'path' => 'v1/presentations',
96              'httpMethod' => 'POST',
97              'parameters' => [],
98            ],'get' => [
99              'path' => 'v1/presentations/{+presentationId}',
100              'httpMethod' => 'GET',
101              'parameters' => [
102                'presentationId' => [
103                  'location' => 'path',
104                  'type' => 'string',
105                  'required' => true,
106                ],
107              ],
108            ],
109          ]
110        ]
111    );
112    $this->presentations_pages = new Slides\Resource\PresentationsPages(
113        $this,
114        $this->serviceName,
115        'pages',
116        [
117          'methods' => [
118            'get' => [
119              'path' => 'v1/presentations/{presentationId}/pages/{pageObjectId}',
120              'httpMethod' => 'GET',
121              'parameters' => [
122                'presentationId' => [
123                  'location' => 'path',
124                  'type' => 'string',
125                  'required' => true,
126                ],
127                'pageObjectId' => [
128                  'location' => 'path',
129                  'type' => 'string',
130                  'required' => true,
131                ],
132              ],
133            ],'getThumbnail' => [
134              'path' => 'v1/presentations/{presentationId}/pages/{pageObjectId}/thumbnail',
135              'httpMethod' => 'GET',
136              'parameters' => [
137                'presentationId' => [
138                  'location' => 'path',
139                  'type' => 'string',
140                  'required' => true,
141                ],
142                'pageObjectId' => [
143                  'location' => 'path',
144                  'type' => 'string',
145                  'required' => true,
146                ],
147                'thumbnailProperties.mimeType' => [
148                  'location' => 'query',
149                  'type' => 'string',
150                ],
151                'thumbnailProperties.thumbnailSize' => [
152                  'location' => 'query',
153                  'type' => 'string',
154                ],
155              ],
156            ],
157          ]
158        ]
159    );
160  }
161}
162
163// Adding a class alias for backwards compatibility with the previous class name.
164class_alias(Slides::class, 'Google_Service_Slides');
165