PageRenderTime 53ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 1ms

/src/Google/Service/Calendar.php

https://github.com/leogaggl/pluspress
PHP | 3518 lines | 2530 code | 382 blank | 606 comment | 0 complexity | a4591ca9eb87f393a404aa6bc50f25a4 MD5 | raw file

Large files files are truncated, but you can click here to view the full file

  1. <?php
  2. /*
  3. * Copyright 2010 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 Calendar (v3).
  19. *
  20. * <p>
  21. * Lets you manipulate events and other calendar data.
  22. * </p>
  23. *
  24. * <p>
  25. * For more information about this service, see the API
  26. * <a href="https://developers.google.com/google-apps/calendar/firstapp" target="_blank">Documentation</a>
  27. * </p>
  28. *
  29. * @author Google, Inc.
  30. */
  31. class Google_Service_Calendar extends Google_Service
  32. {
  33. /** Manage your calendars. */
  34. const CALENDAR = "https://www.googleapis.com/auth/calendar";
  35. /** View your calendars. */
  36. const CALENDAR_READONLY = "https://www.googleapis.com/auth/calendar.readonly";
  37. public $acl;
  38. public $calendarList;
  39. public $calendars;
  40. public $channels;
  41. public $colors;
  42. public $events;
  43. public $freebusy;
  44. public $settings;
  45. /**
  46. * Constructs the internal representation of the Calendar service.
  47. *
  48. * @param Google_Client $client
  49. */
  50. public function __construct(Google_Client $client)
  51. {
  52. parent::__construct($client);
  53. $this->servicePath = 'calendar/v3/';
  54. $this->version = 'v3';
  55. $this->serviceName = 'calendar';
  56. $this->acl = new Google_Service_Calendar_Acl_Resource(
  57. $this,
  58. $this->serviceName,
  59. 'acl',
  60. array(
  61. 'methods' => array(
  62. 'delete' => array(
  63. 'path' => 'calendars/{calendarId}/acl/{ruleId}',
  64. 'httpMethod' => 'DELETE',
  65. 'parameters' => array(
  66. 'calendarId' => array(
  67. 'location' => 'path',
  68. 'type' => 'string',
  69. 'required' => true,
  70. ),
  71. 'ruleId' => array(
  72. 'location' => 'path',
  73. 'type' => 'string',
  74. 'required' => true,
  75. ),
  76. ),
  77. ),'get' => array(
  78. 'path' => 'calendars/{calendarId}/acl/{ruleId}',
  79. 'httpMethod' => 'GET',
  80. 'parameters' => array(
  81. 'calendarId' => array(
  82. 'location' => 'path',
  83. 'type' => 'string',
  84. 'required' => true,
  85. ),
  86. 'ruleId' => array(
  87. 'location' => 'path',
  88. 'type' => 'string',
  89. 'required' => true,
  90. ),
  91. ),
  92. ),'insert' => array(
  93. 'path' => 'calendars/{calendarId}/acl',
  94. 'httpMethod' => 'POST',
  95. 'parameters' => array(
  96. 'calendarId' => array(
  97. 'location' => 'path',
  98. 'type' => 'string',
  99. 'required' => true,
  100. ),
  101. ),
  102. ),'list' => array(
  103. 'path' => 'calendars/{calendarId}/acl',
  104. 'httpMethod' => 'GET',
  105. 'parameters' => array(
  106. 'calendarId' => array(
  107. 'location' => 'path',
  108. 'type' => 'string',
  109. 'required' => true,
  110. ),
  111. ),
  112. ),'patch' => array(
  113. 'path' => 'calendars/{calendarId}/acl/{ruleId}',
  114. 'httpMethod' => 'PATCH',
  115. 'parameters' => array(
  116. 'calendarId' => array(
  117. 'location' => 'path',
  118. 'type' => 'string',
  119. 'required' => true,
  120. ),
  121. 'ruleId' => array(
  122. 'location' => 'path',
  123. 'type' => 'string',
  124. 'required' => true,
  125. ),
  126. ),
  127. ),'update' => array(
  128. 'path' => 'calendars/{calendarId}/acl/{ruleId}',
  129. 'httpMethod' => 'PUT',
  130. 'parameters' => array(
  131. 'calendarId' => array(
  132. 'location' => 'path',
  133. 'type' => 'string',
  134. 'required' => true,
  135. ),
  136. 'ruleId' => array(
  137. 'location' => 'path',
  138. 'type' => 'string',
  139. 'required' => true,
  140. ),
  141. ),
  142. ),
  143. )
  144. )
  145. );
  146. $this->calendarList = new Google_Service_Calendar_CalendarList_Resource(
  147. $this,
  148. $this->serviceName,
  149. 'calendarList',
  150. array(
  151. 'methods' => array(
  152. 'delete' => array(
  153. 'path' => 'users/me/calendarList/{calendarId}',
  154. 'httpMethod' => 'DELETE',
  155. 'parameters' => array(
  156. 'calendarId' => array(
  157. 'location' => 'path',
  158. 'type' => 'string',
  159. 'required' => true,
  160. ),
  161. ),
  162. ),'get' => array(
  163. 'path' => 'users/me/calendarList/{calendarId}',
  164. 'httpMethod' => 'GET',
  165. 'parameters' => array(
  166. 'calendarId' => array(
  167. 'location' => 'path',
  168. 'type' => 'string',
  169. 'required' => true,
  170. ),
  171. ),
  172. ),'insert' => array(
  173. 'path' => 'users/me/calendarList',
  174. 'httpMethod' => 'POST',
  175. 'parameters' => array(
  176. 'colorRgbFormat' => array(
  177. 'location' => 'query',
  178. 'type' => 'boolean',
  179. ),
  180. ),
  181. ),'list' => array(
  182. 'path' => 'users/me/calendarList',
  183. 'httpMethod' => 'GET',
  184. 'parameters' => array(
  185. 'pageToken' => array(
  186. 'location' => 'query',
  187. 'type' => 'string',
  188. ),
  189. 'showHidden' => array(
  190. 'location' => 'query',
  191. 'type' => 'boolean',
  192. ),
  193. 'maxResults' => array(
  194. 'location' => 'query',
  195. 'type' => 'integer',
  196. ),
  197. 'minAccessRole' => array(
  198. 'location' => 'query',
  199. 'type' => 'string',
  200. ),
  201. ),
  202. ),'patch' => array(
  203. 'path' => 'users/me/calendarList/{calendarId}',
  204. 'httpMethod' => 'PATCH',
  205. 'parameters' => array(
  206. 'calendarId' => array(
  207. 'location' => 'path',
  208. 'type' => 'string',
  209. 'required' => true,
  210. ),
  211. 'colorRgbFormat' => array(
  212. 'location' => 'query',
  213. 'type' => 'boolean',
  214. ),
  215. ),
  216. ),'update' => array(
  217. 'path' => 'users/me/calendarList/{calendarId}',
  218. 'httpMethod' => 'PUT',
  219. 'parameters' => array(
  220. 'calendarId' => array(
  221. 'location' => 'path',
  222. 'type' => 'string',
  223. 'required' => true,
  224. ),
  225. 'colorRgbFormat' => array(
  226. 'location' => 'query',
  227. 'type' => 'boolean',
  228. ),
  229. ),
  230. ),
  231. )
  232. )
  233. );
  234. $this->calendars = new Google_Service_Calendar_Calendars_Resource(
  235. $this,
  236. $this->serviceName,
  237. 'calendars',
  238. array(
  239. 'methods' => array(
  240. 'clear' => array(
  241. 'path' => 'calendars/{calendarId}/clear',
  242. 'httpMethod' => 'POST',
  243. 'parameters' => array(
  244. 'calendarId' => array(
  245. 'location' => 'path',
  246. 'type' => 'string',
  247. 'required' => true,
  248. ),
  249. ),
  250. ),'delete' => array(
  251. 'path' => 'calendars/{calendarId}',
  252. 'httpMethod' => 'DELETE',
  253. 'parameters' => array(
  254. 'calendarId' => array(
  255. 'location' => 'path',
  256. 'type' => 'string',
  257. 'required' => true,
  258. ),
  259. ),
  260. ),'get' => array(
  261. 'path' => 'calendars/{calendarId}',
  262. 'httpMethod' => 'GET',
  263. 'parameters' => array(
  264. 'calendarId' => array(
  265. 'location' => 'path',
  266. 'type' => 'string',
  267. 'required' => true,
  268. ),
  269. ),
  270. ),'insert' => array(
  271. 'path' => 'calendars',
  272. 'httpMethod' => 'POST',
  273. 'parameters' => array(),
  274. ),'patch' => array(
  275. 'path' => 'calendars/{calendarId}',
  276. 'httpMethod' => 'PATCH',
  277. 'parameters' => array(
  278. 'calendarId' => array(
  279. 'location' => 'path',
  280. 'type' => 'string',
  281. 'required' => true,
  282. ),
  283. ),
  284. ),'update' => array(
  285. 'path' => 'calendars/{calendarId}',
  286. 'httpMethod' => 'PUT',
  287. 'parameters' => array(
  288. 'calendarId' => array(
  289. 'location' => 'path',
  290. 'type' => 'string',
  291. 'required' => true,
  292. ),
  293. ),
  294. ),
  295. )
  296. )
  297. );
  298. $this->channels = new Google_Service_Calendar_Channels_Resource(
  299. $this,
  300. $this->serviceName,
  301. 'channels',
  302. array(
  303. 'methods' => array(
  304. 'stop' => array(
  305. 'path' => 'channels/stop',
  306. 'httpMethod' => 'POST',
  307. 'parameters' => array(),
  308. ),
  309. )
  310. )
  311. );
  312. $this->colors = new Google_Service_Calendar_Colors_Resource(
  313. $this,
  314. $this->serviceName,
  315. 'colors',
  316. array(
  317. 'methods' => array(
  318. 'get' => array(
  319. 'path' => 'colors',
  320. 'httpMethod' => 'GET',
  321. 'parameters' => array(),
  322. ),
  323. )
  324. )
  325. );
  326. $this->events = new Google_Service_Calendar_Events_Resource(
  327. $this,
  328. $this->serviceName,
  329. 'events',
  330. array(
  331. 'methods' => array(
  332. 'delete' => array(
  333. 'path' => 'calendars/{calendarId}/events/{eventId}',
  334. 'httpMethod' => 'DELETE',
  335. 'parameters' => array(
  336. 'calendarId' => array(
  337. 'location' => 'path',
  338. 'type' => 'string',
  339. 'required' => true,
  340. ),
  341. 'eventId' => array(
  342. 'location' => 'path',
  343. 'type' => 'string',
  344. 'required' => true,
  345. ),
  346. 'sendNotifications' => array(
  347. 'location' => 'query',
  348. 'type' => 'boolean',
  349. ),
  350. ),
  351. ),'get' => array(
  352. 'path' => 'calendars/{calendarId}/events/{eventId}',
  353. 'httpMethod' => 'GET',
  354. 'parameters' => array(
  355. 'calendarId' => array(
  356. 'location' => 'path',
  357. 'type' => 'string',
  358. 'required' => true,
  359. ),
  360. 'eventId' => array(
  361. 'location' => 'path',
  362. 'type' => 'string',
  363. 'required' => true,
  364. ),
  365. 'timeZone' => array(
  366. 'location' => 'query',
  367. 'type' => 'string',
  368. ),
  369. 'alwaysIncludeEmail' => array(
  370. 'location' => 'query',
  371. 'type' => 'boolean',
  372. ),
  373. 'maxAttendees' => array(
  374. 'location' => 'query',
  375. 'type' => 'integer',
  376. ),
  377. ),
  378. ),'import' => array(
  379. 'path' => 'calendars/{calendarId}/events/import',
  380. 'httpMethod' => 'POST',
  381. 'parameters' => array(
  382. 'calendarId' => array(
  383. 'location' => 'path',
  384. 'type' => 'string',
  385. 'required' => true,
  386. ),
  387. ),
  388. ),'insert' => array(
  389. 'path' => 'calendars/{calendarId}/events',
  390. 'httpMethod' => 'POST',
  391. 'parameters' => array(
  392. 'calendarId' => array(
  393. 'location' => 'path',
  394. 'type' => 'string',
  395. 'required' => true,
  396. ),
  397. 'sendNotifications' => array(
  398. 'location' => 'query',
  399. 'type' => 'boolean',
  400. ),
  401. 'maxAttendees' => array(
  402. 'location' => 'query',
  403. 'type' => 'integer',
  404. ),
  405. ),
  406. ),'instances' => array(
  407. 'path' => 'calendars/{calendarId}/events/{eventId}/instances',
  408. 'httpMethod' => 'GET',
  409. 'parameters' => array(
  410. 'calendarId' => array(
  411. 'location' => 'path',
  412. 'type' => 'string',
  413. 'required' => true,
  414. ),
  415. 'eventId' => array(
  416. 'location' => 'path',
  417. 'type' => 'string',
  418. 'required' => true,
  419. ),
  420. 'showDeleted' => array(
  421. 'location' => 'query',
  422. 'type' => 'boolean',
  423. ),
  424. 'timeMax' => array(
  425. 'location' => 'query',
  426. 'type' => 'string',
  427. ),
  428. 'alwaysIncludeEmail' => array(
  429. 'location' => 'query',
  430. 'type' => 'boolean',
  431. ),
  432. 'maxResults' => array(
  433. 'location' => 'query',
  434. 'type' => 'integer',
  435. ),
  436. 'pageToken' => array(
  437. 'location' => 'query',
  438. 'type' => 'string',
  439. ),
  440. 'timeMin' => array(
  441. 'location' => 'query',
  442. 'type' => 'string',
  443. ),
  444. 'timeZone' => array(
  445. 'location' => 'query',
  446. 'type' => 'string',
  447. ),
  448. 'originalStart' => array(
  449. 'location' => 'query',
  450. 'type' => 'string',
  451. ),
  452. 'maxAttendees' => array(
  453. 'location' => 'query',
  454. 'type' => 'integer',
  455. ),
  456. ),
  457. ),'list' => array(
  458. 'path' => 'calendars/{calendarId}/events',
  459. 'httpMethod' => 'GET',
  460. 'parameters' => array(
  461. 'calendarId' => array(
  462. 'location' => 'path',
  463. 'type' => 'string',
  464. 'required' => true,
  465. ),
  466. 'orderBy' => array(
  467. 'location' => 'query',
  468. 'type' => 'string',
  469. ),
  470. 'showHiddenInvitations' => array(
  471. 'location' => 'query',
  472. 'type' => 'boolean',
  473. ),
  474. 'showDeleted' => array(
  475. 'location' => 'query',
  476. 'type' => 'boolean',
  477. ),
  478. 'iCalUID' => array(
  479. 'location' => 'query',
  480. 'type' => 'string',
  481. ),
  482. 'updatedMin' => array(
  483. 'location' => 'query',
  484. 'type' => 'string',
  485. ),
  486. 'singleEvents' => array(
  487. 'location' => 'query',
  488. 'type' => 'boolean',
  489. ),
  490. 'timeMax' => array(
  491. 'location' => 'query',
  492. 'type' => 'string',
  493. ),
  494. 'alwaysIncludeEmail' => array(
  495. 'location' => 'query',
  496. 'type' => 'boolean',
  497. ),
  498. 'maxResults' => array(
  499. 'location' => 'query',
  500. 'type' => 'integer',
  501. ),
  502. 'q' => array(
  503. 'location' => 'query',
  504. 'type' => 'string',
  505. ),
  506. 'pageToken' => array(
  507. 'location' => 'query',
  508. 'type' => 'string',
  509. ),
  510. 'timeMin' => array(
  511. 'location' => 'query',
  512. 'type' => 'string',
  513. ),
  514. 'timeZone' => array(
  515. 'location' => 'query',
  516. 'type' => 'string',
  517. ),
  518. 'privateExtendedProperty' => array(
  519. 'location' => 'query',
  520. 'type' => 'string',
  521. 'repeated' => true,
  522. ),
  523. 'sharedExtendedProperty' => array(
  524. 'location' => 'query',
  525. 'type' => 'string',
  526. 'repeated' => true,
  527. ),
  528. 'maxAttendees' => array(
  529. 'location' => 'query',
  530. 'type' => 'integer',
  531. ),
  532. ),
  533. ),'move' => array(
  534. 'path' => 'calendars/{calendarId}/events/{eventId}/move',
  535. 'httpMethod' => 'POST',
  536. 'parameters' => array(
  537. 'calendarId' => array(
  538. 'location' => 'path',
  539. 'type' => 'string',
  540. 'required' => true,
  541. ),
  542. 'eventId' => array(
  543. 'location' => 'path',
  544. 'type' => 'string',
  545. 'required' => true,
  546. ),
  547. 'destination' => array(
  548. 'location' => 'query',
  549. 'type' => 'string',
  550. 'required' => true,
  551. ),
  552. 'sendNotifications' => array(
  553. 'location' => 'query',
  554. 'type' => 'boolean',
  555. ),
  556. ),
  557. ),'patch' => array(
  558. 'path' => 'calendars/{calendarId}/events/{eventId}',
  559. 'httpMethod' => 'PATCH',
  560. 'parameters' => array(
  561. 'calendarId' => array(
  562. 'location' => 'path',
  563. 'type' => 'string',
  564. 'required' => true,
  565. ),
  566. 'eventId' => array(
  567. 'location' => 'path',
  568. 'type' => 'string',
  569. 'required' => true,
  570. ),
  571. 'sendNotifications' => array(
  572. 'location' => 'query',
  573. 'type' => 'boolean',
  574. ),
  575. 'alwaysIncludeEmail' => array(
  576. 'location' => 'query',
  577. 'type' => 'boolean',
  578. ),
  579. 'maxAttendees' => array(
  580. 'location' => 'query',
  581. 'type' => 'integer',
  582. ),
  583. ),
  584. ),'quickAdd' => array(
  585. 'path' => 'calendars/{calendarId}/events/quickAdd',
  586. 'httpMethod' => 'POST',
  587. 'parameters' => array(
  588. 'calendarId' => array(
  589. 'location' => 'path',
  590. 'type' => 'string',
  591. 'required' => true,
  592. ),
  593. 'text' => array(
  594. 'location' => 'query',
  595. 'type' => 'string',
  596. 'required' => true,
  597. ),
  598. 'sendNotifications' => array(
  599. 'location' => 'query',
  600. 'type' => 'boolean',
  601. ),
  602. ),
  603. ),'update' => array(
  604. 'path' => 'calendars/{calendarId}/events/{eventId}',
  605. 'httpMethod' => 'PUT',
  606. 'parameters' => array(
  607. 'calendarId' => array(
  608. 'location' => 'path',
  609. 'type' => 'string',
  610. 'required' => true,
  611. ),
  612. 'eventId' => array(
  613. 'location' => 'path',
  614. 'type' => 'string',
  615. 'required' => true,
  616. ),
  617. 'sendNotifications' => array(
  618. 'location' => 'query',
  619. 'type' => 'boolean',
  620. ),
  621. 'alwaysIncludeEmail' => array(
  622. 'location' => 'query',
  623. 'type' => 'boolean',
  624. ),
  625. 'maxAttendees' => array(
  626. 'location' => 'query',
  627. 'type' => 'integer',
  628. ),
  629. ),
  630. ),'watch' => array(
  631. 'path' => 'calendars/{calendarId}/events/watch',
  632. 'httpMethod' => 'POST',
  633. 'parameters' => array(
  634. 'calendarId' => array(
  635. 'location' => 'path',
  636. 'type' => 'string',
  637. 'required' => true,
  638. ),
  639. 'orderBy' => array(
  640. 'location' => 'query',
  641. 'type' => 'string',
  642. ),
  643. 'showHiddenInvitations' => array(
  644. 'location' => 'query',
  645. 'type' => 'boolean',
  646. ),
  647. 'showDeleted' => array(
  648. 'location' => 'query',
  649. 'type' => 'boolean',
  650. ),
  651. 'iCalUID' => array(
  652. 'location' => 'query',
  653. 'type' => 'string',
  654. ),
  655. 'updatedMin' => array(
  656. 'location' => 'query',
  657. 'type' => 'string',
  658. ),
  659. 'singleEvents' => array(
  660. 'location' => 'query',
  661. 'type' => 'boolean',
  662. ),
  663. 'timeMax' => array(
  664. 'location' => 'query',
  665. 'type' => 'string',
  666. ),
  667. 'alwaysIncludeEmail' => array(
  668. 'location' => 'query',
  669. 'type' => 'boolean',
  670. ),
  671. 'maxResults' => array(
  672. 'location' => 'query',
  673. 'type' => 'integer',
  674. ),
  675. 'q' => array(
  676. 'location' => 'query',
  677. 'type' => 'string',
  678. ),
  679. 'pageToken' => array(
  680. 'location' => 'query',
  681. 'type' => 'string',
  682. ),
  683. 'timeMin' => array(
  684. 'location' => 'query',
  685. 'type' => 'string',
  686. ),
  687. 'timeZone' => array(
  688. 'location' => 'query',
  689. 'type' => 'string',
  690. ),
  691. 'privateExtendedProperty' => array(
  692. 'location' => 'query',
  693. 'type' => 'string',
  694. 'repeated' => true,
  695. ),
  696. 'sharedExtendedProperty' => array(
  697. 'location' => 'query',
  698. 'type' => 'string',
  699. 'repeated' => true,
  700. ),
  701. 'maxAttendees' => array(
  702. 'location' => 'query',
  703. 'type' => 'integer',
  704. ),
  705. ),
  706. ),
  707. )
  708. )
  709. );
  710. $this->freebusy = new Google_Service_Calendar_Freebusy_Resource(
  711. $this,
  712. $this->serviceName,
  713. 'freebusy',
  714. array(
  715. 'methods' => array(
  716. 'query' => array(
  717. 'path' => 'freeBusy',
  718. 'httpMethod' => 'POST',
  719. 'parameters' => array(),
  720. ),
  721. )
  722. )
  723. );
  724. $this->settings = new Google_Service_Calendar_Settings_Resource(
  725. $this,
  726. $this->serviceName,
  727. 'settings',
  728. array(
  729. 'methods' => array(
  730. 'get' => array(
  731. 'path' => 'users/me/settings/{setting}',
  732. 'httpMethod' => 'GET',
  733. 'parameters' => array(
  734. 'setting' => array(
  735. 'location' => 'path',
  736. 'type' => 'string',
  737. 'required' => true,
  738. ),
  739. ),
  740. ),'list' => array(
  741. 'path' => 'users/me/settings',
  742. 'httpMethod' => 'GET',
  743. 'parameters' => array(),
  744. ),
  745. )
  746. )
  747. );
  748. }
  749. }
  750. /**
  751. * The "acl" collection of methods.
  752. * Typical usage is:
  753. * <code>
  754. * $calendarService = new Google_Service_Calendar(...);
  755. * $acl = $calendarService->acl;
  756. * </code>
  757. */
  758. class Google_Service_Calendar_Acl_Resource extends Google_Service_Resource
  759. {
  760. /**
  761. * Deletes an access control rule. (acl.delete)
  762. *
  763. * @param string $calendarId
  764. * Calendar identifier.
  765. * @param string $ruleId
  766. * ACL rule identifier.
  767. * @param array $optParams Optional parameters.
  768. */
  769. public function delete($calendarId, $ruleId, $optParams = array())
  770. {
  771. $params = array('calendarId' => $calendarId, 'ruleId' => $ruleId);
  772. $params = array_merge($params, $optParams);
  773. return $this->call('delete', array($params));
  774. }
  775. /**
  776. * Returns an access control rule. (acl.get)
  777. *
  778. * @param string $calendarId
  779. * Calendar identifier.
  780. * @param string $ruleId
  781. * ACL rule identifier.
  782. * @param array $optParams Optional parameters.
  783. * @return Google_Service_Calendar_AclRule
  784. */
  785. public function get($calendarId, $ruleId, $optParams = array())
  786. {
  787. $params = array('calendarId' => $calendarId, 'ruleId' => $ruleId);
  788. $params = array_merge($params, $optParams);
  789. return $this->call('get', array($params), "Google_Service_Calendar_AclRule");
  790. }
  791. /**
  792. * Creates an access control rule. (acl.insert)
  793. *
  794. * @param string $calendarId
  795. * Calendar identifier.
  796. * @param Google_AclRule $postBody
  797. * @param array $optParams Optional parameters.
  798. * @return Google_Service_Calendar_AclRule
  799. */
  800. public function insert($calendarId, Google_Service_Calendar_AclRule $postBody, $optParams = array())
  801. {
  802. $params = array('calendarId' => $calendarId, 'postBody' => $postBody);
  803. $params = array_merge($params, $optParams);
  804. return $this->call('insert', array($params), "Google_Service_Calendar_AclRule");
  805. }
  806. /**
  807. * Returns the rules in the access control list for the calendar. (acl.listAcl)
  808. *
  809. * @param string $calendarId
  810. * Calendar identifier.
  811. * @param array $optParams Optional parameters.
  812. * @return Google_Service_Calendar_Acl
  813. */
  814. public function listAcl($calendarId, $optParams = array())
  815. {
  816. $params = array('calendarId' => $calendarId);
  817. $params = array_merge($params, $optParams);
  818. return $this->call('list', array($params), "Google_Service_Calendar_Acl");
  819. }
  820. /**
  821. * Updates an access control rule. This method supports patch semantics.
  822. * (acl.patch)
  823. *
  824. * @param string $calendarId
  825. * Calendar identifier.
  826. * @param string $ruleId
  827. * ACL rule identifier.
  828. * @param Google_AclRule $postBody
  829. * @param array $optParams Optional parameters.
  830. * @return Google_Service_Calendar_AclRule
  831. */
  832. public function patch($calendarId, $ruleId, Google_Service_Calendar_AclRule $postBody, $optParams = array())
  833. {
  834. $params = array('calendarId' => $calendarId, 'ruleId' => $ruleId, 'postBody' => $postBody);
  835. $params = array_merge($params, $optParams);
  836. return $this->call('patch', array($params), "Google_Service_Calendar_AclRule");
  837. }
  838. /**
  839. * Updates an access control rule. (acl.update)
  840. *
  841. * @param string $calendarId
  842. * Calendar identifier.
  843. * @param string $ruleId
  844. * ACL rule identifier.
  845. * @param Google_AclRule $postBody
  846. * @param array $optParams Optional parameters.
  847. * @return Google_Service_Calendar_AclRule
  848. */
  849. public function update($calendarId, $ruleId, Google_Service_Calendar_AclRule $postBody, $optParams = array())
  850. {
  851. $params = array('calendarId' => $calendarId, 'ruleId' => $ruleId, 'postBody' => $postBody);
  852. $params = array_merge($params, $optParams);
  853. return $this->call('update', array($params), "Google_Service_Calendar_AclRule");
  854. }
  855. }
  856. /**
  857. * The "calendarList" collection of methods.
  858. * Typical usage is:
  859. * <code>
  860. * $calendarService = new Google_Service_Calendar(...);
  861. * $calendarList = $calendarService->calendarList;
  862. * </code>
  863. */
  864. class Google_Service_Calendar_CalendarList_Resource extends Google_Service_Resource
  865. {
  866. /**
  867. * Deletes an entry on the user's calendar list. (calendarList.delete)
  868. *
  869. * @param string $calendarId
  870. * Calendar identifier.
  871. * @param array $optParams Optional parameters.
  872. */
  873. public function delete($calendarId, $optParams = array())
  874. {
  875. $params = array('calendarId' => $calendarId);
  876. $params = array_merge($params, $optParams);
  877. return $this->call('delete', array($params));
  878. }
  879. /**
  880. * Returns an entry on the user's calendar list. (calendarList.get)
  881. *
  882. * @param string $calendarId
  883. * Calendar identifier.
  884. * @param array $optParams Optional parameters.
  885. * @return Google_Service_Calendar_CalendarListEntry
  886. */
  887. public function get($calendarId, $optParams = array())
  888. {
  889. $params = array('calendarId' => $calendarId);
  890. $params = array_merge($params, $optParams);
  891. return $this->call('get', array($params), "Google_Service_Calendar_CalendarListEntry");
  892. }
  893. /**
  894. * Adds an entry to the user's calendar list. (calendarList.insert)
  895. *
  896. * @param Google_CalendarListEntry $postBody
  897. * @param array $optParams Optional parameters.
  898. *
  899. * @opt_param bool colorRgbFormat
  900. * Whether to use the 'foregroundColor' and 'backgroundColor' fields to write the calendar colors
  901. * (RGB). If this feature is used, the index-based 'colorId' field will be set to the best matching
  902. * option automatically. Optional. The default is False.
  903. * @return Google_Service_Calendar_CalendarListEntry
  904. */
  905. public function insert(Google_Service_Calendar_CalendarListEntry $postBody, $optParams = array())
  906. {
  907. $params = array('postBody' => $postBody);
  908. $params = array_merge($params, $optParams);
  909. return $this->call('insert', array($params), "Google_Service_Calendar_CalendarListEntry");
  910. }
  911. /**
  912. * Returns entries on the user's calendar list. (calendarList.listCalendarList)
  913. *
  914. * @param array $optParams Optional parameters.
  915. *
  916. * @opt_param string pageToken
  917. * Token specifying which result page to return. Optional.
  918. * @opt_param bool showHidden
  919. * Whether to show hidden entries. Optional. The default is False.
  920. * @opt_param int maxResults
  921. * Maximum number of entries returned on one result page. Optional.
  922. * @opt_param string minAccessRole
  923. * The minimum access role for the user in the returned entires. Optional. The default is no
  924. * restriction.
  925. * @return Google_Service_Calendar_CalendarList
  926. */
  927. public function listCalendarList($optParams = array())
  928. {
  929. $params = array();
  930. $params = array_merge($params, $optParams);
  931. return $this->call('list', array($params), "Google_Service_Calendar_CalendarList");
  932. }
  933. /**
  934. * Updates an entry on the user's calendar list. This method supports patch
  935. * semantics. (calendarList.patch)
  936. *
  937. * @param string $calendarId
  938. * Calendar identifier.
  939. * @param Google_CalendarListEntry $postBody
  940. * @param array $optParams Optional parameters.
  941. *
  942. * @opt_param bool colorRgbFormat
  943. * Whether to use the 'foregroundColor' and 'backgroundColor' fields to write the calendar colors
  944. * (RGB). If this feature is used, the index-based 'colorId' field will be set to the best matching
  945. * option automatically. Optional. The default is False.
  946. * @return Google_Service_Calendar_CalendarListEntry
  947. */
  948. public function patch($calendarId, Google_Service_Calendar_CalendarListEntry $postBody, $optParams = array())
  949. {
  950. $params = array('calendarId' => $calendarId, 'postBody' => $postBody);
  951. $params = array_merge($params, $optParams);
  952. return $this->call('patch', array($params), "Google_Service_Calendar_CalendarListEntry");
  953. }
  954. /**
  955. * Updates an entry on the user's calendar list. (calendarList.update)
  956. *
  957. * @param string $calendarId
  958. * Calendar identifier.
  959. * @param Google_CalendarListEntry $postBody
  960. * @param array $optParams Optional parameters.
  961. *
  962. * @opt_param bool colorRgbFormat
  963. * Whether to use the 'foregroundColor' and 'backgroundColor' fields to write the calendar colors
  964. * (RGB). If this feature is used, the index-based 'colorId' field will be set to the best matching
  965. * option automatically. Optional. The default is False.
  966. * @return Google_Service_Calendar_CalendarListEntry
  967. */
  968. public function update($calendarId, Google_Service_Calendar_CalendarListEntry $postBody, $optParams = array())
  969. {
  970. $params = array('calendarId' => $calendarId, 'postBody' => $postBody);
  971. $params = array_merge($params, $optParams);
  972. return $this->call('update', array($params), "Google_Service_Calendar_CalendarListEntry");
  973. }
  974. }
  975. /**
  976. * The "calendars" collection of methods.
  977. * Typical usage is:
  978. * <code>
  979. * $calendarService = new Google_Service_Calendar(...);
  980. * $calendars = $calendarService->calendars;
  981. * </code>
  982. */
  983. class Google_Service_Calendar_Calendars_Resource extends Google_Service_Resource
  984. {
  985. /**
  986. * Clears a primary calendar. This operation deletes all data associated with
  987. * the primary calendar of an account and cannot be undone. (calendars.clear)
  988. *
  989. * @param string $calendarId
  990. * Calendar identifier.
  991. * @param array $optParams Optional parameters.
  992. */
  993. public function clear($calendarId, $optParams = array())
  994. {
  995. $params = array('calendarId' => $calendarId);
  996. $params = array_merge($params, $optParams);
  997. return $this->call('clear', array($params));
  998. }
  999. /**
  1000. * Deletes a secondary calendar. (calendars.delete)
  1001. *
  1002. * @param string $calendarId
  1003. * Calendar identifier.
  1004. * @param array $optParams Optional parameters.
  1005. */
  1006. public function delete($calendarId, $optParams = array())
  1007. {
  1008. $params = array('calendarId' => $calendarId);
  1009. $params = array_merge($params, $optParams);
  1010. return $this->call('delete', array($params));
  1011. }
  1012. /**
  1013. * Returns metadata for a calendar. (calendars.get)
  1014. *
  1015. * @param string $calendarId
  1016. * Calendar identifier.
  1017. * @param array $optParams Optional parameters.
  1018. * @return Google_Service_Calendar_Calendar
  1019. */
  1020. public function get($calendarId, $optParams = array())
  1021. {
  1022. $params = array('calendarId' => $calendarId);
  1023. $params = array_merge($params, $optParams);
  1024. return $this->call('get', array($params), "Google_Service_Calendar_Calendar");
  1025. }
  1026. /**
  1027. * Creates a secondary calendar. (calendars.insert)
  1028. *
  1029. * @param Google_Calendar $postBody
  1030. * @param array $optParams Optional parameters.
  1031. * @return Google_Service_Calendar_Calendar
  1032. */
  1033. public function insert(Google_Service_Calendar_Calendar $postBody, $optParams = array())
  1034. {
  1035. $params = array('postBody' => $postBody);
  1036. $params = array_merge($params, $optParams);
  1037. return $this->call('insert', array($params), "Google_Service_Calendar_Calendar");
  1038. }
  1039. /**
  1040. * Updates metadata for a calendar. This method supports patch semantics.
  1041. * (calendars.patch)
  1042. *
  1043. * @param string $calendarId
  1044. * Calendar identifier.
  1045. * @param Google_Calendar $postBody
  1046. * @param array $optParams Optional parameters.
  1047. * @return Google_Service_Calendar_Calendar
  1048. */
  1049. public function patch($calendarId, Google_Service_Calendar_Calendar $postBody, $optParams = array())
  1050. {
  1051. $params = array('calendarId' => $calendarId, 'postBody' => $postBody);
  1052. $params = array_merge($params, $optParams);
  1053. return $this->call('patch', array($params), "Google_Service_Calendar_Calendar");
  1054. }
  1055. /**
  1056. * Updates metadata for a calendar. (calendars.update)
  1057. *
  1058. * @param string $calendarId
  1059. * Calendar identifier.
  1060. * @param Google_Calendar $postBody
  1061. * @param array $optParams Optional parameters.
  1062. * @return Google_Service_Calendar_Calendar
  1063. */
  1064. public function update($calendarId, Google_Service_Calendar_Calendar $postBody, $optParams = array())
  1065. {
  1066. $params = array('calendarId' => $calendarId, 'postBody' => $postBody);
  1067. $params = array_merge($params, $optParams);
  1068. return $this->call('update', array($params), "Google_Service_Calendar_Calendar");
  1069. }
  1070. }
  1071. /**
  1072. * The "channels" collection of methods.
  1073. * Typical usage is:
  1074. * <code>
  1075. * $calendarService = new Google_Service_Calendar(...);
  1076. * $channels = $calendarService->channels;
  1077. * </code>
  1078. */
  1079. class Google_Service_Calendar_Channels_Resource extends Google_Service_Resource
  1080. {
  1081. /**
  1082. * Stop watching resources through this channel (channels.stop)
  1083. *
  1084. * @param Google_Channel $postBody
  1085. * @param array $optParams Optional parameters.
  1086. */
  1087. public function stop(Google_Service_Calendar_Channel $postBody, $optParams = array())
  1088. {
  1089. $params = array('postBody' => $postBody);
  1090. $params = array_merge($params, $optParams);
  1091. return $this->call('stop', array($params));
  1092. }
  1093. }
  1094. /**
  1095. * The "colors" collection of methods.
  1096. * Typical usage is:
  1097. * <code>
  1098. * $calendarService = new Google_Service_Calendar(...);
  1099. * $colors = $calendarService->colors;
  1100. * </code>
  1101. */
  1102. class Google_Service_Calendar_Colors_Resource extends Google_Service_Resource
  1103. {
  1104. /**
  1105. * Returns the color definitions for calendars and events. (colors.get)
  1106. *
  1107. * @param array $optParams Optional parameters.
  1108. * @return Google_Service_Calendar_Colors
  1109. */
  1110. public function get($optParams = array())
  1111. {
  1112. $params = array();
  1113. $params = array_merge($params, $optParams);
  1114. return $this->call('get', array($params), "Google_Service_Calendar_Colors");
  1115. }
  1116. }
  1117. /**
  1118. * The "events" collection of methods.
  1119. * Typical usage is:
  1120. * <code>
  1121. * $calendarService = new Google_Service_Calendar(...);
  1122. * $events = $calendarService->events;
  1123. * </code>
  1124. */
  1125. class Google_Service_Calendar_Events_Resource extends Google_Service_Resource
  1126. {
  1127. /**
  1128. * Deletes an event. (events.delete)
  1129. *
  1130. * @param string $calendarId
  1131. * Calendar identifier.
  1132. * @param string $eventId
  1133. * Event identifier.
  1134. * @param array $optParams Optional parameters.
  1135. *
  1136. * @opt_param bool sendNotifications
  1137. * Whether to send notifications about the deletion of the event. Optional. The default is False.
  1138. */
  1139. public function delete($calendarId, $eventId, $optParams = array())
  1140. {
  1141. $params = array('calendarId' => $calendarId, 'eventId' => $eventId);
  1142. $params = array_merge($params, $optParams);
  1143. return $this->call('delete', array($params));
  1144. }
  1145. /**
  1146. * Returns an event. (events.get)
  1147. *
  1148. * @param string $calendarId
  1149. * Calendar identifier.
  1150. * @param string $eventId
  1151. * Event identifier.
  1152. * @param array $optParams Optional parameters.
  1153. *
  1154. * @opt_param string timeZone
  1155. * Time zone used in the response. Optional. The default is the time zone of the calendar.
  1156. * @opt_param bool alwaysIncludeEmail
  1157. * Whether to always include a value in the "email" field for the organizer, creator and attendees,
  1158. * even if no real email is available (i.e. a generated, non-working value will be provided). The
  1159. * use of this option is discouraged and should only be used by clients which cannot handle the
  1160. * absence of an email address value in the mentioned places. Optional. The default is False.
  1161. * @opt_param int maxAttendees
  1162. * The maximum number of attendees to include in the response. If there are more than the specified
  1163. * number of attendees, only the participant is returned. Optional.
  1164. * @return Google_Service_Calendar_Event
  1165. */
  1166. public function get($calendarId, $eventId, $optParams = array())
  1167. {
  1168. $params = array('calendarId' => $calendarId, 'eventId' => $eventId);
  1169. $params = array_merge($params, $optParams);
  1170. return $this->call('get', array($params), "Google_Service_Calendar_Event");
  1171. }
  1172. /**
  1173. * Imports an event. This operation is used to add a private copy of an existing
  1174. * event to a calendar. (events.import)
  1175. *
  1176. * @param string $calendarId
  1177. * Calendar identifier.
  1178. * @param Google_Event $postBody
  1179. * @param array $optParams Optional parameters.
  1180. * @return Google_Service_Calendar_Event
  1181. */
  1182. public function import($calendarId, Google_Service_Calendar_Event $postBody, $optParams = array())
  1183. {
  1184. $params = array('calendarId' => $calendarId, 'postBody' => $postBody);
  1185. $params = array_merge($params, $optParams);
  1186. return $this->call('import', array($params), "Google_Service_Calendar_Event");
  1187. }
  1188. /**
  1189. * Creates an event. (events.insert)
  1190. *
  1191. * @param string $calendarId
  1192. * Calendar identifier.
  1193. * @param Google_Event $postBody
  1194. * @param array $optParams Optional parameters.
  1195. *
  1196. * @opt_param bool sendNotifications
  1197. * Whether to send notifications about the creation of the new event. Optional. The default is
  1198. * False.
  1199. * @opt_param int maxAttendees
  1200. * The maximum number of attendees to include in the response. If there are more than the specified
  1201. * number of attendees, only the participant is returned. Optional.
  1202. * @return Google_Service_Calendar_Event
  1203. */
  1204. public function insert($calendarId, Google_Service_Calendar_Event $postBody, $optParams = array())
  1205. {
  1206. $params = array('calendarId' => $calendarId, 'postBody' => $postBody);
  1207. $params = array_merge($params, $optParams);
  1208. return $this->call('insert', array($params), "Google_Service_Calendar_Event");
  1209. }
  1210. /**
  1211. * Returns instances of the specified recurring event. (events.instances)
  1212. *
  1213. * @param string $calendarId
  1214. * Calendar identifier.
  1215. * @param string $eventId
  1216. * Recurring event identifier.
  1217. * @param array $optParams Optional parameters.
  1218. *
  1219. * @opt_param bool showDeleted
  1220. * Whether to include deleted events (with 'status' equals 'cancelled') in the result. Cancelled
  1221. * instances of recurring events will still be included if 'singleEvents' is False. Optional. The
  1222. * default is False.
  1223. * @opt_param string timeMax
  1224. * Upper bound (exclusive) for an event's start time to filter by. Optional. The default is not to
  1225. * filter by start time.
  1226. * @opt_param bool alwaysIncludeEmail
  1227. * Whether to always include a value in the "email" field for the organizer, creator and attendees,
  1228. * even if no real email is available (i.e. a generated, non-working value will be provided). The
  1229. * use of this option is discouraged and should only be used by clients which cannot handle the
  1230. * absence of an email address value in the mentioned places. Optional. The default is False.
  1231. * @opt_param int maxResults
  1232. * Maximum number of events returned on one result page. Optional.
  1233. * @opt_param string pageToken
  1234. * Token specifying which result page to return. Optional.
  1235. * @opt_param string timeMin
  1236. * Lower bound (inclusive) for an event's end time to filter by. Optional. The default is not to
  1237. * filter by end time.
  1238. * @opt_param string timeZone
  1239. * Time zone used in the response. Optional. The default is the time zone of the calendar.
  1240. * @opt_param string originalStart
  1241. * The original start time of the instance in the result. Optional.
  1242. * @opt_param int maxAttendees
  1243. * The maximum number of attendees to include in the response. If there are more than the specified
  1244. * number of attendees, only the participant is returned. Optional.
  1245. * @return Google_Service_Calendar_Events
  1246. */
  1247. public function instances($calendarId, $eventId, $optParams = array())
  1248. {
  1249. $params = array('calendarId' => $calendarId, 'eventId' => $eventId);
  1250. $params = array_merge($params, $optParams);
  1251. return $this->call('instances', array($params), "Google_Service_Calendar_Events");
  1252. }
  1253. /**
  1254. * Returns events on the specified calendar. (events.listEvents)
  1255. *
  1256. * @param string $calendarId
  1257. * Calendar identifier.
  1258. * @param array $optParams Optional parameters.
  1259. *
  1260. * @opt_param string orderBy
  1261. * The order of the events returned in the result. Optional. The default is an unspecified, stable
  1262. * order.
  1263. * @opt_param bool showHiddenInvitations
  1264. * Whether to include hidden invitations in the result. Optional. The default is False.
  1265. * @opt_param bool showDeleted
  1266. * Whether to include deleted events (with 'status' equals 'cancelled') in the result. Cancelled
  1267. * instances of recurring events (but not the underlying recurring event) will still be included if
  1268. * 'showDeleted' and 'singleEvents' are both False. If 'showDeleted' and 'singleEvents' are both
  1269. * True, only single instances of deleted events (but not the underlying recurring events) are
  1270. * returned. Optional. The default is False.
  1271. * @opt_param string iCalUID
  1272. * Specifies iCalendar UID (iCalUID) of events to be included in the response. Optional.
  1273. * @opt_param string updatedMin
  1274. * Lower bound for an event's last modification time (as a RFC 3339 timestamp) to filter by.
  1275. * Optional. The default is not to filter by last modification time.
  1276. * @opt_param bool singleEvents
  1277. * Whether to expand recurring events into instances and only return single one-off events and
  1278. * instances of recurring events, but not the underlying recurring events themselves. Optional. The
  1279. * default is False.
  1280. * @opt_param string timeMax
  1281. * Upper bound (exclusive) for an event's start time to filter by. Optional. The default is not to
  1282. * filter by start time.
  1283. * @opt_param bool alwaysIncludeEmail
  1284. * Whether to always include a value in the "email" field for the organizer, creator and attendees,
  1285. * even if no real email is available (i.e. a generated, non-working value will be provided). The
  1286. * use of this option is discouraged and should only be used by clients which cannot handle the
  1287. * absence of an email address value in the mentioned places. Optional. The default is False.
  1288. * @opt_param int maxResults
  1289. * Maximum number of events returned on one result page. Optional.
  1290. * @opt_param string q
  1291. * Free text search terms to find events that match these terms in any field, except for extended
  1292. * properties. Optional.
  1293. * @opt_param string pageToken
  1294. * Token specifying which result page to return. Optional.
  1295. * @opt_param string timeMin
  1296. * Lower bound (inclusive) for an event's end time to filter by. Optional. The default is not to
  1297. * filter by end time.
  1298. * @opt_param string timeZone
  1299. * Time zone used in the response. Optional. The default is the time zone of the calendar.
  1300. * @opt_param string privateExtendedProperty
  1301. * Extended properties constraint specified as propertyName=value. Matches only private properties.
  1302. * This parameter might be repeated multiple times to return events that match all given
  1303. * constraints.
  1304. * @opt_param string sharedExtendedProperty
  1305. * Extended properties constraint specified as propertyName=value. Matches only shared properties.
  1306. * This parameter might be repeated multiple times to return events that match all given
  1307. * constraints.
  1308. * @opt_param int maxAttendees
  1309. * The maximum number of attendees to include in the response. If there are more than the specified
  1310. * number of attendees, only the participant is returned. Optional.
  1311. * @return Google_Service_Calendar_Events
  1312. */
  1313. public function listEvents($calendarId, $optParams = array())
  1314. {
  1315. $params = array('calendarId' => $calendarId);
  1316. $params = array_merge($params, $optParams);
  1317. return $this->call('list', array($params), "Google_Service_Calendar_Events");
  1318. }
  1319. /**
  1320. * Moves an event to another calendar, i.e. changes an event's organizer.
  1321. * (events.move)
  1322. *
  1323. * @param string $calendarId
  1324. * Calendar identifier of the source calendar where the event currently is on.
  1325. * @param string $eventId
  1326. * Event identifier.
  1327. * @param string $destination
  1328. * Calendar identifier of the target calendar where the event is to be moved to.
  1329. * @param array $optParams Optional parameters.
  1330. *
  1331. * @opt_param bool sendNotifications
  1332. * Whether to send notifications about the change of the event's organizer. Optional. The default
  1333. * is False.
  1334. * @return Google_Service_Calendar_Event
  1335. */
  1336. public function move($calendarId, $eventId, $destination, $optParams = array())
  1337. {
  1338. $params = array('calendarId' => $calendarId, 'eventId' => $eventId, 'destination' => $destination);
  1339. $params = array_merge($params, $optParams);
  1340. return $this->call('move', array($params), "Google_Service_Calendar_Event");
  1341. }
  1342. /**
  1343. * Updates an event. This method supports patch semantics. (events.patch)
  1344. *
  1345. * @param string $calendarId
  1346. * Calendar identifier.
  1347. * @param string $eventId
  1348. * Event identifier.
  1349. * @param Google_Event $postBody
  1350. * @param array $optParams Optional parameters.
  1351. *
  1352. * @opt_param bool sendNotifications
  1353. * Whether to send notifications about the event update (e.g. attendee's responses, title changes,
  1354. * etc.). Optional. The default is False.
  1355. * @opt_param bool alwaysIncludeEmail
  1356. * Whether to always include a value in the "email" field for the organizer, creator and attendees,
  1357. * even if no real email is available (i.e. a generated, non-working value will be provided). The
  1358. * use of this option is discouraged and should only be used by clients which cannot handle the
  1359. * absence of an email address value in the mentioned places. Optional. The default is False.
  1360. * @opt_param int maxAttendees
  1361. * The maximu…

Large files files are truncated, but you can click here to view the full file