[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;
|
---|
| 19 |
|
---|
| 20 | use Google\Client;
|
---|
| 21 |
|
---|
| 22 | /**
|
---|
| 23 | * Service definition for Docs (v1).
|
---|
| 24 | *
|
---|
| 25 | * <p>
|
---|
| 26 | * Reads and writes Google Docs documents.</p>
|
---|
| 27 | *
|
---|
| 28 | * <p>
|
---|
| 29 | * For more information about this service, see the API
|
---|
| 30 | * <a href="https://developers.google.com/docs/" target="_blank">Documentation</a>
|
---|
| 31 | * </p>
|
---|
| 32 | *
|
---|
| 33 | * @author Google, Inc.
|
---|
| 34 | */
|
---|
| 35 | class Docs extends \Google\Service
|
---|
| 36 | {
|
---|
| 37 | /** See, edit, create, and delete all your Google Docs documents. */
|
---|
| 38 | const DOCUMENTS =
|
---|
| 39 | "https://www.googleapis.com/auth/documents";
|
---|
| 40 | /** See all your Google Docs documents. */
|
---|
| 41 | const DOCUMENTS_READONLY =
|
---|
| 42 | "https://www.googleapis.com/auth/documents.readonly";
|
---|
| 43 | /** See, edit, create, and delete all of your Google Drive files. */
|
---|
| 44 | const DRIVE =
|
---|
| 45 | "https://www.googleapis.com/auth/drive";
|
---|
| 46 | /** See, edit, create, and delete only the specific Google Drive files you use with this app. */
|
---|
| 47 | const DRIVE_FILE =
|
---|
| 48 | "https://www.googleapis.com/auth/drive.file";
|
---|
| 49 | /** See and download all your Google Drive files. */
|
---|
| 50 | const DRIVE_READONLY =
|
---|
| 51 | "https://www.googleapis.com/auth/drive.readonly";
|
---|
| 52 |
|
---|
| 53 | public $documents;
|
---|
| 54 | public $rootUrlTemplate;
|
---|
| 55 |
|
---|
| 56 | /**
|
---|
| 57 | * Constructs the internal representation of the Docs service.
|
---|
| 58 | *
|
---|
| 59 | * @param Client|array $clientOrConfig The client used to deliver requests, or a
|
---|
| 60 | * config array to pass to a new Client instance.
|
---|
| 61 | * @param string $rootUrl The root URL used for requests to the service.
|
---|
| 62 | */
|
---|
| 63 | public function __construct($clientOrConfig = [], $rootUrl = null)
|
---|
| 64 | {
|
---|
| 65 | parent::__construct($clientOrConfig);
|
---|
| 66 | $this->rootUrl = $rootUrl ?: 'https://docs.googleapis.com/';
|
---|
| 67 | $this->rootUrlTemplate = $rootUrl ?: 'https://docs.UNIVERSE_DOMAIN/';
|
---|
| 68 | $this->servicePath = '';
|
---|
| 69 | $this->batchPath = 'batch';
|
---|
| 70 | $this->version = 'v1';
|
---|
| 71 | $this->serviceName = 'docs';
|
---|
| 72 |
|
---|
| 73 | $this->documents = new Docs\Resource\Documents(
|
---|
| 74 | $this,
|
---|
| 75 | $this->serviceName,
|
---|
| 76 | 'documents',
|
---|
| 77 | [
|
---|
| 78 | 'methods' => [
|
---|
| 79 | 'batchUpdate' => [
|
---|
| 80 | 'path' => 'v1/documents/{documentId}:batchUpdate',
|
---|
| 81 | 'httpMethod' => 'POST',
|
---|
| 82 | 'parameters' => [
|
---|
| 83 | 'documentId' => [
|
---|
| 84 | 'location' => 'path',
|
---|
| 85 | 'type' => 'string',
|
---|
| 86 | 'required' => true,
|
---|
| 87 | ],
|
---|
| 88 | ],
|
---|
| 89 | ],'create' => [
|
---|
| 90 | 'path' => 'v1/documents',
|
---|
| 91 | 'httpMethod' => 'POST',
|
---|
| 92 | 'parameters' => [],
|
---|
| 93 | ],'get' => [
|
---|
| 94 | 'path' => 'v1/documents/{documentId}',
|
---|
| 95 | 'httpMethod' => 'GET',
|
---|
| 96 | 'parameters' => [
|
---|
| 97 | 'documentId' => [
|
---|
| 98 | 'location' => 'path',
|
---|
| 99 | 'type' => 'string',
|
---|
| 100 | 'required' => true,
|
---|
| 101 | ],
|
---|
| 102 | 'includeTabsContent' => [
|
---|
| 103 | 'location' => 'query',
|
---|
| 104 | 'type' => 'boolean',
|
---|
| 105 | ],
|
---|
| 106 | 'suggestionsViewMode' => [
|
---|
| 107 | 'location' => 'query',
|
---|
| 108 | 'type' => 'string',
|
---|
| 109 | ],
|
---|
| 110 | ],
|
---|
| 111 | ],
|
---|
| 112 | ]
|
---|
| 113 | ]
|
---|
| 114 | );
|
---|
| 115 | }
|
---|
| 116 | }
|
---|
| 117 |
|
---|
| 118 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 119 | class_alias(Docs::class, 'Google_Service_Docs');
|
---|