Google_RevisionsServiceResource

The "revisions" collection of methods.

Defined (1)

The class is defined in the following location(s).

/inc/google-api-php-client/src/contrib/Google_DriveService.php  
  1. class Google_RevisionsServiceResource extends Google_ServiceResource { 
  2.  
  3.  
  4. /** 
  5. * Updates a revision. This method supports patch semantics. (revisions.patch) 
  6. * @param string $fileId The ID for the file. 
  7. * @param string $revisionId The ID for the revision. 
  8. * @param Google_Revision $postBody 
  9. * @param array $optParams Optional parameters. 
  10. * @return Google_Revision 
  11. */ 
  12. public function patch($fileId, $revisionId, Google_Revision $postBody, $optParams = array()) { 
  13. $params = array('fileId' => $fileId, 'revisionId' => $revisionId, 'postBody' => $postBody); 
  14. $params = array_merge($params, $optParams); 
  15. $data = $this->__call('patch', array($params)); 
  16. if ($this->useObjects()) { 
  17. return new Google_Revision($data); 
  18. } else { 
  19. return $data; 
  20. /** 
  21. * Gets a specific revision. (revisions.get) 
  22. * @param string $fileId The ID of the file. 
  23. * @param string $revisionId The ID of the revision. 
  24. * @param array $optParams Optional parameters. 
  25. * @return Google_Revision 
  26. */ 
  27. public function get($fileId, $revisionId, $optParams = array()) { 
  28. $params = array('fileId' => $fileId, 'revisionId' => $revisionId); 
  29. $params = array_merge($params, $optParams); 
  30. $data = $this->__call('get', array($params)); 
  31. if ($this->useObjects()) { 
  32. return new Google_Revision($data); 
  33. } else { 
  34. return $data; 
  35. /** 
  36. * Lists a file's revisions. (revisions.list) 
  37. * @param string $fileId The ID of the file. 
  38. * @param array $optParams Optional parameters. 
  39. * @return Google_RevisionList 
  40. */ 
  41. public function listRevisions($fileId, $optParams = array()) { 
  42. $params = array('fileId' => $fileId); 
  43. $params = array_merge($params, $optParams); 
  44. $data = $this->__call('list', array($params)); 
  45. if ($this->useObjects()) { 
  46. return new Google_RevisionList($data); 
  47. } else { 
  48. return $data; 
  49. /** 
  50. * Updates a revision. (revisions.update) 
  51. * @param string $fileId The ID for the file. 
  52. * @param string $revisionId The ID for the revision. 
  53. * @param Google_Revision $postBody 
  54. * @param array $optParams Optional parameters. 
  55. * @return Google_Revision 
  56. */ 
  57. public function update($fileId, $revisionId, Google_Revision $postBody, $optParams = array()) { 
  58. $params = array('fileId' => $fileId, 'revisionId' => $revisionId, 'postBody' => $postBody); 
  59. $params = array_merge($params, $optParams); 
  60. $data = $this->__call('update', array($params)); 
  61. if ($this->useObjects()) { 
  62. return new Google_Revision($data); 
  63. } else { 
  64. return $data; 
  65. /** 
  66. * Removes a revision. (revisions.delete) 
  67. * @param string $fileId The ID of the file. 
  68. * @param string $revisionId The ID of the revision. 
  69. * @param array $optParams Optional parameters. 
  70. */ 
  71. public function delete($fileId, $revisionId, $optParams = array()) { 
  72. $params = array('fileId' => $fileId, 'revisionId' => $revisionId); 
  73. $params = array_merge($params, $optParams); 
  74. $data = $this->__call('delete', array($params)); 
  75. return $data;