Aucune description

Mirror.php 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379
  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 Mirror (v1).
  19. *
  20. * <p>
  21. * Interacts with Glass users via the timeline.</p>
  22. *
  23. * <p>
  24. * For more information about this service, see the API
  25. * <a href="https://developers.google.com/glass" target="_blank">Documentation</a>
  26. * </p>
  27. *
  28. * @author Google, Inc.
  29. */
  30. class Google_Service_Mirror extends Google_Service
  31. {
  32. /** View your location. */
  33. const GLASS_LOCATION =
  34. "https://www.googleapis.com/auth/glass.location";
  35. /** View and manage your Glass timeline. */
  36. const GLASS_TIMELINE =
  37. "https://www.googleapis.com/auth/glass.timeline";
  38. public $accounts;
  39. public $contacts;
  40. public $locations;
  41. public $settings;
  42. public $subscriptions;
  43. public $timeline;
  44. public $timeline_attachments;
  45. /**
  46. * Constructs the internal representation of the Mirror service.
  47. *
  48. * @param Google_Client $client
  49. */
  50. public function __construct(Google_Client $client)
  51. {
  52. parent::__construct($client);
  53. $this->rootUrl = 'https://www.googleapis.com/';
  54. $this->servicePath = 'mirror/v1/';
  55. $this->version = 'v1';
  56. $this->serviceName = 'mirror';
  57. $this->accounts = new Google_Service_Mirror_Resource_Accounts(
  58. $this,
  59. $this->serviceName,
  60. 'accounts',
  61. array(
  62. 'methods' => array(
  63. 'insert' => array(
  64. 'path' => 'accounts/{userToken}/{accountType}/{accountName}',
  65. 'httpMethod' => 'POST',
  66. 'parameters' => array(
  67. 'userToken' => array(
  68. 'location' => 'path',
  69. 'type' => 'string',
  70. 'required' => true,
  71. ),
  72. 'accountType' => array(
  73. 'location' => 'path',
  74. 'type' => 'string',
  75. 'required' => true,
  76. ),
  77. 'accountName' => array(
  78. 'location' => 'path',
  79. 'type' => 'string',
  80. 'required' => true,
  81. ),
  82. ),
  83. ),
  84. )
  85. )
  86. );
  87. $this->contacts = new Google_Service_Mirror_Resource_Contacts(
  88. $this,
  89. $this->serviceName,
  90. 'contacts',
  91. array(
  92. 'methods' => array(
  93. 'delete' => array(
  94. 'path' => 'contacts/{id}',
  95. 'httpMethod' => 'DELETE',
  96. 'parameters' => array(
  97. 'id' => array(
  98. 'location' => 'path',
  99. 'type' => 'string',
  100. 'required' => true,
  101. ),
  102. ),
  103. ),'get' => array(
  104. 'path' => 'contacts/{id}',
  105. 'httpMethod' => 'GET',
  106. 'parameters' => array(
  107. 'id' => array(
  108. 'location' => 'path',
  109. 'type' => 'string',
  110. 'required' => true,
  111. ),
  112. ),
  113. ),'insert' => array(
  114. 'path' => 'contacts',
  115. 'httpMethod' => 'POST',
  116. 'parameters' => array(),
  117. ),'list' => array(
  118. 'path' => 'contacts',
  119. 'httpMethod' => 'GET',
  120. 'parameters' => array(),
  121. ),'patch' => array(
  122. 'path' => 'contacts/{id}',
  123. 'httpMethod' => 'PATCH',
  124. 'parameters' => array(
  125. 'id' => array(
  126. 'location' => 'path',
  127. 'type' => 'string',
  128. 'required' => true,
  129. ),
  130. ),
  131. ),'update' => array(
  132. 'path' => 'contacts/{id}',
  133. 'httpMethod' => 'PUT',
  134. 'parameters' => array(
  135. 'id' => array(
  136. 'location' => 'path',
  137. 'type' => 'string',
  138. 'required' => true,
  139. ),
  140. ),
  141. ),
  142. )
  143. )
  144. );
  145. $this->locations = new Google_Service_Mirror_Resource_Locations(
  146. $this,
  147. $this->serviceName,
  148. 'locations',
  149. array(
  150. 'methods' => array(
  151. 'get' => array(
  152. 'path' => 'locations/{id}',
  153. 'httpMethod' => 'GET',
  154. 'parameters' => array(
  155. 'id' => array(
  156. 'location' => 'path',
  157. 'type' => 'string',
  158. 'required' => true,
  159. ),
  160. ),
  161. ),'list' => array(
  162. 'path' => 'locations',
  163. 'httpMethod' => 'GET',
  164. 'parameters' => array(),
  165. ),
  166. )
  167. )
  168. );
  169. $this->settings = new Google_Service_Mirror_Resource_Settings(
  170. $this,
  171. $this->serviceName,
  172. 'settings',
  173. array(
  174. 'methods' => array(
  175. 'get' => array(
  176. 'path' => 'settings/{id}',
  177. 'httpMethod' => 'GET',
  178. 'parameters' => array(
  179. 'id' => array(
  180. 'location' => 'path',
  181. 'type' => 'string',
  182. 'required' => true,
  183. ),
  184. ),
  185. ),
  186. )
  187. )
  188. );
  189. $this->subscriptions = new Google_Service_Mirror_Resource_Subscriptions(
  190. $this,
  191. $this->serviceName,
  192. 'subscriptions',
  193. array(
  194. 'methods' => array(
  195. 'delete' => array(
  196. 'path' => 'subscriptions/{id}',
  197. 'httpMethod' => 'DELETE',
  198. 'parameters' => array(
  199. 'id' => array(
  200. 'location' => 'path',
  201. 'type' => 'string',
  202. 'required' => true,
  203. ),
  204. ),
  205. ),'insert' => array(
  206. 'path' => 'subscriptions',
  207. 'httpMethod' => 'POST',
  208. 'parameters' => array(),
  209. ),'list' => array(
  210. 'path' => 'subscriptions',
  211. 'httpMethod' => 'GET',
  212. 'parameters' => array(),
  213. ),'update' => array(
  214. 'path' => 'subscriptions/{id}',
  215. 'httpMethod' => 'PUT',
  216. 'parameters' => array(
  217. 'id' => array(
  218. 'location' => 'path',
  219. 'type' => 'string',
  220. 'required' => true,
  221. ),
  222. ),
  223. ),
  224. )
  225. )
  226. );
  227. $this->timeline = new Google_Service_Mirror_Resource_Timeline(
  228. $this,
  229. $this->serviceName,
  230. 'timeline',
  231. array(
  232. 'methods' => array(
  233. 'delete' => array(
  234. 'path' => 'timeline/{id}',
  235. 'httpMethod' => 'DELETE',
  236. 'parameters' => array(
  237. 'id' => array(
  238. 'location' => 'path',
  239. 'type' => 'string',
  240. 'required' => true,
  241. ),
  242. ),
  243. ),'get' => array(
  244. 'path' => 'timeline/{id}',
  245. 'httpMethod' => 'GET',
  246. 'parameters' => array(
  247. 'id' => array(
  248. 'location' => 'path',
  249. 'type' => 'string',
  250. 'required' => true,
  251. ),
  252. ),
  253. ),'insert' => array(
  254. 'path' => 'timeline',
  255. 'httpMethod' => 'POST',
  256. 'parameters' => array(),
  257. ),'list' => array(
  258. 'path' => 'timeline',
  259. 'httpMethod' => 'GET',
  260. 'parameters' => array(
  261. 'bundleId' => array(
  262. 'location' => 'query',
  263. 'type' => 'string',
  264. ),
  265. 'includeDeleted' => array(
  266. 'location' => 'query',
  267. 'type' => 'boolean',
  268. ),
  269. 'maxResults' => array(
  270. 'location' => 'query',
  271. 'type' => 'integer',
  272. ),
  273. 'orderBy' => array(
  274. 'location' => 'query',
  275. 'type' => 'string',
  276. ),
  277. 'pageToken' => array(
  278. 'location' => 'query',
  279. 'type' => 'string',
  280. ),
  281. 'pinnedOnly' => array(
  282. 'location' => 'query',
  283. 'type' => 'boolean',
  284. ),
  285. 'sourceItemId' => array(
  286. 'location' => 'query',
  287. 'type' => 'string',
  288. ),
  289. ),
  290. ),'patch' => array(
  291. 'path' => 'timeline/{id}',
  292. 'httpMethod' => 'PATCH',
  293. 'parameters' => array(
  294. 'id' => array(
  295. 'location' => 'path',
  296. 'type' => 'string',
  297. 'required' => true,
  298. ),
  299. ),
  300. ),'update' => array(
  301. 'path' => 'timeline/{id}',
  302. 'httpMethod' => 'PUT',
  303. 'parameters' => array(
  304. 'id' => array(
  305. 'location' => 'path',
  306. 'type' => 'string',
  307. 'required' => true,
  308. ),
  309. ),
  310. ),
  311. )
  312. )
  313. );
  314. $this->timeline_attachments = new Google_Service_Mirror_Resource_TimelineAttachments(
  315. $this,
  316. $this->serviceName,
  317. 'attachments',
  318. array(
  319. 'methods' => array(
  320. 'delete' => array(
  321. 'path' => 'timeline/{itemId}/attachments/{attachmentId}',
  322. 'httpMethod' => 'DELETE',
  323. 'parameters' => array(
  324. 'itemId' => array(
  325. 'location' => 'path',
  326. 'type' => 'string',
  327. 'required' => true,
  328. ),
  329. 'attachmentId' => array(
  330. 'location' => 'path',
  331. 'type' => 'string',
  332. 'required' => true,
  333. ),
  334. ),
  335. ),'get' => array(
  336. 'path' => 'timeline/{itemId}/attachments/{attachmentId}',
  337. 'httpMethod' => 'GET',
  338. 'parameters' => array(
  339. 'itemId' => array(
  340. 'location' => 'path',
  341. 'type' => 'string',
  342. 'required' => true,
  343. ),
  344. 'attachmentId' => array(
  345. 'location' => 'path',
  346. 'type' => 'string',
  347. 'required' => true,
  348. ),
  349. ),
  350. ),'insert' => array(
  351. 'path' => 'timeline/{itemId}/attachments',
  352. 'httpMethod' => 'POST',
  353. 'parameters' => array(
  354. 'itemId' => array(
  355. 'location' => 'path',
  356. 'type' => 'string',
  357. 'required' => true,
  358. ),
  359. ),
  360. ),'list' => array(
  361. 'path' => 'timeline/{itemId}/attachments',
  362. 'httpMethod' => 'GET',
  363. 'parameters' => array(
  364. 'itemId' => array(
  365. 'location' => 'path',
  366. 'type' => 'string',
  367. 'required' => true,
  368. ),
  369. ),
  370. ),
  371. )
  372. )
  373. );
  374. }
  375. }