source: vendor/google/apiclient-services/src/PeopleService.php@ e3d4e0a

Last change on this file since e3d4e0a was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 7 days ago

Upload project files

  • Property mode set to 100644
File size: 18.7 KB
RevLine 
[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
18namespace Google\Service;
19
20use Google\Client;
21
22/**
23 * Service definition for PeopleService (v1).
24 *
25 * <p>
26 * Provides access to information about profiles and contacts.</p>
27 *
28 * <p>
29 * For more information about this service, see the API
30 * <a href="https://developers.google.com/people/" target="_blank">Documentation</a>
31 * </p>
32 *
33 * @author Google, Inc.
34 */
35class PeopleService extends \Google\Service
36{
37 /** See, edit, download, and permanently delete your contacts. */
38 const CONTACTS =
39 "https://www.googleapis.com/auth/contacts";
40 /** See and download contact info automatically saved in your "Other contacts". */
41 const CONTACTS_OTHER_READONLY =
42 "https://www.googleapis.com/auth/contacts.other.readonly";
43 /** See and download your contacts. */
44 const CONTACTS_READONLY =
45 "https://www.googleapis.com/auth/contacts.readonly";
46 /** See and download your organization's GSuite directory. */
47 const DIRECTORY_READONLY =
48 "https://www.googleapis.com/auth/directory.readonly";
49 /** View your street addresses. */
50 const USER_ADDRESSES_READ =
51 "https://www.googleapis.com/auth/user.addresses.read";
52 /** See and download your exact date of birth. */
53 const USER_BIRTHDAY_READ =
54 "https://www.googleapis.com/auth/user.birthday.read";
55 /** See and download all of your Google Account email addresses. */
56 const USER_EMAILS_READ =
57 "https://www.googleapis.com/auth/user.emails.read";
58 /** See your gender. */
59 const USER_GENDER_READ =
60 "https://www.googleapis.com/auth/user.gender.read";
61 /** See your education, work history and org info. */
62 const USER_ORGANIZATION_READ =
63 "https://www.googleapis.com/auth/user.organization.read";
64 /** See and download your personal phone numbers. */
65 const USER_PHONENUMBERS_READ =
66 "https://www.googleapis.com/auth/user.phonenumbers.read";
67 /** See your primary Google Account email address. */
68 const USERINFO_EMAIL =
69 "https://www.googleapis.com/auth/userinfo.email";
70 /** See your personal info, including any personal info you've made publicly available. */
71 const USERINFO_PROFILE =
72 "https://www.googleapis.com/auth/userinfo.profile";
73
74 public $contactGroups;
75 public $contactGroups_members;
76 public $otherContacts;
77 public $people;
78 public $people_connections;
79 public $rootUrlTemplate;
80
81 /**
82 * Constructs the internal representation of the PeopleService service.
83 *
84 * @param Client|array $clientOrConfig The client used to deliver requests, or a
85 * config array to pass to a new Client instance.
86 * @param string $rootUrl The root URL used for requests to the service.
87 */
88 public function __construct($clientOrConfig = [], $rootUrl = null)
89 {
90 parent::__construct($clientOrConfig);
91 $this->rootUrl = $rootUrl ?: 'https://people.googleapis.com/';
92 $this->rootUrlTemplate = $rootUrl ?: 'https://people.UNIVERSE_DOMAIN/';
93 $this->servicePath = '';
94 $this->batchPath = 'batch';
95 $this->version = 'v1';
96 $this->serviceName = 'people';
97
98 $this->contactGroups = new PeopleService\Resource\ContactGroups(
99 $this,
100 $this->serviceName,
101 'contactGroups',
102 [
103 'methods' => [
104 'batchGet' => [
105 'path' => 'v1/contactGroups:batchGet',
106 'httpMethod' => 'GET',
107 'parameters' => [
108 'groupFields' => [
109 'location' => 'query',
110 'type' => 'string',
111 ],
112 'maxMembers' => [
113 'location' => 'query',
114 'type' => 'integer',
115 ],
116 'resourceNames' => [
117 'location' => 'query',
118 'type' => 'string',
119 'repeated' => true,
120 ],
121 ],
122 ],'create' => [
123 'path' => 'v1/contactGroups',
124 'httpMethod' => 'POST',
125 'parameters' => [],
126 ],'delete' => [
127 'path' => 'v1/{+resourceName}',
128 'httpMethod' => 'DELETE',
129 'parameters' => [
130 'resourceName' => [
131 'location' => 'path',
132 'type' => 'string',
133 'required' => true,
134 ],
135 'deleteContacts' => [
136 'location' => 'query',
137 'type' => 'boolean',
138 ],
139 ],
140 ],'get' => [
141 'path' => 'v1/{+resourceName}',
142 'httpMethod' => 'GET',
143 'parameters' => [
144 'resourceName' => [
145 'location' => 'path',
146 'type' => 'string',
147 'required' => true,
148 ],
149 'groupFields' => [
150 'location' => 'query',
151 'type' => 'string',
152 ],
153 'maxMembers' => [
154 'location' => 'query',
155 'type' => 'integer',
156 ],
157 ],
158 ],'list' => [
159 'path' => 'v1/contactGroups',
160 'httpMethod' => 'GET',
161 'parameters' => [
162 'groupFields' => [
163 'location' => 'query',
164 'type' => 'string',
165 ],
166 'pageSize' => [
167 'location' => 'query',
168 'type' => 'integer',
169 ],
170 'pageToken' => [
171 'location' => 'query',
172 'type' => 'string',
173 ],
174 'syncToken' => [
175 'location' => 'query',
176 'type' => 'string',
177 ],
178 ],
179 ],'update' => [
180 'path' => 'v1/{+resourceName}',
181 'httpMethod' => 'PUT',
182 'parameters' => [
183 'resourceName' => [
184 'location' => 'path',
185 'type' => 'string',
186 'required' => true,
187 ],
188 ],
189 ],
190 ]
191 ]
192 );
193 $this->contactGroups_members = new PeopleService\Resource\ContactGroupsMembers(
194 $this,
195 $this->serviceName,
196 'members',
197 [
198 'methods' => [
199 'modify' => [
200 'path' => 'v1/{+resourceName}/members:modify',
201 'httpMethod' => 'POST',
202 'parameters' => [
203 'resourceName' => [
204 'location' => 'path',
205 'type' => 'string',
206 'required' => true,
207 ],
208 ],
209 ],
210 ]
211 ]
212 );
213 $this->otherContacts = new PeopleService\Resource\OtherContacts(
214 $this,
215 $this->serviceName,
216 'otherContacts',
217 [
218 'methods' => [
219 'copyOtherContactToMyContactsGroup' => [
220 'path' => 'v1/{+resourceName}:copyOtherContactToMyContactsGroup',
221 'httpMethod' => 'POST',
222 'parameters' => [
223 'resourceName' => [
224 'location' => 'path',
225 'type' => 'string',
226 'required' => true,
227 ],
228 ],
229 ],'list' => [
230 'path' => 'v1/otherContacts',
231 'httpMethod' => 'GET',
232 'parameters' => [
233 'pageSize' => [
234 'location' => 'query',
235 'type' => 'integer',
236 ],
237 'pageToken' => [
238 'location' => 'query',
239 'type' => 'string',
240 ],
241 'readMask' => [
242 'location' => 'query',
243 'type' => 'string',
244 ],
245 'requestSyncToken' => [
246 'location' => 'query',
247 'type' => 'boolean',
248 ],
249 'sources' => [
250 'location' => 'query',
251 'type' => 'string',
252 'repeated' => true,
253 ],
254 'syncToken' => [
255 'location' => 'query',
256 'type' => 'string',
257 ],
258 ],
259 ],'search' => [
260 'path' => 'v1/otherContacts:search',
261 'httpMethod' => 'GET',
262 'parameters' => [
263 'pageSize' => [
264 'location' => 'query',
265 'type' => 'integer',
266 ],
267 'query' => [
268 'location' => 'query',
269 'type' => 'string',
270 ],
271 'readMask' => [
272 'location' => 'query',
273 'type' => 'string',
274 ],
275 ],
276 ],
277 ]
278 ]
279 );
280 $this->people = new PeopleService\Resource\People(
281 $this,
282 $this->serviceName,
283 'people',
284 [
285 'methods' => [
286 'batchCreateContacts' => [
287 'path' => 'v1/people:batchCreateContacts',
288 'httpMethod' => 'POST',
289 'parameters' => [],
290 ],'batchDeleteContacts' => [
291 'path' => 'v1/people:batchDeleteContacts',
292 'httpMethod' => 'POST',
293 'parameters' => [],
294 ],'batchUpdateContacts' => [
295 'path' => 'v1/people:batchUpdateContacts',
296 'httpMethod' => 'POST',
297 'parameters' => [],
298 ],'createContact' => [
299 'path' => 'v1/people:createContact',
300 'httpMethod' => 'POST',
301 'parameters' => [
302 'personFields' => [
303 'location' => 'query',
304 'type' => 'string',
305 ],
306 'sources' => [
307 'location' => 'query',
308 'type' => 'string',
309 'repeated' => true,
310 ],
311 ],
312 ],'deleteContact' => [
313 'path' => 'v1/{+resourceName}:deleteContact',
314 'httpMethod' => 'DELETE',
315 'parameters' => [
316 'resourceName' => [
317 'location' => 'path',
318 'type' => 'string',
319 'required' => true,
320 ],
321 ],
322 ],'deleteContactPhoto' => [
323 'path' => 'v1/{+resourceName}:deleteContactPhoto',
324 'httpMethod' => 'DELETE',
325 'parameters' => [
326 'resourceName' => [
327 'location' => 'path',
328 'type' => 'string',
329 'required' => true,
330 ],
331 'personFields' => [
332 'location' => 'query',
333 'type' => 'string',
334 ],
335 'sources' => [
336 'location' => 'query',
337 'type' => 'string',
338 'repeated' => true,
339 ],
340 ],
341 ],'get' => [
342 'path' => 'v1/{+resourceName}',
343 'httpMethod' => 'GET',
344 'parameters' => [
345 'resourceName' => [
346 'location' => 'path',
347 'type' => 'string',
348 'required' => true,
349 ],
350 'personFields' => [
351 'location' => 'query',
352 'type' => 'string',
353 ],
354 'requestMask.includeField' => [
355 'location' => 'query',
356 'type' => 'string',
357 ],
358 'sources' => [
359 'location' => 'query',
360 'type' => 'string',
361 'repeated' => true,
362 ],
363 ],
364 ],'getBatchGet' => [
365 'path' => 'v1/people:batchGet',
366 'httpMethod' => 'GET',
367 'parameters' => [
368 'personFields' => [
369 'location' => 'query',
370 'type' => 'string',
371 ],
372 'requestMask.includeField' => [
373 'location' => 'query',
374 'type' => 'string',
375 ],
376 'resourceNames' => [
377 'location' => 'query',
378 'type' => 'string',
379 'repeated' => true,
380 ],
381 'sources' => [
382 'location' => 'query',
383 'type' => 'string',
384 'repeated' => true,
385 ],
386 ],
387 ],'listDirectoryPeople' => [
388 'path' => 'v1/people:listDirectoryPeople',
389 'httpMethod' => 'GET',
390 'parameters' => [
391 'mergeSources' => [
392 'location' => 'query',
393 'type' => 'string',
394 'repeated' => true,
395 ],
396 'pageSize' => [
397 'location' => 'query',
398 'type' => 'integer',
399 ],
400 'pageToken' => [
401 'location' => 'query',
402 'type' => 'string',
403 ],
404 'readMask' => [
405 'location' => 'query',
406 'type' => 'string',
407 ],
408 'requestSyncToken' => [
409 'location' => 'query',
410 'type' => 'boolean',
411 ],
412 'sources' => [
413 'location' => 'query',
414 'type' => 'string',
415 'repeated' => true,
416 ],
417 'syncToken' => [
418 'location' => 'query',
419 'type' => 'string',
420 ],
421 ],
422 ],'searchContacts' => [
423 'path' => 'v1/people:searchContacts',
424 'httpMethod' => 'GET',
425 'parameters' => [
426 'pageSize' => [
427 'location' => 'query',
428 'type' => 'integer',
429 ],
430 'query' => [
431 'location' => 'query',
432 'type' => 'string',
433 ],
434 'readMask' => [
435 'location' => 'query',
436 'type' => 'string',
437 ],
438 'sources' => [
439 'location' => 'query',
440 'type' => 'string',
441 'repeated' => true,
442 ],
443 ],
444 ],'searchDirectoryPeople' => [
445 'path' => 'v1/people:searchDirectoryPeople',
446 'httpMethod' => 'GET',
447 'parameters' => [
448 'mergeSources' => [
449 'location' => 'query',
450 'type' => 'string',
451 'repeated' => true,
452 ],
453 'pageSize' => [
454 'location' => 'query',
455 'type' => 'integer',
456 ],
457 'pageToken' => [
458 'location' => 'query',
459 'type' => 'string',
460 ],
461 'query' => [
462 'location' => 'query',
463 'type' => 'string',
464 ],
465 'readMask' => [
466 'location' => 'query',
467 'type' => 'string',
468 ],
469 'sources' => [
470 'location' => 'query',
471 'type' => 'string',
472 'repeated' => true,
473 ],
474 ],
475 ],'updateContact' => [
476 'path' => 'v1/{+resourceName}:updateContact',
477 'httpMethod' => 'PATCH',
478 'parameters' => [
479 'resourceName' => [
480 'location' => 'path',
481 'type' => 'string',
482 'required' => true,
483 ],
484 'personFields' => [
485 'location' => 'query',
486 'type' => 'string',
487 ],
488 'sources' => [
489 'location' => 'query',
490 'type' => 'string',
491 'repeated' => true,
492 ],
493 'updatePersonFields' => [
494 'location' => 'query',
495 'type' => 'string',
496 ],
497 ],
498 ],'updateContactPhoto' => [
499 'path' => 'v1/{+resourceName}:updateContactPhoto',
500 'httpMethod' => 'PATCH',
501 'parameters' => [
502 'resourceName' => [
503 'location' => 'path',
504 'type' => 'string',
505 'required' => true,
506 ],
507 ],
508 ],
509 ]
510 ]
511 );
512 $this->people_connections = new PeopleService\Resource\PeopleConnections(
513 $this,
514 $this->serviceName,
515 'connections',
516 [
517 'methods' => [
518 'list' => [
519 'path' => 'v1/{+resourceName}/connections',
520 'httpMethod' => 'GET',
521 'parameters' => [
522 'resourceName' => [
523 'location' => 'path',
524 'type' => 'string',
525 'required' => true,
526 ],
527 'pageSize' => [
528 'location' => 'query',
529 'type' => 'integer',
530 ],
531 'pageToken' => [
532 'location' => 'query',
533 'type' => 'string',
534 ],
535 'personFields' => [
536 'location' => 'query',
537 'type' => 'string',
538 ],
539 'requestMask.includeField' => [
540 'location' => 'query',
541 'type' => 'string',
542 ],
543 'requestSyncToken' => [
544 'location' => 'query',
545 'type' => 'boolean',
546 ],
547 'sortOrder' => [
548 'location' => 'query',
549 'type' => 'string',
550 ],
551 'sources' => [
552 'location' => 'query',
553 'type' => 'string',
554 'repeated' => true,
555 ],
556 'syncToken' => [
557 'location' => 'query',
558 'type' => 'string',
559 ],
560 ],
561 ],
562 ]
563 ]
564 );
565 }
566}
567
568// Adding a class alias for backwards compatibility with the previous class name.
569class_alias(PeopleService::class, 'Google_Service_PeopleService');
Note: See TracBrowser for help on using the repository browser.