説明なし

People.php 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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. * Service definition for People (v1).
  19. *
  20. * <p>
  21. * Provides access to information about profiles and contacts.</p>
  22. *
  23. * <p>
  24. * For more information about this service, see the API
  25. * <a href="https://developers.google.com/people/" target="_blank">Documentation</a>
  26. * </p>
  27. *
  28. * @author Google, Inc.
  29. */
  30. class Google_Service_People extends Google_Service
  31. {
  32. /** Manage your contacts. */
  33. const CONTACTS =
  34. "https://www.googleapis.com/auth/contacts";
  35. /** View your contacts. */
  36. const CONTACTS_READONLY =
  37. "https://www.googleapis.com/auth/contacts.readonly";
  38. /** Know the list of people in your circles, your age range, and language. */
  39. const PLUS_LOGIN =
  40. "https://www.googleapis.com/auth/plus.login";
  41. /** View your street addresses. */
  42. const USER_ADDRESSES_READ =
  43. "https://www.googleapis.com/auth/user.addresses.read";
  44. /** View your complete date of birth. */
  45. const USER_BIRTHDAY_READ =
  46. "https://www.googleapis.com/auth/user.birthday.read";
  47. /** View your email addresses. */
  48. const USER_EMAILS_READ =
  49. "https://www.googleapis.com/auth/user.emails.read";
  50. /** View your phone numbers. */
  51. const USER_PHONENUMBERS_READ =
  52. "https://www.googleapis.com/auth/user.phonenumbers.read";
  53. /** View your email address. */
  54. const USERINFO_EMAIL =
  55. "https://www.googleapis.com/auth/userinfo.email";
  56. /** View your basic profile info. */
  57. const USERINFO_PROFILE =
  58. "https://www.googleapis.com/auth/userinfo.profile";
  59. public $people;
  60. public $people_connections;
  61. /**
  62. * Constructs the internal representation of the People service.
  63. *
  64. * @param Google_Client $client
  65. */
  66. public function __construct(Google_Client $client)
  67. {
  68. parent::__construct($client);
  69. $this->rootUrl = 'https://people.googleapis.com/';
  70. $this->servicePath = '';
  71. $this->version = 'v1';
  72. $this->serviceName = 'people';
  73. $this->people = new Google_Service_People_Resource_People(
  74. $this,
  75. $this->serviceName,
  76. 'people',
  77. array(
  78. 'methods' => array(
  79. 'get' => array(
  80. 'path' => 'v1/{+resourceName}',
  81. 'httpMethod' => 'GET',
  82. 'parameters' => array(
  83. 'resourceName' => array(
  84. 'location' => 'path',
  85. 'type' => 'string',
  86. 'required' => true,
  87. ),
  88. 'requestMask.includeField' => array(
  89. 'location' => 'query',
  90. 'type' => 'string',
  91. ),
  92. ),
  93. ),'getBatchGet' => array(
  94. 'path' => 'v1/people:batchGet',
  95. 'httpMethod' => 'GET',
  96. 'parameters' => array(
  97. 'requestMask.includeField' => array(
  98. 'location' => 'query',
  99. 'type' => 'string',
  100. ),
  101. 'resourceNames' => array(
  102. 'location' => 'query',
  103. 'type' => 'string',
  104. 'repeated' => true,
  105. ),
  106. ),
  107. ),
  108. )
  109. )
  110. );
  111. $this->people_connections = new Google_Service_People_Resource_PeopleConnections(
  112. $this,
  113. $this->serviceName,
  114. 'connections',
  115. array(
  116. 'methods' => array(
  117. 'list' => array(
  118. 'path' => 'v1/{+resourceName}/connections',
  119. 'httpMethod' => 'GET',
  120. 'parameters' => array(
  121. 'resourceName' => array(
  122. 'location' => 'path',
  123. 'type' => 'string',
  124. 'required' => true,
  125. ),
  126. 'sortOrder' => array(
  127. 'location' => 'query',
  128. 'type' => 'string',
  129. ),
  130. 'requestSyncToken' => array(
  131. 'location' => 'query',
  132. 'type' => 'boolean',
  133. ),
  134. 'pageToken' => array(
  135. 'location' => 'query',
  136. 'type' => 'string',
  137. ),
  138. 'pageSize' => array(
  139. 'location' => 'query',
  140. 'type' => 'integer',
  141. ),
  142. 'requestMask.includeField' => array(
  143. 'location' => 'query',
  144. 'type' => 'string',
  145. ),
  146. 'syncToken' => array(
  147. 'location' => 'query',
  148. 'type' => 'string',
  149. ),
  150. ),
  151. ),
  152. )
  153. )
  154. );
  155. }
  156. }