Nenhuma descrição

Plus.php 8.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  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 Plus (v1).
  19. *
  20. * <p>
  21. * Builds on top of the Google+ platform.</p>
  22. *
  23. * <p>
  24. * For more information about this service, see the API
  25. * <a href="https://developers.google.com/+/api/" target="_blank">Documentation</a>
  26. * </p>
  27. *
  28. * @author Google, Inc.
  29. */
  30. class Google_Service_Plus extends Google_Service
  31. {
  32. /** Know the list of people in your circles, your age range, and language. */
  33. const PLUS_LOGIN =
  34. "https://www.googleapis.com/auth/plus.login";
  35. /** Know who you are on Google. */
  36. const PLUS_ME =
  37. "https://www.googleapis.com/auth/plus.me";
  38. /** View your email address. */
  39. const USERINFO_EMAIL =
  40. "https://www.googleapis.com/auth/userinfo.email";
  41. /** View your basic profile info. */
  42. const USERINFO_PROFILE =
  43. "https://www.googleapis.com/auth/userinfo.profile";
  44. public $activities;
  45. public $comments;
  46. public $people;
  47. /**
  48. * Constructs the internal representation of the Plus service.
  49. *
  50. * @param Google_Client $client
  51. */
  52. public function __construct(Google_Client $client)
  53. {
  54. parent::__construct($client);
  55. $this->rootUrl = 'https://www.googleapis.com/';
  56. $this->servicePath = 'plus/v1/';
  57. $this->version = 'v1';
  58. $this->serviceName = 'plus';
  59. $this->activities = new Google_Service_Plus_Resource_Activities(
  60. $this,
  61. $this->serviceName,
  62. 'activities',
  63. array(
  64. 'methods' => array(
  65. 'get' => array(
  66. 'path' => 'activities/{activityId}',
  67. 'httpMethod' => 'GET',
  68. 'parameters' => array(
  69. 'activityId' => array(
  70. 'location' => 'path',
  71. 'type' => 'string',
  72. 'required' => true,
  73. ),
  74. ),
  75. ),'list' => array(
  76. 'path' => 'people/{userId}/activities/{collection}',
  77. 'httpMethod' => 'GET',
  78. 'parameters' => array(
  79. 'userId' => array(
  80. 'location' => 'path',
  81. 'type' => 'string',
  82. 'required' => true,
  83. ),
  84. 'collection' => array(
  85. 'location' => 'path',
  86. 'type' => 'string',
  87. 'required' => true,
  88. ),
  89. 'maxResults' => array(
  90. 'location' => 'query',
  91. 'type' => 'integer',
  92. ),
  93. 'pageToken' => array(
  94. 'location' => 'query',
  95. 'type' => 'string',
  96. ),
  97. ),
  98. ),'search' => array(
  99. 'path' => 'activities',
  100. 'httpMethod' => 'GET',
  101. 'parameters' => array(
  102. 'query' => array(
  103. 'location' => 'query',
  104. 'type' => 'string',
  105. 'required' => true,
  106. ),
  107. 'language' => array(
  108. 'location' => 'query',
  109. 'type' => 'string',
  110. ),
  111. 'maxResults' => array(
  112. 'location' => 'query',
  113. 'type' => 'integer',
  114. ),
  115. 'orderBy' => array(
  116. 'location' => 'query',
  117. 'type' => 'string',
  118. ),
  119. 'pageToken' => array(
  120. 'location' => 'query',
  121. 'type' => 'string',
  122. ),
  123. ),
  124. ),
  125. )
  126. )
  127. );
  128. $this->comments = new Google_Service_Plus_Resource_Comments(
  129. $this,
  130. $this->serviceName,
  131. 'comments',
  132. array(
  133. 'methods' => array(
  134. 'get' => array(
  135. 'path' => 'comments/{commentId}',
  136. 'httpMethod' => 'GET',
  137. 'parameters' => array(
  138. 'commentId' => array(
  139. 'location' => 'path',
  140. 'type' => 'string',
  141. 'required' => true,
  142. ),
  143. ),
  144. ),'list' => array(
  145. 'path' => 'activities/{activityId}/comments',
  146. 'httpMethod' => 'GET',
  147. 'parameters' => array(
  148. 'activityId' => array(
  149. 'location' => 'path',
  150. 'type' => 'string',
  151. 'required' => true,
  152. ),
  153. 'maxResults' => array(
  154. 'location' => 'query',
  155. 'type' => 'integer',
  156. ),
  157. 'pageToken' => array(
  158. 'location' => 'query',
  159. 'type' => 'string',
  160. ),
  161. 'sortOrder' => array(
  162. 'location' => 'query',
  163. 'type' => 'string',
  164. ),
  165. ),
  166. ),
  167. )
  168. )
  169. );
  170. $this->people = new Google_Service_Plus_Resource_People(
  171. $this,
  172. $this->serviceName,
  173. 'people',
  174. array(
  175. 'methods' => array(
  176. 'get' => array(
  177. 'path' => 'people/{userId}',
  178. 'httpMethod' => 'GET',
  179. 'parameters' => array(
  180. 'userId' => array(
  181. 'location' => 'path',
  182. 'type' => 'string',
  183. 'required' => true,
  184. ),
  185. ),
  186. ),'list' => array(
  187. 'path' => 'people/{userId}/people/{collection}',
  188. 'httpMethod' => 'GET',
  189. 'parameters' => array(
  190. 'userId' => array(
  191. 'location' => 'path',
  192. 'type' => 'string',
  193. 'required' => true,
  194. ),
  195. 'collection' => array(
  196. 'location' => 'path',
  197. 'type' => 'string',
  198. 'required' => true,
  199. ),
  200. 'maxResults' => array(
  201. 'location' => 'query',
  202. 'type' => 'integer',
  203. ),
  204. 'orderBy' => array(
  205. 'location' => 'query',
  206. 'type' => 'string',
  207. ),
  208. 'pageToken' => array(
  209. 'location' => 'query',
  210. 'type' => 'string',
  211. ),
  212. ),
  213. ),'listByActivity' => array(
  214. 'path' => 'activities/{activityId}/people/{collection}',
  215. 'httpMethod' => 'GET',
  216. 'parameters' => array(
  217. 'activityId' => array(
  218. 'location' => 'path',
  219. 'type' => 'string',
  220. 'required' => true,
  221. ),
  222. 'collection' => array(
  223. 'location' => 'path',
  224. 'type' => 'string',
  225. 'required' => true,
  226. ),
  227. 'maxResults' => array(
  228. 'location' => 'query',
  229. 'type' => 'integer',
  230. ),
  231. 'pageToken' => array(
  232. 'location' => 'query',
  233. 'type' => 'string',
  234. ),
  235. ),
  236. ),'search' => array(
  237. 'path' => 'people',
  238. 'httpMethod' => 'GET',
  239. 'parameters' => array(
  240. 'query' => array(
  241. 'location' => 'query',
  242. 'type' => 'string',
  243. 'required' => true,
  244. ),
  245. 'language' => array(
  246. 'location' => 'query',
  247. 'type' => 'string',
  248. ),
  249. 'maxResults' => array(
  250. 'location' => 'query',
  251. 'type' => 'integer',
  252. ),
  253. 'pageToken' => array(
  254. 'location' => 'query',
  255. 'type' => 'string',
  256. ),
  257. ),
  258. ),
  259. )
  260. )
  261. );
  262. }
  263. }