Google_RevisionsServiceResource

The "revisions" collection of methods.

Defined (1)

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

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