PageRenderTime 40ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/lib/google/contrib/Google_PlusMomentsService.php

https://bitbucket.org/synergylearning/campusconnect
PHP | 567 lines | 506 code | 10 blank | 51 comment | 2 complexity | a4455c8ef47558346a85d2e47588146a MD5 | raw file
Possible License(s): MPL-2.0-no-copyleft-exception, LGPL-3.0, GPL-3.0, LGPL-2.1, Apache-2.0, BSD-3-Clause, AGPL-3.0
  1. <?php
  2. /*
  3. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  4. * use this file except in compliance with the License. You may obtain a copy of
  5. * the License at
  6. *
  7. * http://www.apache.org/licenses/LICENSE-2.0
  8. *
  9. * Unless required by applicable law or agreed to in writing, software
  10. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  11. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  12. * License for the specific language governing permissions and limitations under
  13. * the License.
  14. */
  15. /**
  16. * The "moments" collection of methods.
  17. * Typical usage is:
  18. * <code>
  19. * $plusService = new Google_PlusMomentsService(...);
  20. * $moments = $plusService->moments;
  21. * </code>
  22. */
  23. class Google_MomentsServiceResource extends Google_ServiceResource {
  24. /**
  25. * Record a user activity (e.g Bill watched a video on Youtube) (moments.insert)
  26. *
  27. * @param string $userId The ID of the user to get activities for. The special value "me" can be used to indicate the authenticated user.
  28. * @param string $collection The collection to which to write moments.
  29. * @param Google_Moment $postBody
  30. * @param array $optParams Optional parameters.
  31. *
  32. * @opt_param bool debug Return the moment as written. Should be used only for debugging.
  33. * @return Google_Moment
  34. */
  35. public function insert($userId, $collection, Google_Moment $postBody, $optParams = array()) {
  36. $params = array('userId' => $userId, 'collection' => $collection, 'postBody' => $postBody);
  37. $params = array_merge($params, $optParams);
  38. $data = $this->__call('insert', array($params));
  39. if ($this->useObjects()) {
  40. return new Google_Moment($data);
  41. } else {
  42. return $data;
  43. }
  44. }
  45. }
  46. /**
  47. * Service definition for Google_Plus (v1moments).
  48. *
  49. * <p>
  50. * The Google+ API enables developers to build on top of the Google+ platform.
  51. * </p>
  52. *
  53. * <p>
  54. * For more information about this service, see the
  55. * <a href="https://developers.google.com/+/history/" target="_blank">API Documentation</a>
  56. * </p>
  57. *
  58. * @author Google, Inc.
  59. */
  60. class Google_PlusMomentsService extends Google_Service {
  61. public $moments;
  62. /**
  63. * Constructs the internal representation of the Plus service.
  64. *
  65. * @param Google_Client $client
  66. */
  67. public function __construct(Google_Client $client) {
  68. $this->servicePath = 'plus/v1moments/people/';
  69. $this->version = 'v1moments';
  70. $this->serviceName = 'plus';
  71. $client->addService($this->serviceName, $this->version);
  72. $this->moments = new Google_MomentsServiceResource($this, $this->serviceName, 'moments',
  73. json_decode('{"methods": {"insert": {"parameters": {"debug": {"type": "boolean", "location": "query"}, "userId": {"required": true, "type": "string", "location": "path"}, "collection": {"required": true, "type": "string", "location": "path", "enum": ["vault"]}}, "request": {"$ref": "Moment"}, "response": {"$ref": "Moment"}, "httpMethod": "POST", "path": "{userId}/moments/{collection}", "id": "plus.moments.insert"}}}', true));
  74. }
  75. }
  76. class Google_ItemScope extends Google_Model {
  77. public $startDate;
  78. public $endDate;
  79. public $text;
  80. public $image;
  81. protected $__addressType = 'Google_ItemScope';
  82. protected $__addressDataType = '';
  83. public $address;
  84. public $birthDate;
  85. public $datePublished;
  86. public $addressLocality;
  87. public $duration;
  88. public $additionalName;
  89. public $worstRating;
  90. protected $__contributorType = 'Google_ItemScope';
  91. protected $__contributorDataType = 'array';
  92. public $contributor;
  93. public $thumbnailUrl;
  94. public $id;
  95. public $postOfficeBoxNumber;
  96. protected $__attendeesType = 'Google_ItemScope';
  97. protected $__attendeesDataType = 'array';
  98. public $attendees;
  99. protected $__authorType = 'Google_ItemScope';
  100. protected $__authorDataType = 'array';
  101. public $author;
  102. protected $__associated_mediaType = 'Google_ItemScope';
  103. protected $__associated_mediaDataType = 'array';
  104. public $associated_media;
  105. public $bestRating;
  106. public $addressCountry;
  107. public $width;
  108. public $streetAddress;
  109. protected $__locationType = 'Google_ItemScope';
  110. protected $__locationDataType = '';
  111. public $location;
  112. public $latitude;
  113. protected $__byArtistType = 'Google_ItemScope';
  114. protected $__byArtistDataType = '';
  115. public $byArtist;
  116. public $type;
  117. public $dateModified;
  118. public $contentSize;
  119. public $contentUrl;
  120. protected $__partOfTVSeriesType = 'Google_ItemScope';
  121. protected $__partOfTVSeriesDataType = '';
  122. public $partOfTVSeries;
  123. public $description;
  124. public $familyName;
  125. public $kind;
  126. public $dateCreated;
  127. public $postalCode;
  128. public $attendeeCount;
  129. protected $__inAlbumType = 'Google_ItemScope';
  130. protected $__inAlbumDataType = '';
  131. public $inAlbum;
  132. public $addressRegion;
  133. public $height;
  134. protected $__geoType = 'Google_ItemScope';
  135. protected $__geoDataType = '';
  136. public $geo;
  137. public $embedUrl;
  138. public $tickerSymbol;
  139. public $playerType;
  140. protected $__aboutType = 'Google_ItemScope';
  141. protected $__aboutDataType = '';
  142. public $about;
  143. public $givenName;
  144. public $name;
  145. protected $__performersType = 'Google_ItemScope';
  146. protected $__performersDataType = 'array';
  147. public $performers;
  148. public $url;
  149. public $gender;
  150. public $longitude;
  151. protected $__thumbnailType = 'Google_ItemScope';
  152. protected $__thumbnailDataType = '';
  153. public $thumbnail;
  154. public $caption;
  155. public $ratingValue;
  156. protected $__reviewRatingType = 'Google_ItemScope';
  157. protected $__reviewRatingDataType = '';
  158. public $reviewRating;
  159. protected $__audioType = 'Google_ItemScope';
  160. protected $__audioDataType = '';
  161. public $audio;
  162. public function setStartDate($startDate) {
  163. $this->startDate = $startDate;
  164. }
  165. public function getStartDate() {
  166. return $this->startDate;
  167. }
  168. public function setEndDate($endDate) {
  169. $this->endDate = $endDate;
  170. }
  171. public function getEndDate() {
  172. return $this->endDate;
  173. }
  174. public function setText($text) {
  175. $this->text = $text;
  176. }
  177. public function getText() {
  178. return $this->text;
  179. }
  180. public function setImage($image) {
  181. $this->image = $image;
  182. }
  183. public function getImage() {
  184. return $this->image;
  185. }
  186. public function setAddress(Google_ItemScope $address) {
  187. $this->address = $address;
  188. }
  189. public function getAddress() {
  190. return $this->address;
  191. }
  192. public function setBirthDate($birthDate) {
  193. $this->birthDate = $birthDate;
  194. }
  195. public function getBirthDate() {
  196. return $this->birthDate;
  197. }
  198. public function setDatePublished($datePublished) {
  199. $this->datePublished = $datePublished;
  200. }
  201. public function getDatePublished() {
  202. return $this->datePublished;
  203. }
  204. public function setAddressLocality($addressLocality) {
  205. $this->addressLocality = $addressLocality;
  206. }
  207. public function getAddressLocality() {
  208. return $this->addressLocality;
  209. }
  210. public function setDuration($duration) {
  211. $this->duration = $duration;
  212. }
  213. public function getDuration() {
  214. return $this->duration;
  215. }
  216. public function setAdditionalName(/* array(Google_string) */ $additionalName) {
  217. $this->assertIsArray($additionalName, 'Google_string', __METHOD__);
  218. $this->additionalName = $additionalName;
  219. }
  220. public function getAdditionalName() {
  221. return $this->additionalName;
  222. }
  223. public function setWorstRating($worstRating) {
  224. $this->worstRating = $worstRating;
  225. }
  226. public function getWorstRating() {
  227. return $this->worstRating;
  228. }
  229. public function setContributor(/* array(Google_ItemScope) */ $contributor) {
  230. $this->assertIsArray($contributor, 'Google_ItemScope', __METHOD__);
  231. $this->contributor = $contributor;
  232. }
  233. public function getContributor() {
  234. return $this->contributor;
  235. }
  236. public function setThumbnailUrl($thumbnailUrl) {
  237. $this->thumbnailUrl = $thumbnailUrl;
  238. }
  239. public function getThumbnailUrl() {
  240. return $this->thumbnailUrl;
  241. }
  242. public function setId($id) {
  243. $this->id = $id;
  244. }
  245. public function getId() {
  246. return $this->id;
  247. }
  248. public function setPostOfficeBoxNumber($postOfficeBoxNumber) {
  249. $this->postOfficeBoxNumber = $postOfficeBoxNumber;
  250. }
  251. public function getPostOfficeBoxNumber() {
  252. return $this->postOfficeBoxNumber;
  253. }
  254. public function setAttendees(/* array(Google_ItemScope) */ $attendees) {
  255. $this->assertIsArray($attendees, 'Google_ItemScope', __METHOD__);
  256. $this->attendees = $attendees;
  257. }
  258. public function getAttendees() {
  259. return $this->attendees;
  260. }
  261. public function setAuthor(/* array(Google_ItemScope) */ $author) {
  262. $this->assertIsArray($author, 'Google_ItemScope', __METHOD__);
  263. $this->author = $author;
  264. }
  265. public function getAuthor() {
  266. return $this->author;
  267. }
  268. public function setAssociated_media(/* array(Google_ItemScope) */ $associated_media) {
  269. $this->assertIsArray($associated_media, 'Google_ItemScope', __METHOD__);
  270. $this->associated_media = $associated_media;
  271. }
  272. public function getAssociated_media() {
  273. return $this->associated_media;
  274. }
  275. public function setBestRating($bestRating) {
  276. $this->bestRating = $bestRating;
  277. }
  278. public function getBestRating() {
  279. return $this->bestRating;
  280. }
  281. public function setAddressCountry($addressCountry) {
  282. $this->addressCountry = $addressCountry;
  283. }
  284. public function getAddressCountry() {
  285. return $this->addressCountry;
  286. }
  287. public function setWidth($width) {
  288. $this->width = $width;
  289. }
  290. public function getWidth() {
  291. return $this->width;
  292. }
  293. public function setStreetAddress($streetAddress) {
  294. $this->streetAddress = $streetAddress;
  295. }
  296. public function getStreetAddress() {
  297. return $this->streetAddress;
  298. }
  299. public function setLocation(Google_ItemScope $location) {
  300. $this->location = $location;
  301. }
  302. public function getLocation() {
  303. return $this->location;
  304. }
  305. public function setLatitude($latitude) {
  306. $this->latitude = $latitude;
  307. }
  308. public function getLatitude() {
  309. return $this->latitude;
  310. }
  311. public function setByArtist(Google_ItemScope $byArtist) {
  312. $this->byArtist = $byArtist;
  313. }
  314. public function getByArtist() {
  315. return $this->byArtist;
  316. }
  317. public function setType($type) {
  318. $this->type = $type;
  319. }
  320. public function getType() {
  321. return $this->type;
  322. }
  323. public function setDateModified($dateModified) {
  324. $this->dateModified = $dateModified;
  325. }
  326. public function getDateModified() {
  327. return $this->dateModified;
  328. }
  329. public function setContentSize($contentSize) {
  330. $this->contentSize = $contentSize;
  331. }
  332. public function getContentSize() {
  333. return $this->contentSize;
  334. }
  335. public function setContentUrl($contentUrl) {
  336. $this->contentUrl = $contentUrl;
  337. }
  338. public function getContentUrl() {
  339. return $this->contentUrl;
  340. }
  341. public function setPartOfTVSeries(Google_ItemScope $partOfTVSeries) {
  342. $this->partOfTVSeries = $partOfTVSeries;
  343. }
  344. public function getPartOfTVSeries() {
  345. return $this->partOfTVSeries;
  346. }
  347. public function setDescription($description) {
  348. $this->description = $description;
  349. }
  350. public function getDescription() {
  351. return $this->description;
  352. }
  353. public function setFamilyName($familyName) {
  354. $this->familyName = $familyName;
  355. }
  356. public function getFamilyName() {
  357. return $this->familyName;
  358. }
  359. public function setKind($kind) {
  360. $this->kind = $kind;
  361. }
  362. public function getKind() {
  363. return $this->kind;
  364. }
  365. public function setDateCreated($dateCreated) {
  366. $this->dateCreated = $dateCreated;
  367. }
  368. public function getDateCreated() {
  369. return $this->dateCreated;
  370. }
  371. public function setPostalCode($postalCode) {
  372. $this->postalCode = $postalCode;
  373. }
  374. public function getPostalCode() {
  375. return $this->postalCode;
  376. }
  377. public function setAttendeeCount($attendeeCount) {
  378. $this->attendeeCount = $attendeeCount;
  379. }
  380. public function getAttendeeCount() {
  381. return $this->attendeeCount;
  382. }
  383. public function setInAlbum(Google_ItemScope $inAlbum) {
  384. $this->inAlbum = $inAlbum;
  385. }
  386. public function getInAlbum() {
  387. return $this->inAlbum;
  388. }
  389. public function setAddressRegion($addressRegion) {
  390. $this->addressRegion = $addressRegion;
  391. }
  392. public function getAddressRegion() {
  393. return $this->addressRegion;
  394. }
  395. public function setHeight($height) {
  396. $this->height = $height;
  397. }
  398. public function getHeight() {
  399. return $this->height;
  400. }
  401. public function setGeo(Google_ItemScope $geo) {
  402. $this->geo = $geo;
  403. }
  404. public function getGeo() {
  405. return $this->geo;
  406. }
  407. public function setEmbedUrl($embedUrl) {
  408. $this->embedUrl = $embedUrl;
  409. }
  410. public function getEmbedUrl() {
  411. return $this->embedUrl;
  412. }
  413. public function setTickerSymbol($tickerSymbol) {
  414. $this->tickerSymbol = $tickerSymbol;
  415. }
  416. public function getTickerSymbol() {
  417. return $this->tickerSymbol;
  418. }
  419. public function setPlayerType($playerType) {
  420. $this->playerType = $playerType;
  421. }
  422. public function getPlayerType() {
  423. return $this->playerType;
  424. }
  425. public function setAbout(Google_ItemScope $about) {
  426. $this->about = $about;
  427. }
  428. public function getAbout() {
  429. return $this->about;
  430. }
  431. public function setGivenName($givenName) {
  432. $this->givenName = $givenName;
  433. }
  434. public function getGivenName() {
  435. return $this->givenName;
  436. }
  437. public function setName($name) {
  438. $this->name = $name;
  439. }
  440. public function getName() {
  441. return $this->name;
  442. }
  443. public function setPerformers(/* array(Google_ItemScope) */ $performers) {
  444. $this->assertIsArray($performers, 'Google_ItemScope', __METHOD__);
  445. $this->performers = $performers;
  446. }
  447. public function getPerformers() {
  448. return $this->performers;
  449. }
  450. public function setUrl($url) {
  451. $this->url = $url;
  452. }
  453. public function getUrl() {
  454. return $this->url;
  455. }
  456. public function setGender($gender) {
  457. $this->gender = $gender;
  458. }
  459. public function getGender() {
  460. return $this->gender;
  461. }
  462. public function setLongitude($longitude) {
  463. $this->longitude = $longitude;
  464. }
  465. public function getLongitude() {
  466. return $this->longitude;
  467. }
  468. public function setThumbnail(Google_ItemScope $thumbnail) {
  469. $this->thumbnail = $thumbnail;
  470. }
  471. public function getThumbnail() {
  472. return $this->thumbnail;
  473. }
  474. public function setCaption($caption) {
  475. $this->caption = $caption;
  476. }
  477. public function getCaption() {
  478. return $this->caption;
  479. }
  480. public function setRatingValue($ratingValue) {
  481. $this->ratingValue = $ratingValue;
  482. }
  483. public function getRatingValue() {
  484. return $this->ratingValue;
  485. }
  486. public function setReviewRating(Google_ItemScope $reviewRating) {
  487. $this->reviewRating = $reviewRating;
  488. }
  489. public function getReviewRating() {
  490. return $this->reviewRating;
  491. }
  492. public function setAudio(Google_ItemScope $audio) {
  493. $this->audio = $audio;
  494. }
  495. public function getAudio() {
  496. return $this->audio;
  497. }
  498. }
  499. class Google_Moment extends Google_Model {
  500. public $startDate;
  501. public $kind;
  502. protected $__targetType = 'Google_ItemScope';
  503. protected $__targetDataType = '';
  504. public $target;
  505. protected $__verbType = 'Google_MomentVerb';
  506. protected $__verbDataType = '';
  507. public $verb;
  508. protected $__resultType = 'Google_ItemScope';
  509. protected $__resultDataType = '';
  510. public $result;
  511. public $type;
  512. public function setStartDate($startDate) {
  513. $this->startDate = $startDate;
  514. }
  515. public function getStartDate() {
  516. return $this->startDate;
  517. }
  518. public function setKind($kind) {
  519. $this->kind = $kind;
  520. }
  521. public function getKind() {
  522. return $this->kind;
  523. }
  524. public function setTarget(Google_ItemScope $target) {
  525. $this->target = $target;
  526. }
  527. public function getTarget() {
  528. return $this->target;
  529. }
  530. public function setVerb(Google_MomentVerb $verb) {
  531. $this->verb = $verb;
  532. }
  533. public function getVerb() {
  534. return $this->verb;
  535. }
  536. public function setResult(Google_ItemScope $result) {
  537. $this->result = $result;
  538. }
  539. public function getResult() {
  540. return $this->result;
  541. }
  542. public function setType($type) {
  543. $this->type = $type;
  544. }
  545. public function getType() {
  546. return $this->type;
  547. }
  548. }
  549. class Google_MomentVerb extends Google_Model {
  550. public $url;
  551. public function setUrl($url) {
  552. $this->url = $url;
  553. }
  554. public function getUrl() {
  555. return $this->url;
  556. }
  557. }