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 Docs (v1).
20 *
21 * <p>
22 * Reads and writes Google Docs documents.</p>
23 *
24 * <p>
25 * For more information about this service, see the API
26 * <a href="https://developers.google.com/docs/" target="_blank">Documentation</a>
27 * </p>
28 *
29 * @author Google, Inc.
30 */
31class Google_Service_Docs extends Google_Service
32{
33  /** View and manage your Google Docs documents. */
34  const DOCUMENTS =
35      "https://www.googleapis.com/auth/documents";
36  /** View your Google Docs documents. */
37  const DOCUMENTS_READONLY =
38      "https://www.googleapis.com/auth/documents.readonly";
39  /** See, edit, create, and delete all of your Google Drive files. */
40  const DRIVE =
41      "https://www.googleapis.com/auth/drive";
42  /** View and manage Google Drive files and folders that you have opened or created with this app. */
43  const DRIVE_FILE =
44      "https://www.googleapis.com/auth/drive.file";
45  /** See and download all your Google Drive files. */
46  const DRIVE_READONLY =
47      "https://www.googleapis.com/auth/drive.readonly";
48
49  public $documents;
50
51  /**
52   * Constructs the internal representation of the Docs service.
53   *
54   * @param Google_Client $client
55   */
56  public function __construct(Google_Client $client)
57  {
58    parent::__construct($client);
59    $this->rootUrl = 'https://docs.googleapis.com/';
60    $this->servicePath = '';
61    $this->batchPath = 'batch';
62    $this->version = 'v1';
63    $this->serviceName = 'docs';
64
65    $this->documents = new Google_Service_Docs_Resource_Documents(
66        $this,
67        $this->serviceName,
68        'documents',
69        array(
70          'methods' => array(
71            'batchUpdate' => array(
72              'path' => 'v1/documents/{documentId}:batchUpdate',
73              'httpMethod' => 'POST',
74              'parameters' => array(
75                'documentId' => array(
76                  'location' => 'path',
77                  'type' => 'string',
78                  'required' => true,
79                ),
80              ),
81            ),'create' => array(
82              'path' => 'v1/documents',
83              'httpMethod' => 'POST',
84              'parameters' => array(),
85            ),'get' => array(
86              'path' => 'v1/documents/{documentId}',
87              'httpMethod' => 'GET',
88              'parameters' => array(
89                'documentId' => array(
90                  'location' => 'path',
91                  'type' => 'string',
92                  'required' => true,
93                ),
94                'suggestionsViewMode' => array(
95                  'location' => 'query',
96                  'type' => 'string',
97                ),
98              ),
99            ),
100          )
101        )
102    );
103  }
104}
105