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 Keep (v1).
|
---|
24 | *
|
---|
25 | * <p>
|
---|
26 | * The Google Keep API is used in an enterprise environment to manage Google
|
---|
27 | * Keep content and resolve issues identified by cloud security software.</p>
|
---|
28 | *
|
---|
29 | * <p>
|
---|
30 | * For more information about this service, see the API
|
---|
31 | * <a href="https://developers.google.com/keep/api" target="_blank">Documentation</a>
|
---|
32 | * </p>
|
---|
33 | *
|
---|
34 | * @author Google, Inc.
|
---|
35 | */
|
---|
36 | class Keep extends \Google\Service
|
---|
37 | {
|
---|
38 | /** See, edit, create and permanently delete all your Google Keep data. */
|
---|
39 | const KEEP =
|
---|
40 | "https://www.googleapis.com/auth/keep";
|
---|
41 | /** View all your Google Keep data. */
|
---|
42 | const KEEP_READONLY =
|
---|
43 | "https://www.googleapis.com/auth/keep.readonly";
|
---|
44 |
|
---|
45 | public $media;
|
---|
46 | public $notes;
|
---|
47 | public $notes_permissions;
|
---|
48 | public $rootUrlTemplate;
|
---|
49 |
|
---|
50 | /**
|
---|
51 | * Constructs the internal representation of the Keep service.
|
---|
52 | *
|
---|
53 | * @param Client|array $clientOrConfig The client used to deliver requests, or a
|
---|
54 | * config array to pass to a new Client instance.
|
---|
55 | * @param string $rootUrl The root URL used for requests to the service.
|
---|
56 | */
|
---|
57 | public function __construct($clientOrConfig = [], $rootUrl = null)
|
---|
58 | {
|
---|
59 | parent::__construct($clientOrConfig);
|
---|
60 | $this->rootUrl = $rootUrl ?: 'https://keep.googleapis.com/';
|
---|
61 | $this->rootUrlTemplate = $rootUrl ?: 'https://keep.UNIVERSE_DOMAIN/';
|
---|
62 | $this->servicePath = '';
|
---|
63 | $this->batchPath = 'batch';
|
---|
64 | $this->version = 'v1';
|
---|
65 | $this->serviceName = 'keep';
|
---|
66 |
|
---|
67 | $this->media = new Keep\Resource\Media(
|
---|
68 | $this,
|
---|
69 | $this->serviceName,
|
---|
70 | 'media',
|
---|
71 | [
|
---|
72 | 'methods' => [
|
---|
73 | 'download' => [
|
---|
74 | 'path' => 'v1/{+name}',
|
---|
75 | 'httpMethod' => 'GET',
|
---|
76 | 'parameters' => [
|
---|
77 | 'name' => [
|
---|
78 | 'location' => 'path',
|
---|
79 | 'type' => 'string',
|
---|
80 | 'required' => true,
|
---|
81 | ],
|
---|
82 | 'mimeType' => [
|
---|
83 | 'location' => 'query',
|
---|
84 | 'type' => 'string',
|
---|
85 | ],
|
---|
86 | ],
|
---|
87 | ],
|
---|
88 | ]
|
---|
89 | ]
|
---|
90 | );
|
---|
91 | $this->notes = new Keep\Resource\Notes(
|
---|
92 | $this,
|
---|
93 | $this->serviceName,
|
---|
94 | 'notes',
|
---|
95 | [
|
---|
96 | 'methods' => [
|
---|
97 | 'create' => [
|
---|
98 | 'path' => 'v1/notes',
|
---|
99 | 'httpMethod' => 'POST',
|
---|
100 | 'parameters' => [],
|
---|
101 | ],'delete' => [
|
---|
102 | 'path' => 'v1/{+name}',
|
---|
103 | 'httpMethod' => 'DELETE',
|
---|
104 | 'parameters' => [
|
---|
105 | 'name' => [
|
---|
106 | 'location' => 'path',
|
---|
107 | 'type' => 'string',
|
---|
108 | 'required' => true,
|
---|
109 | ],
|
---|
110 | ],
|
---|
111 | ],'get' => [
|
---|
112 | 'path' => 'v1/{+name}',
|
---|
113 | 'httpMethod' => 'GET',
|
---|
114 | 'parameters' => [
|
---|
115 | 'name' => [
|
---|
116 | 'location' => 'path',
|
---|
117 | 'type' => 'string',
|
---|
118 | 'required' => true,
|
---|
119 | ],
|
---|
120 | ],
|
---|
121 | ],'list' => [
|
---|
122 | 'path' => 'v1/notes',
|
---|
123 | 'httpMethod' => 'GET',
|
---|
124 | 'parameters' => [
|
---|
125 | 'filter' => [
|
---|
126 | 'location' => 'query',
|
---|
127 | 'type' => 'string',
|
---|
128 | ],
|
---|
129 | 'pageSize' => [
|
---|
130 | 'location' => 'query',
|
---|
131 | 'type' => 'integer',
|
---|
132 | ],
|
---|
133 | 'pageToken' => [
|
---|
134 | 'location' => 'query',
|
---|
135 | 'type' => 'string',
|
---|
136 | ],
|
---|
137 | ],
|
---|
138 | ],
|
---|
139 | ]
|
---|
140 | ]
|
---|
141 | );
|
---|
142 | $this->notes_permissions = new Keep\Resource\NotesPermissions(
|
---|
143 | $this,
|
---|
144 | $this->serviceName,
|
---|
145 | 'permissions',
|
---|
146 | [
|
---|
147 | 'methods' => [
|
---|
148 | 'batchCreate' => [
|
---|
149 | 'path' => 'v1/{+parent}/permissions:batchCreate',
|
---|
150 | 'httpMethod' => 'POST',
|
---|
151 | 'parameters' => [
|
---|
152 | 'parent' => [
|
---|
153 | 'location' => 'path',
|
---|
154 | 'type' => 'string',
|
---|
155 | 'required' => true,
|
---|
156 | ],
|
---|
157 | ],
|
---|
158 | ],'batchDelete' => [
|
---|
159 | 'path' => 'v1/{+parent}/permissions:batchDelete',
|
---|
160 | 'httpMethod' => 'POST',
|
---|
161 | 'parameters' => [
|
---|
162 | 'parent' => [
|
---|
163 | 'location' => 'path',
|
---|
164 | 'type' => 'string',
|
---|
165 | 'required' => true,
|
---|
166 | ],
|
---|
167 | ],
|
---|
168 | ],
|
---|
169 | ]
|
---|
170 | ]
|
---|
171 | );
|
---|
172 | }
|
---|
173 | }
|
---|
174 |
|
---|
175 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
176 | class_alias(Keep::class, 'Google_Service_Keep');
|
---|