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