PageRenderTime 48ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/social_network/GoogleAPI/src/contrib/Google_DriveService.php

https://github.com/dikafryo/sw4u
PHP | 2877 lines | 2265 code | 68 blank | 544 comment | 78 complexity | e55201ec487c65eea2dcbbc957d50e0e MD5 | raw file
Possible License(s): Apache-2.0

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

  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 "about" collection of methods.
  17. * Typical usage is:
  18. * <code>
  19. * $driveService = new Google_DriveService(...);
  20. * $about = $driveService->about;
  21. * </code>
  22. */
  23. class Google_AboutServiceResource extends Google_ServiceResource {
  24. /**
  25. * Gets the information about the current user along with Drive API settings (about.get)
  26. *
  27. * @param array $optParams Optional parameters.
  28. *
  29. * @opt_param bool includeSubscribed When calculating the number of remaining change IDs, whether to include shared files and public files the user has opened. When set to false, this counts only change IDs for owned files and any shared or public files that the user has explictly added to a folder in Drive.
  30. * @opt_param string maxChangeIdCount Maximum number of remaining change IDs to count
  31. * @opt_param string startChangeId Change ID to start counting from when calculating number of remaining change IDs
  32. * @return Google_About
  33. */
  34. public function get($optParams = array()) {
  35. $params = array();
  36. $params = array_merge($params, $optParams);
  37. $data = $this->__call('get', array($params));
  38. if ($this->useObjects()) {
  39. return new Google_About($data);
  40. } else {
  41. return $data;
  42. }
  43. }
  44. }
  45. /**
  46. * The "apps" collection of methods.
  47. * Typical usage is:
  48. * <code>
  49. * $driveService = new Google_DriveService(...);
  50. * $apps = $driveService->apps;
  51. * </code>
  52. */
  53. class Google_AppsServiceResource extends Google_ServiceResource {
  54. /**
  55. * Gets a specific app. (apps.get)
  56. *
  57. * @param string $appId The ID of the app.
  58. * @param array $optParams Optional parameters.
  59. * @return Google_App
  60. */
  61. public function get($appId, $optParams = array()) {
  62. $params = array('appId' => $appId);
  63. $params = array_merge($params, $optParams);
  64. $data = $this->__call('get', array($params));
  65. if ($this->useObjects()) {
  66. return new Google_App($data);
  67. } else {
  68. return $data;
  69. }
  70. }
  71. /**
  72. * Lists a user's apps. (apps.list)
  73. *
  74. * @param array $optParams Optional parameters.
  75. * @return Google_AppList
  76. */
  77. public function listApps($optParams = array()) {
  78. $params = array();
  79. $params = array_merge($params, $optParams);
  80. $data = $this->__call('list', array($params));
  81. if ($this->useObjects()) {
  82. return new Google_AppList($data);
  83. } else {
  84. return $data;
  85. }
  86. }
  87. }
  88. /**
  89. * The "changes" collection of methods.
  90. * Typical usage is:
  91. * <code>
  92. * $driveService = new Google_DriveService(...);
  93. * $changes = $driveService->changes;
  94. * </code>
  95. */
  96. class Google_ChangesServiceResource extends Google_ServiceResource {
  97. /**
  98. * Gets a specific change. (changes.get)
  99. *
  100. * @param string $changeId The ID of the change.
  101. * @param array $optParams Optional parameters.
  102. * @return Google_Change
  103. */
  104. public function get($changeId, $optParams = array()) {
  105. $params = array('changeId' => $changeId);
  106. $params = array_merge($params, $optParams);
  107. $data = $this->__call('get', array($params));
  108. if ($this->useObjects()) {
  109. return new Google_Change($data);
  110. } else {
  111. return $data;
  112. }
  113. }
  114. /**
  115. * Lists the changes for a user. (changes.list)
  116. *
  117. * @param array $optParams Optional parameters.
  118. *
  119. * @opt_param bool includeDeleted Whether to include deleted items.
  120. * @opt_param bool includeSubscribed Whether to include shared files and public files the user has opened. When set to false, the list will include owned files plus any shared or public files the user has explictly added to a folder in Drive.
  121. * @opt_param int maxResults Maximum number of changes to return.
  122. * @opt_param string pageToken Page token for changes.
  123. * @opt_param string startChangeId Change ID to start listing changes from.
  124. * @return Google_ChangeList
  125. */
  126. public function listChanges($optParams = array()) {
  127. $params = array();
  128. $params = array_merge($params, $optParams);
  129. $data = $this->__call('list', array($params));
  130. if ($this->useObjects()) {
  131. return new Google_ChangeList($data);
  132. } else {
  133. return $data;
  134. }
  135. }
  136. }
  137. /**
  138. * The "children" collection of methods.
  139. * Typical usage is:
  140. * <code>
  141. * $driveService = new Google_DriveService(...);
  142. * $children = $driveService->children;
  143. * </code>
  144. */
  145. class Google_ChildrenServiceResource extends Google_ServiceResource {
  146. /**
  147. * Removes a child from a folder. (children.delete)
  148. *
  149. * @param string $folderId The ID of the folder.
  150. * @param string $childId The ID of the child.
  151. * @param array $optParams Optional parameters.
  152. */
  153. public function delete($folderId, $childId, $optParams = array()) {
  154. $params = array('folderId' => $folderId, 'childId' => $childId);
  155. $params = array_merge($params, $optParams);
  156. $data = $this->__call('delete', array($params));
  157. return $data;
  158. }
  159. /**
  160. * Gets a specific child reference. (children.get)
  161. *
  162. * @param string $folderId The ID of the folder.
  163. * @param string $childId The ID of the child.
  164. * @param array $optParams Optional parameters.
  165. * @return Google_ChildReference
  166. */
  167. public function get($folderId, $childId, $optParams = array()) {
  168. $params = array('folderId' => $folderId, 'childId' => $childId);
  169. $params = array_merge($params, $optParams);
  170. $data = $this->__call('get', array($params));
  171. if ($this->useObjects()) {
  172. return new Google_ChildReference($data);
  173. } else {
  174. return $data;
  175. }
  176. }
  177. /**
  178. * Inserts a file into a folder. (children.insert)
  179. *
  180. * @param string $folderId The ID of the folder.
  181. * @param Google_ChildReference $postBody
  182. * @param array $optParams Optional parameters.
  183. * @return Google_ChildReference
  184. */
  185. public function insert($folderId, Google_ChildReference $postBody, $optParams = array()) {
  186. $params = array('folderId' => $folderId, 'postBody' => $postBody);
  187. $params = array_merge($params, $optParams);
  188. $data = $this->__call('insert', array($params));
  189. if ($this->useObjects()) {
  190. return new Google_ChildReference($data);
  191. } else {
  192. return $data;
  193. }
  194. }
  195. /**
  196. * Lists a folder's children. (children.list)
  197. *
  198. * @param string $folderId The ID of the folder.
  199. * @param array $optParams Optional parameters.
  200. *
  201. * @opt_param int maxResults Maximum number of children to return.
  202. * @opt_param string pageToken Page token for children.
  203. * @opt_param string q Query string for searching children.
  204. * @return Google_ChildList
  205. */
  206. public function listChildren($folderId, $optParams = array()) {
  207. $params = array('folderId' => $folderId);
  208. $params = array_merge($params, $optParams);
  209. $data = $this->__call('list', array($params));
  210. if ($this->useObjects()) {
  211. return new Google_ChildList($data);
  212. } else {
  213. return $data;
  214. }
  215. }
  216. }
  217. /**
  218. * The "comments" collection of methods.
  219. * Typical usage is:
  220. * <code>
  221. * $driveService = new Google_DriveService(...);
  222. * $comments = $driveService->comments;
  223. * </code>
  224. */
  225. class Google_CommentsServiceResource extends Google_ServiceResource {
  226. /**
  227. * Deletes a comment. (comments.delete)
  228. *
  229. * @param string $fileId The ID of the file.
  230. * @param string $commentId The ID of the comment.
  231. * @param array $optParams Optional parameters.
  232. */
  233. public function delete($fileId, $commentId, $optParams = array()) {
  234. $params = array('fileId' => $fileId, 'commentId' => $commentId);
  235. $params = array_merge($params, $optParams);
  236. $data = $this->__call('delete', array($params));
  237. return $data;
  238. }
  239. /**
  240. * Gets a comment by ID. (comments.get)
  241. *
  242. * @param string $fileId The ID of the file.
  243. * @param string $commentId The ID of the comment.
  244. * @param array $optParams Optional parameters.
  245. *
  246. * @opt_param bool includeDeleted If set, this will succeed when retrieving a deleted comment, and will include any deleted replies.
  247. * @return Google_Comment
  248. */
  249. public function get($fileId, $commentId, $optParams = array()) {
  250. $params = array('fileId' => $fileId, 'commentId' => $commentId);
  251. $params = array_merge($params, $optParams);
  252. $data = $this->__call('get', array($params));
  253. if ($this->useObjects()) {
  254. return new Google_Comment($data);
  255. } else {
  256. return $data;
  257. }
  258. }
  259. /**
  260. * Creates a new comment on the given file. (comments.insert)
  261. *
  262. * @param string $fileId The ID of the file.
  263. * @param Google_Comment $postBody
  264. * @param array $optParams Optional parameters.
  265. * @return Google_Comment
  266. */
  267. public function insert($fileId, Google_Comment $postBody, $optParams = array()) {
  268. $params = array('fileId' => $fileId, 'postBody' => $postBody);
  269. $params = array_merge($params, $optParams);
  270. $data = $this->__call('insert', array($params));
  271. if ($this->useObjects()) {
  272. return new Google_Comment($data);
  273. } else {
  274. return $data;
  275. }
  276. }
  277. /**
  278. * Lists a file's comments. (comments.list)
  279. *
  280. * @param string $fileId The ID of the file.
  281. * @param array $optParams Optional parameters.
  282. *
  283. * @opt_param bool includeDeleted If set, all comments and replies, including deleted comments and replies (with content stripped) will be returned.
  284. * @opt_param int maxResults The maximum number of discussions to include in the response, used for paging.
  285. * @opt_param string pageToken The continuation token, used to page through large result sets. To get the next page of results, set this parameter to the value of "nextPageToken" from the previous response.
  286. * @opt_param string updatedMin Only discussions that were updated after this timestamp will be returned. Formatted as an RFC 3339 timestamp.
  287. * @return Google_CommentList
  288. */
  289. public function listComments($fileId, $optParams = array()) {
  290. $params = array('fileId' => $fileId);
  291. $params = array_merge($params, $optParams);
  292. $data = $this->__call('list', array($params));
  293. if ($this->useObjects()) {
  294. return new Google_CommentList($data);
  295. } else {
  296. return $data;
  297. }
  298. }
  299. /**
  300. * Updates an existing comment. This method supports patch semantics. (comments.patch)
  301. *
  302. * @param string $fileId The ID of the file.
  303. * @param string $commentId The ID of the comment.
  304. * @param Google_Comment $postBody
  305. * @param array $optParams Optional parameters.
  306. * @return Google_Comment
  307. */
  308. public function patch($fileId, $commentId, Google_Comment $postBody, $optParams = array()) {
  309. $params = array('fileId' => $fileId, 'commentId' => $commentId, 'postBody' => $postBody);
  310. $params = array_merge($params, $optParams);
  311. $data = $this->__call('patch', array($params));
  312. if ($this->useObjects()) {
  313. return new Google_Comment($data);
  314. } else {
  315. return $data;
  316. }
  317. }
  318. /**
  319. * Updates an existing comment. (comments.update)
  320. *
  321. * @param string $fileId The ID of the file.
  322. * @param string $commentId The ID of the comment.
  323. * @param Google_Comment $postBody
  324. * @param array $optParams Optional parameters.
  325. * @return Google_Comment
  326. */
  327. public function update($fileId, $commentId, Google_Comment $postBody, $optParams = array()) {
  328. $params = array('fileId' => $fileId, 'commentId' => $commentId, 'postBody' => $postBody);
  329. $params = array_merge($params, $optParams);
  330. $data = $this->__call('update', array($params));
  331. if ($this->useObjects()) {
  332. return new Google_Comment($data);
  333. } else {
  334. return $data;
  335. }
  336. }
  337. }
  338. /**
  339. * The "files" collection of methods.
  340. * Typical usage is:
  341. * <code>
  342. * $driveService = new Google_DriveService(...);
  343. * $files = $driveService->files;
  344. * </code>
  345. */
  346. class Google_FilesServiceResource extends Google_ServiceResource {
  347. /**
  348. * Creates a copy of the specified file. (files.copy)
  349. *
  350. * @param string $fileId The ID of the file to copy.
  351. * @param Google_DriveFile $postBody
  352. * @param array $optParams Optional parameters.
  353. *
  354. * @opt_param bool convert Whether to convert this file to the corresponding Google Docs format.
  355. * @opt_param bool ocr Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
  356. * @opt_param string ocrLanguage If ocr is true, hints at the language to use. Valid values are ISO 639-1 codes.
  357. * @opt_param bool pinned Whether to pin the head revision of the new copy.
  358. * @opt_param string sourceLanguage The language of the original file to be translated.
  359. * @opt_param string targetLanguage Target language to translate the file to. If no sourceLanguage is provided, the API will attempt to detect the language.
  360. * @opt_param string timedTextLanguage The language of the timed text.
  361. * @opt_param string timedTextTrackName The timed text track name.
  362. * @return Google_DriveFile
  363. */
  364. public function copy($fileId, Google_DriveFile $postBody, $optParams = array()) {
  365. $params = array('fileId' => $fileId, 'postBody' => $postBody);
  366. $params = array_merge($params, $optParams);
  367. $data = $this->__call('copy', array($params));
  368. if ($this->useObjects()) {
  369. return new Google_DriveFile($data);
  370. } else {
  371. return $data;
  372. }
  373. }
  374. /**
  375. * Permanently deletes a file by ID. Skips the trash. (files.delete)
  376. *
  377. * @param string $fileId The ID of the file to delete.
  378. * @param array $optParams Optional parameters.
  379. */
  380. public function delete($fileId, $optParams = array()) {
  381. $params = array('fileId' => $fileId);
  382. $params = array_merge($params, $optParams);
  383. $data = $this->__call('delete', array($params));
  384. return $data;
  385. }
  386. /**
  387. * Gets a file's metadata by ID. (files.get)
  388. *
  389. * @param string $fileId The ID for the file in question.
  390. * @param array $optParams Optional parameters.
  391. *
  392. * @opt_param string projection This parameter is deprecated and has no function.
  393. * @opt_param bool updateViewedDate Whether to update the view date after successfully retrieving the file.
  394. * @return Google_DriveFile
  395. */
  396. public function get($fileId, $optParams = array()) {
  397. $params = array('fileId' => $fileId);
  398. $params = array_merge($params, $optParams);
  399. $data = $this->__call('get', array($params));
  400. if ($this->useObjects()) {
  401. return new Google_DriveFile($data);
  402. } else {
  403. return $data;
  404. }
  405. }
  406. /**
  407. * Insert a new file. (files.insert)
  408. *
  409. * @param Google_DriveFile $postBody
  410. * @param array $optParams Optional parameters.
  411. *
  412. * @opt_param bool convert Whether to convert this file to the corresponding Google Docs format.
  413. * @opt_param bool ocr Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
  414. * @opt_param string ocrLanguage If ocr is true, hints at the language to use. Valid values are ISO 639-1 codes.
  415. * @opt_param bool pinned Whether to pin the head revision of the uploaded file.
  416. * @opt_param string sourceLanguage The language of the original file to be translated.
  417. * @opt_param string targetLanguage Target language to translate the file to. If no sourceLanguage is provided, the API will attempt to detect the language.
  418. * @opt_param string timedTextLanguage The language of the timed text.
  419. * @opt_param string timedTextTrackName The timed text track name.
  420. * @return Google_DriveFile
  421. */
  422. public function insert(Google_DriveFile $postBody, $optParams = array()) {
  423. $params = array('postBody' => $postBody);
  424. $params = array_merge($params, $optParams);
  425. $data = $this->__call('insert', array($params));
  426. if ($this->useObjects()) {
  427. return new Google_DriveFile($data);
  428. } else {
  429. return $data;
  430. }
  431. }
  432. /**
  433. * Lists the user's files. (files.list)
  434. *
  435. * @param array $optParams Optional parameters.
  436. *
  437. * @opt_param int maxResults Maximum number of files to return.
  438. * @opt_param string pageToken Page token for files.
  439. * @opt_param string projection This parameter is deprecated and has no function.
  440. * @opt_param string q Query string for searching files.
  441. * @return Google_FileList
  442. */
  443. public function listFiles($optParams = array()) {
  444. $params = array();
  445. $params = array_merge($params, $optParams);
  446. $data = $this->__call('list', array($params));
  447. if ($this->useObjects()) {
  448. return new Google_FileList($data);
  449. } else {
  450. return $data;
  451. }
  452. }
  453. /**
  454. * Updates file metadata and/or content. This method supports patch semantics. (files.patch)
  455. *
  456. * @param string $fileId The ID of the file to update.
  457. * @param Google_DriveFile $postBody
  458. * @param array $optParams Optional parameters.
  459. *
  460. * @opt_param bool convert Whether to convert this file to the corresponding Google Docs format.
  461. * @opt_param bool newRevision Whether a blob upload should create a new revision. If false, the blob data in the current head revision will be replaced.
  462. * @opt_param bool ocr Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
  463. * @opt_param string ocrLanguage If ocr is true, hints at the language to use. Valid values are ISO 639-1 codes.
  464. * @opt_param bool pinned Whether to pin the new revision.
  465. * @opt_param bool setModifiedDate Whether to set the modified date with the supplied modified date.
  466. * @opt_param string sourceLanguage The language of the original file to be translated.
  467. * @opt_param string targetLanguage Target language to translate the file to. If no sourceLanguage is provided, the API will attempt to detect the language.
  468. * @opt_param string timedTextLanguage The language of the timed text.
  469. * @opt_param string timedTextTrackName The timed text track name.
  470. * @opt_param bool updateViewedDate Whether to update the view date after successfully updating the file.
  471. * @return Google_DriveFile
  472. */
  473. public function patch($fileId, Google_DriveFile $postBody, $optParams = array()) {
  474. $params = array('fileId' => $fileId, 'postBody' => $postBody);
  475. $params = array_merge($params, $optParams);
  476. $data = $this->__call('patch', array($params));
  477. if ($this->useObjects()) {
  478. return new Google_DriveFile($data);
  479. } else {
  480. return $data;
  481. }
  482. }
  483. /**
  484. * Set the file's updated time to the current server time. (files.touch)
  485. *
  486. * @param string $fileId The ID of the file to update.
  487. * @param array $optParams Optional parameters.
  488. * @return Google_DriveFile
  489. */
  490. public function touch($fileId, $optParams = array()) {
  491. $params = array('fileId' => $fileId);
  492. $params = array_merge($params, $optParams);
  493. $data = $this->__call('touch', array($params));
  494. if ($this->useObjects()) {
  495. return new Google_DriveFile($data);
  496. } else {
  497. return $data;
  498. }
  499. }
  500. /**
  501. * Moves a file to the trash. (files.trash)
  502. *
  503. * @param string $fileId The ID of the file to trash.
  504. * @param array $optParams Optional parameters.
  505. * @return Google_DriveFile
  506. */
  507. public function trash($fileId, $optParams = array()) {
  508. $params = array('fileId' => $fileId);
  509. $params = array_merge($params, $optParams);
  510. $data = $this->__call('trash', array($params));
  511. if ($this->useObjects()) {
  512. return new Google_DriveFile($data);
  513. } else {
  514. return $data;
  515. }
  516. }
  517. /**
  518. * Restores a file from the trash. (files.untrash)
  519. *
  520. * @param string $fileId The ID of the file to untrash.
  521. * @param array $optParams Optional parameters.
  522. * @return Google_DriveFile
  523. */
  524. public function untrash($fileId, $optParams = array()) {
  525. $params = array('fileId' => $fileId);
  526. $params = array_merge($params, $optParams);
  527. $data = $this->__call('untrash', array($params));
  528. if ($this->useObjects()) {
  529. return new Google_DriveFile($data);
  530. } else {
  531. return $data;
  532. }
  533. }
  534. /**
  535. * Updates file metadata and/or content (files.update)
  536. *
  537. * @param string $fileId The ID of the file to update.
  538. * @param Google_DriveFile $postBody
  539. * @param array $optParams Optional parameters.
  540. *
  541. * @opt_param bool convert Whether to convert this file to the corresponding Google Docs format.
  542. * @opt_param bool newRevision Whether a blob upload should create a new revision. If false, the blob data in the current head revision will be replaced.
  543. * @opt_param bool ocr Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
  544. * @opt_param string ocrLanguage If ocr is true, hints at the language to use. Valid values are ISO 639-1 codes.
  545. * @opt_param bool pinned Whether to pin the new revision.
  546. * @opt_param bool setModifiedDate Whether to set the modified date with the supplied modified date.
  547. * @opt_param string sourceLanguage The language of the original file to be translated.
  548. * @opt_param string targetLanguage Target language to translate the file to. If no sourceLanguage is provided, the API will attempt to detect the language.
  549. * @opt_param string timedTextLanguage The language of the timed text.
  550. * @opt_param string timedTextTrackName The timed text track name.
  551. * @opt_param bool updateViewedDate Whether to update the view date after successfully updating the file.
  552. * @return Google_DriveFile
  553. */
  554. public function update($fileId, Google_DriveFile $postBody, $optParams = array()) {
  555. $params = array('fileId' => $fileId, 'postBody' => $postBody);
  556. $params = array_merge($params, $optParams);
  557. $data = $this->__call('update', array($params));
  558. if ($this->useObjects()) {
  559. return new Google_DriveFile($data);
  560. } else {
  561. return $data;
  562. }
  563. }
  564. }
  565. /**
  566. * The "parents" collection of methods.
  567. * Typical usage is:
  568. * <code>
  569. * $driveService = new Google_DriveService(...);
  570. * $parents = $driveService->parents;
  571. * </code>
  572. */
  573. class Google_ParentsServiceResource extends Google_ServiceResource {
  574. /**
  575. * Removes a parent from a file. (parents.delete)
  576. *
  577. * @param string $fileId The ID of the file.
  578. * @param string $parentId The ID of the parent.
  579. * @param array $optParams Optional parameters.
  580. */
  581. public function delete($fileId, $parentId, $optParams = array()) {
  582. $params = array('fileId' => $fileId, 'parentId' => $parentId);
  583. $params = array_merge($params, $optParams);
  584. $data = $this->__call('delete', array($params));
  585. return $data;
  586. }
  587. /**
  588. * Gets a specific parent reference. (parents.get)
  589. *
  590. * @param string $fileId The ID of the file.
  591. * @param string $parentId The ID of the parent.
  592. * @param array $optParams Optional parameters.
  593. * @return Google_ParentReference
  594. */
  595. public function get($fileId, $parentId, $optParams = array()) {
  596. $params = array('fileId' => $fileId, 'parentId' => $parentId);
  597. $params = array_merge($params, $optParams);
  598. $data = $this->__call('get', array($params));
  599. if ($this->useObjects()) {
  600. return new Google_ParentReference($data);
  601. } else {
  602. return $data;
  603. }
  604. }
  605. /**
  606. * Adds a parent folder for a file. (parents.insert)
  607. *
  608. * @param string $fileId The ID of the file.
  609. * @param Google_ParentReference $postBody
  610. * @param array $optParams Optional parameters.
  611. * @return Google_ParentReference
  612. */
  613. public function insert($fileId, Google_ParentReference $postBody, $optParams = array()) {
  614. $params = array('fileId' => $fileId, 'postBody' => $postBody);
  615. $params = array_merge($params, $optParams);
  616. $data = $this->__call('insert', array($params));
  617. if ($this->useObjects()) {
  618. return new Google_ParentReference($data);
  619. } else {
  620. return $data;
  621. }
  622. }
  623. /**
  624. * Lists a file's parents. (parents.list)
  625. *
  626. * @param string $fileId The ID of the file.
  627. * @param array $optParams Optional parameters.
  628. * @return Google_ParentList
  629. */
  630. public function listParents($fileId, $optParams = array()) {
  631. $params = array('fileId' => $fileId);
  632. $params = array_merge($params, $optParams);
  633. $data = $this->__call('list', array($params));
  634. if ($this->useObjects()) {
  635. return new Google_ParentList($data);
  636. } else {
  637. return $data;
  638. }
  639. }
  640. }
  641. /**
  642. * The "permissions" collection of methods.
  643. * Typical usage is:
  644. * <code>
  645. * $driveService = new Google_DriveService(...);
  646. * $permissions = $driveService->permissions;
  647. * </code>
  648. */
  649. class Google_PermissionsServiceResource extends Google_ServiceResource {
  650. /**
  651. * Deletes a permission from a file. (permissions.delete)
  652. *
  653. * @param string $fileId The ID for the file.
  654. * @param string $permissionId The ID for the permission.
  655. * @param array $optParams Optional parameters.
  656. */
  657. public function delete($fileId, $permissionId, $optParams = array()) {
  658. $params = array('fileId' => $fileId, 'permissionId' => $permissionId);
  659. $params = array_merge($params, $optParams);
  660. $data = $this->__call('delete', array($params));
  661. return $data;
  662. }
  663. /**
  664. * Gets a permission by ID. (permissions.get)
  665. *
  666. * @param string $fileId The ID for the file.
  667. * @param string $permissionId The ID for the permission.
  668. * @param array $optParams Optional parameters.
  669. * @return Google_Permission
  670. */
  671. public function get($fileId, $permissionId, $optParams = array()) {
  672. $params = array('fileId' => $fileId, 'permissionId' => $permissionId);
  673. $params = array_merge($params, $optParams);
  674. $data = $this->__call('get', array($params));
  675. if ($this->useObjects()) {
  676. return new Google_Permission($data);
  677. } else {
  678. return $data;
  679. }
  680. }
  681. /**
  682. * Inserts a permission for a file. (permissions.insert)
  683. *
  684. * @param string $fileId The ID for the file.
  685. * @param Google_Permission $postBody
  686. * @param array $optParams Optional parameters.
  687. *
  688. * @opt_param bool sendNotificationEmails Whether to send notification emails.
  689. * @return Google_Permission
  690. */
  691. public function insert($fileId, Google_Permission $postBody, $optParams = array()) {
  692. $params = array('fileId' => $fileId, 'postBody' => $postBody);
  693. $params = array_merge($params, $optParams);
  694. $data = $this->__call('insert', array($params));
  695. if ($this->useObjects()) {
  696. return new Google_Permission($data);
  697. } else {
  698. return $data;
  699. }
  700. }
  701. /**
  702. * Lists a file's permissions. (permissions.list)
  703. *
  704. * @param string $fileId The ID for the file.
  705. * @param array $optParams Optional parameters.
  706. * @return Google_PermissionList
  707. */
  708. public function listPermissions($fileId, $optParams = array()) {
  709. $params = array('fileId' => $fileId);
  710. $params = array_merge($params, $optParams);
  711. $data = $this->__call('list', array($params));
  712. if ($this->useObjects()) {
  713. return new Google_PermissionList($data);
  714. } else {
  715. return $data;
  716. }
  717. }
  718. /**
  719. * Updates a permission. This method supports patch semantics. (permissions.patch)
  720. *
  721. * @param string $fileId The ID for the file.
  722. * @param string $permissionId The ID for the permission.
  723. * @param Google_Permission $postBody
  724. * @param array $optParams Optional parameters.
  725. * @return Google_Permission
  726. */
  727. public function patch($fileId, $permissionId, Google_Permission $postBody, $optParams = array()) {
  728. $params = array('fileId' => $fileId, 'permissionId' => $permissionId, 'postBody' => $postBody);
  729. $params = array_merge($params, $optParams);
  730. $data = $this->__call('patch', array($params));
  731. if ($this->useObjects()) {
  732. return new Google_Permission($data);
  733. } else {
  734. return $data;
  735. }
  736. }
  737. /**
  738. * Updates a permission. (permissions.update)
  739. *
  740. * @param string $fileId The ID for the file.
  741. * @param string $permissionId The ID for the permission.
  742. * @param Google_Permission $postBody
  743. * @param array $optParams Optional parameters.
  744. * @return Google_Permission
  745. */
  746. public function update($fileId, $permissionId, Google_Permission $postBody, $optParams = array()) {
  747. $params = array('fileId' => $fileId, 'permissionId' => $permissionId, 'postBody' => $postBody);
  748. $params = array_merge($params, $optParams);
  749. $data = $this->__call('update', array($params));
  750. if ($this->useObjects()) {
  751. return new Google_Permission($data);
  752. } else {
  753. return $data;
  754. }
  755. }
  756. }
  757. /**
  758. * The "replies" collection of methods.
  759. * Typical usage is:
  760. * <code>
  761. * $driveService = new Google_DriveService(...);
  762. * $replies = $driveService->replies;
  763. * </code>
  764. */
  765. class Google_RepliesServiceResource extends Google_ServiceResource {
  766. /**
  767. * Deletes a reply. (replies.delete)
  768. *
  769. * @param string $fileId The ID of the file.
  770. * @param string $commentId The ID of the comment.
  771. * @param string $replyId The ID of the reply.
  772. * @param array $optParams Optional parameters.
  773. */
  774. public function delete($fileId, $commentId, $replyId, $optParams = array()) {
  775. $params = array('fileId' => $fileId, 'commentId' => $commentId, 'replyId' => $replyId);
  776. $params = array_merge($params, $optParams);
  777. $data = $this->__call('delete', array($params));
  778. return $data;
  779. }
  780. /**
  781. * Gets a reply. (replies.get)
  782. *
  783. * @param string $fileId The ID of the file.
  784. * @param string $commentId The ID of the comment.
  785. * @param string $replyId The ID of the reply.
  786. * @param array $optParams Optional parameters.
  787. *
  788. * @opt_param bool includeDeleted If set, this will succeed when retrieving a deleted reply.
  789. * @return Google_CommentReply
  790. */
  791. public function get($fileId, $commentId, $replyId, $optParams = array()) {
  792. $params = array('fileId' => $fileId, 'commentId' => $commentId, 'replyId' => $replyId);
  793. $params = array_merge($params, $optParams);
  794. $data = $this->__call('get', array($params));
  795. if ($this->useObjects()) {
  796. return new Google_CommentReply($data);
  797. } else {
  798. return $data;
  799. }
  800. }
  801. /**
  802. * Creates a new reply to the given comment. (replies.insert)
  803. *
  804. * @param string $fileId The ID of the file.
  805. * @param string $commentId The ID of the comment.
  806. * @param Google_CommentReply $postBody
  807. * @param array $optParams Optional parameters.
  808. * @return Google_CommentReply
  809. */
  810. public function insert($fileId, $commentId, Google_CommentReply $postBody, $optParams = array()) {
  811. $params = array('fileId' => $fileId, 'commentId' => $commentId, 'postBody' => $postBody);
  812. $params = array_merge($params, $optParams);
  813. $data = $this->__call('insert', array($params));
  814. if ($this->useObjects()) {
  815. return new Google_CommentReply($data);
  816. } else {
  817. return $data;
  818. }
  819. }
  820. /**
  821. * Lists all of the replies to a comment. (replies.list)
  822. *
  823. * @param string $fileId The ID of the file.
  824. * @param string $commentId The ID of the comment.
  825. * @param array $optParams Optional parameters.
  826. *
  827. * @opt_param bool includeDeleted If set, all replies, including deleted replies (with content stripped) will be returned.
  828. * @opt_param int maxResults The maximum number of replies to include in the response, used for paging.
  829. * @opt_param string pageToken The continuation token, used to page through large result sets. To get the next page of results, set this parameter to the value of "nextPageToken" from the previous response.
  830. * @return Google_CommentReplyList
  831. */
  832. public function listReplies($fileId, $commentId, $optParams = array()) {
  833. $params = array('fileId' => $fileId, 'commentId' => $commentId);
  834. $params = array_merge($params, $optParams);
  835. $data = $this->__call('list', array($params));
  836. if ($this->useObjects()) {
  837. return new Google_CommentReplyList($data);
  838. } else {
  839. return $data;
  840. }
  841. }
  842. /**
  843. * Updates an existing reply. This method supports patch semantics. (replies.patch)
  844. *
  845. * @param string $fileId The ID of the file.
  846. * @param string $commentId The ID of the comment.
  847. * @param string $replyId The ID of the reply.
  848. * @param Google_CommentReply $postBody
  849. * @param array $optParams Optional parameters.
  850. * @return Google_CommentReply
  851. */
  852. public function patch($fileId, $commentId, $replyId, Google_CommentReply $postBody, $optParams = array()) {
  853. $params = array('fileId' => $fileId, 'commentId' => $commentId, 'replyId' => $replyId, 'postBody' => $postBody);
  854. $params = array_merge($params, $optParams);
  855. $data = $this->__call('patch', array($params));
  856. if ($this->useObjects()) {
  857. return new Google_CommentReply($data);
  858. } else {
  859. return $data;
  860. }
  861. }
  862. /**
  863. * Updates an existing reply. (replies.update)
  864. *
  865. * @param string $fileId The ID of the file.
  866. * @param string $commentId The ID of the comment.
  867. * @param string $replyId The ID of the reply.
  868. * @param Google_CommentReply $postBody
  869. * @param array $optParams Optional parameters.
  870. * @return Google_CommentReply
  871. */
  872. public function update($fileId, $commentId, $replyId, Google_CommentReply $postBody, $optParams = array()) {
  873. $params = array('fileId' => $fileId, 'commentId' => $commentId, 'replyId' => $replyId, 'postBody' => $postBody);
  874. $params = array_merge($params, $optParams);
  875. $data = $this->__call('update', array($params));
  876. if ($this->useObjects()) {
  877. return new Google_CommentReply($data);
  878. } else {
  879. return $data;
  880. }
  881. }
  882. }
  883. /**
  884. * The "revisions" collection of methods.
  885. * Typical usage is:
  886. * <code>
  887. * $driveService = new Google_DriveService(...);
  888. * $revisions = $driveService->revisions;
  889. * </code>
  890. */
  891. class Google_RevisionsServiceResource extends Google_ServiceResource {
  892. /**
  893. * Removes a revision. (revisions.delete)
  894. *
  895. * @param string $fileId The ID of the file.
  896. * @param string $revisionId The ID of the revision.
  897. * @param array $optParams Optional parameters.
  898. */
  899. public function delete($fileId, $revisionId, $optParams = array()) {
  900. $params = array('fileId' => $fileId, 'revisionId' => $revisionId);
  901. $params = array_merge($params, $optParams);
  902. $data = $this->__call('delete', array($params));
  903. return $data;
  904. }
  905. /**
  906. * Gets a specific revision. (revisions.get)
  907. *
  908. * @param string $fileId The ID of the file.
  909. * @param string $revisionId The ID of the revision.
  910. * @param array $optParams Optional parameters.
  911. * @return Google_Revision
  912. */
  913. public function get($fileId, $revisionId, $optParams = array()) {
  914. $params = array('fileId' => $fileId, 'revisionId' => $revisionId);
  915. $params = array_merge($params, $optParams);
  916. $data = $this->__call('get', array($params));
  917. if ($this->useObjects()) {
  918. return new Google_Revision($data);
  919. } else {
  920. return $data;
  921. }
  922. }
  923. /**
  924. * Lists a file's revisions. (revisions.list)
  925. *
  926. * @param string $fileId The ID of the file.
  927. * @param array $optParams Optional parameters.
  928. * @return Google_RevisionList
  929. */
  930. public function listRevisions($fileId, $optParams = array()) {
  931. $params = array('fileId' => $fileId);
  932. $params = array_merge($params, $optParams);
  933. $data = $this->__call('list', array($params));
  934. if ($this->useObjects()) {
  935. return new Google_RevisionList($data);
  936. } else {
  937. return $data;
  938. }
  939. }
  940. /**
  941. * Updates a revision. This method supports patch semantics. (revisions.patch)
  942. *
  943. * @param string $fileId The ID for the file.
  944. * @param string $revisionId The ID for the revision.
  945. * @param Google_Revision $postBody
  946. * @param array $optParams Optional parameters.
  947. * @return Google_Revision
  948. */
  949. public function patch($fileId, $revisionId, Google_Revision $postBody, $optParams = array()) {
  950. $params = array('fileId' => $fileId, 'revisionId' => $revisionId, 'postBody' => $postBody);
  951. $params = array_merge($params, $optParams);
  952. $data = $this->__call('patch', array($params));
  953. if ($this->useObjects()) {
  954. return new Google_Revision($data);
  955. } else {
  956. return $data;
  957. }
  958. }
  959. /**
  960. * Updates a revision. (revisions.update)
  961. *
  962. * @param string $fileId The ID for the file.
  963. * @param string $revisionId The ID for the revision.
  964. * @param Google_Revision $postBody
  965. * @param array $optParams Optional parameters.
  966. * @return Google_Revision
  967. */
  968. public function update($fileId, $revisionId, Google_Revision $postBody, $optParams = array()) {
  969. $params = array('fileId' => $fileId, 'revisionId' => $revisionId, 'postBody' => $postBody);
  970. $params = array_merge($params, $optParams);
  971. $data = $this->__call('update', array($params));
  972. if ($this->useObjects()) {
  973. return new Google_Revision($data);
  974. } else {
  975. return $data;
  976. }
  977. }
  978. }
  979. /**
  980. * Service definition for Google_Drive (v2).
  981. *
  982. * <p>
  983. * The API to interact with Drive.
  984. * </p>
  985. *
  986. * <p>
  987. * For more information about this service, see the
  988. * <a href="https://developers.google.com/drive/" target="_blank">API Documentation</a>
  989. * </p>
  990. *
  991. * @author Google, Inc.
  992. */
  993. class Google_DriveService extends Google_Service {
  994. public $about;
  995. public $apps;
  996. public $changes;
  997. public $children;
  998. public $comments;
  999. public $files;
  1000. public $parents;
  1001. public $permissions;
  1002. public $replies;
  1003. public $revisions;
  1004. /**
  1005. * Constructs the internal representation of the Drive service.
  1006. *
  1007. * @param Google_Client $client
  1008. */
  1009. public function __construct(Google_Client $client) {
  1010. $this->servicePath = 'drive/v2/';
  1011. $this->version = 'v2';
  1012. $this->serviceName = 'drive';
  1013. $client->addService($this->serviceName, $this->version);
  1014. $this->about = new Google_AboutServiceResource($this, $this->serviceName, 'about', json_decode('{"methods": {"get": {"id": "drive.about.get", "path": "about", "httpMethod": "GET", "parameters": {"includeSubscribed": {"type": "boolean", "default": "true", "location": "query"}, "maxChangeIdCount": {"type": "string", "default": "1", "format": "int64", "location": "query"}, "startChangeId": {"type": "string", "format": "int64", "location": "query"}}, "response": {"$ref": "About"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.metadata.readonly", "https://www.googleapis.com/auth/drive.readonly"]}}}', true));
  1015. $this->apps = new Google_AppsServiceResource($this, $this->serviceName, 'apps', json_decode('{"methods": {"get": {"id": "drive.apps.get", "path": "apps/{appId}", "httpMethod": "GET", "parameters": {"appId": {"type": "string", "required": true, "location": "path"}}, "response": {"$ref": "App"}, "scopes": ["https://www.googleapis.com/auth/drive.apps.readonly"]}, "list": {"id": "drive.apps.list", "path": "apps", "httpMethod": "GET", "response": {"$ref": "AppList"}, "scopes": ["https://www.googleapis.com/auth/drive.apps.readonly"]}}}', true));
  1016. $this->changes = new Google_ChangesServiceResource($this, $this->serviceName, 'changes', json_decode('{"methods": {"get": {"id": "drive.changes.get", "path": "changes/{changeId}", "httpMethod": "GET", "parameters": {"changeId": {"type": "string", "required": true, "location": "path"}}, "response": {"$ref": "Change"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.metadata.readonly", "https://www.googleapis.com/auth/drive.readonly"]}, "list": {"id": "drive.changes.list", "path": "changes", "httpMethod": "GET", "parameters": {"includeDeleted": {"type": "boolean", "default": "true", "location": "query"}, "includeSubscribed": {"type": "boolean", "default": "true", "location": "query"}, "maxResults": {"type": "integer", "default": "100", "format": "int32", "minimum": "0", "location": "query"}, "pageToken": {"type": "string", "location": "query"}, "startChangeId": {"type": "string", "format": "int64", "location": "query"}}, "response": {"$ref": "ChangeList"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.metadata.readonly", "https://www.googleapis.com/auth/drive.readonly"]}}}', true));
  1017. $this->children = new Google_ChildrenServiceResource($this, $this->serviceName, 'children', json_decode('{"methods": {"delete": {"id": "drive.children.delete", "path": "files/{folderId}/children/{childId}", "httpMethod": "DELETE", "parameters": {"childId": {"type": "string", "required": true, "location": "path"}, "folderId": {"type": "string", "required": true, "location": "path"}}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file"]}, "get": {"id": "drive.children.get", "path": "files/{folderId}/children/{childId}", "httpMethod": "GET", "parameters": {"childId": {"type": "string", "required": true, "location": "path"}, "folderId": {"type": "string", "required": true, "location": "path"}}, "response": {"$ref": "ChildReference"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.metadata.readonly", "https://www.googleapis.com/auth/drive.readonly"]}, "insert": {"id": "drive.children.insert", "path": "files/{folderId}/children", "httpMethod": "POST", "parameters": {"folderId": {"type": "string", "required": true, "location": "path"}}, "request": {"$ref": "ChildReference"}, "response": {"$ref": "ChildReference"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file"]}, "list": {"id": "drive.children.list", "path": "files/{folderId}/children", "httpMethod": "GET", "parameters": {"folderId": {"type": "string", "required": true, "location": "path"}, "maxResults": {"type": "integer", "default": "100", "format": "int32", "minimum": "0", "location": "query"}, "pageToken": {"type": "string", "location": "query"}, "q": {"type": "string", "location": "query"}}, "response": {"$ref": "ChildList"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.metadata.readonly", "https://www.googleapis.com/auth/drive.readonly"]}}}', true));
  1018. $this->comments = new Google_CommentsServiceResource($this, $this->serviceName, 'comments', json_decode('{"methods": {"delete": {"id": "drive.comments.delete", "path": "files/{fileId}/comments/{commentId}", "httpMethod": "DELETE", "parameters": {"commentId": {"type": "string", "required": true, "location": "path"}, "fileId": {"type": "string", "required": true, "location": "path"}}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.readonly"]}, "get": {"id": "drive.comments.get", "path": "files/{fileId}/comments/{commentId}", "httpMethod": "GET", "parameters": {"commentId": {"type": "string", "required": true, "location": "path"}, "fileId": {"type": "string", "required": true, "location": "path"}, "includeDeleted": {"type": "boolean", "default": "false", "location": "query"}}, "response": {"$ref": "Comment"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.readonly"]}, "insert": {"id": "drive.comments.insert", "path": "files/{fileId}/comments", "httpMethod": "POST", "parameters": {"fileId": {"type": "string", "required": true, "location": "path"}}, "request": {"$ref": "Comment"}, "response": {"$ref": "Comment"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.readonly"]}, "list": {"id": "drive.comments.list", "path": "files/{fileId}/comments", "httpMethod": "GET", "parameters": {"fileId": {"type": "string", "required": true, "location": "path"}, "includeDeleted": {"type": "boolean", "default": "false", "location": "query"}, "maxResults": {"type": "integer", "default": "20", "format": "int32", "minimum": "0", "maximum": "100", "location": "query"}, "pageToken": {"type": "string", "location": "query"}, "updatedMin": {"type": "string", "location": "query"}}, "response": {"$ref": "CommentList"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.readonly"]}, "patch": {"id": "drive.comments.patch", "path": "files/{fileId}/comments/{commentId}", "httpMethod": "PATCH", "parameters": {"commentId": {"type": "string", "required": true, "location": "path"}, "fileId": {"type": "string", "required": true, "location": "path"}}, "request": {"$ref": "Comment"}, "response": {"$ref": "Comment"}, "scopes": ["https://www.googleapis.com/auth/drive"]}, "update": {"id": "drive.comments.update", "path": "files/{fileId}/comments/{commentId}", "httpMethod": "PUT", "parameters": {"commentId": {"type": "string", "required": true, "location": "path"}, "fileId": {"type": "string", "required": true, "location": "path"}}, "request": {"$ref": "Comment"}, "response": {"$ref": "Comment"}, "scopes": ["https://www.googleapis.com/auth/drive"]}}}', true));
  1019. $this->files = new Google_FilesServiceResource($this, $this->serviceName, 'files', json_decode('{"methods": {"copy": {"id": "drive.files.copy", "path": "files/{fileId}/copy", "httpMethod": "POST", "parameters": {"convert": {"type": "boolean", "default": "false", "location": "query"}, "fileId": {"type": "string", "required": true, "location": "path"}, "ocr": {"type": "boolean", "default": "false", "location": "query"}, "ocrLanguage": {"type": "string", "location": "query"}, "pinned": {"type": "boolean", "default": "false", "location": "query"}, "sourceLanguage": {"type": "string", "location": "query"}, "targetLanguage": {"type": "string", "location": "query"}, "timedTextLanguage": {"type": "string", "location": "query"}, "timedTextTrackName": {"type": "string", "location": "query"}}, "request": {"$ref": "File"}, "response": {"$ref": "File"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file"]}, "delete": {"id": "drive.files.delete", "path": "files/{fileId}", "httpMethod": "DELETE", "parameters": {"fileId": {"type": "string", "required": true, "location": "path"}}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file"]}, "get": {"id": "drive.files.get", "path": "files/{fileId}", "httpMethod": "GET", "parameters": {"fileId": {"type": "string", "required": true, "location": "path"}, "projection": {"type": "string", "enum": ["BASIC", "FULL"], "location": "query"}, "updateViewedDate": {"type": "boolean", "default": "false", "location": "query"}}, "response": {"$ref": "File"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.metadata.readonly", "https://www.googleapis.com/auth/drive.readonly"]}, "insert": {"id": "drive.files.insert", "path": "files", "httpMethod": "POST", "parameters": {"convert": {"type": "boolean", "default": "false", "location": "query"}, "ocr": {"type": "boolean", "default": "false", "location": "query"}, "ocrLanguage": {"type": "string", "location": "query"}, "pinned": {"type": "boolean", "default": "false", "location": "query"}, "sourceLanguage": {"type": "string", "location": "query"}, "targetLanguage": {"type": "string", "location": "query"}, "timedTextLanguage": {"type": "string", "location": "query"}, "timedTextTrackName": {"type": "string", "location": "query"}}, "request": {"$ref": "File"}, "response": {"$ref": "File"}, "scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file"], "supportsMediaUpload": true, "mediaUpload": {"accept": ["*/*"], "maxSize": "10GB", "protocols": {"simple": {"multipart": true, "path": "/upload/drive/v2/files"}, "resumable": {"multipart": true, "path": "/resumable/upload/drive/v2/files"}}}}, "list": {"id": "drive.files.list", "path": "files", "httpMethod": "GET", "parameters": {"maxResults": {"type": "integer", "default": "100", "format": "int32", "minimum": "0", "location": "query"}, "pageToken": {"type": "string", "location": "query"}, "projection": {"type": "string", "enum": ["BASIC", "FULL"], "location": "query"}, "q": {"type": "string", "location": "query"}}, "response": {"$ref": "FileList"}, "scopes": ["https://w…

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