Google_CommentsServiceResource

The "comments" collection of methods.

Defined (1)

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

/gdwpm-api/contrib/Google_DriveService.php  
  1. class Google_CommentsServiceResource extends Google_ServiceResource { 
  2.  
  3. /** 
  4. * Deletes a comment. (comments.delete) 
  5. * @param string $fileId The ID of the file. 
  6. * @param string $commentId The ID of the comment. 
  7. * @param array $optParams Optional parameters. 
  8. */ 
  9. public function delete($fileId, $commentId, $optParams = array()) { 
  10. $params = array('fileId' => $fileId, 'commentId' => $commentId); 
  11. $params = array_merge($params, $optParams); 
  12. $data = $this->__call('delete', array($params)); 
  13. return $data; 
  14. /** 
  15. * Gets a comment by ID. (comments.get) 
  16. * @param string $fileId The ID of the file. 
  17. * @param string $commentId The ID of the comment. 
  18. * @param array $optParams Optional parameters. 
  19. * @opt_param bool includeDeleted If set, this will succeed when retrieving a deleted comment, and will include any deleted replies. 
  20. * @return Google_Comment 
  21. */ 
  22. public function get($fileId, $commentId, $optParams = array()) { 
  23. $params = array('fileId' => $fileId, 'commentId' => $commentId); 
  24. $params = array_merge($params, $optParams); 
  25. $data = $this->__call('get', array($params)); 
  26. if ($this->useObjects()) { 
  27. return new Google_Comment($data); 
  28. } else { 
  29. return $data; 
  30. /** 
  31. * Creates a new comment on the given file. (comments.insert) 
  32. * @param string $fileId The ID of the file. 
  33. * @param Google_Comment $postBody 
  34. * @param array $optParams Optional parameters. 
  35. * @return Google_Comment 
  36. */ 
  37. public function insert($fileId, Google_Comment $postBody, $optParams = array()) { 
  38. $params = array('fileId' => $fileId, 'postBody' => $postBody); 
  39. $params = array_merge($params, $optParams); 
  40. $data = $this->__call('insert', array($params)); 
  41. if ($this->useObjects()) { 
  42. return new Google_Comment($data); 
  43. } else { 
  44. return $data; 
  45. /** 
  46. * Lists a file's comments. (comments.list) 
  47. * @param string $fileId The ID of the file. 
  48. * @param array $optParams Optional parameters. 
  49. * @opt_param bool includeDeleted If set, all comments and replies, including deleted comments and replies (with content stripped) will be returned. 
  50. * @opt_param int maxResults The maximum number of discussions to include in the response, used for paging. 
  51. * @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. 
  52. * @opt_param string updatedMin Only discussions that were updated after this timestamp will be returned. Formatted as an RFC 3339 timestamp. 
  53. * @return Google_CommentList 
  54. */ 
  55. public function listComments($fileId, $optParams = array()) { 
  56. $params = array('fileId' => $fileId); 
  57. $params = array_merge($params, $optParams); 
  58. $data = $this->__call('list', array($params)); 
  59. if ($this->useObjects()) { 
  60. return new Google_CommentList($data); 
  61. } else { 
  62. return $data; 
  63. /** 
  64. * Updates an existing comment. This method supports patch semantics. (comments.patch) 
  65. * @param string $fileId The ID of the file. 
  66. * @param string $commentId The ID of the comment. 
  67. * @param Google_Comment $postBody 
  68. * @param array $optParams Optional parameters. 
  69. * @return Google_Comment 
  70. */ 
  71. public function patch($fileId, $commentId, Google_Comment $postBody, $optParams = array()) { 
  72. $params = array('fileId' => $fileId, 'commentId' => $commentId, 'postBody' => $postBody); 
  73. $params = array_merge($params, $optParams); 
  74. $data = $this->__call('patch', array($params)); 
  75. if ($this->useObjects()) { 
  76. return new Google_Comment($data); 
  77. } else { 
  78. return $data; 
  79. /** 
  80. * Updates an existing comment. (comments.update) 
  81. * @param string $fileId The ID of the file. 
  82. * @param string $commentId The ID of the comment. 
  83. * @param Google_Comment $postBody 
  84. * @param array $optParams Optional parameters. 
  85. * @return Google_Comment 
  86. */ 
  87. public function update($fileId, $commentId, Google_Comment $postBody, $optParams = array()) { 
  88. $params = array('fileId' => $fileId, 'commentId' => $commentId, 'postBody' => $postBody); 
  89. $params = array_merge($params, $optParams); 
  90. $data = $this->__call('update', array($params)); 
  91. if ($this->useObjects()) { 
  92. return new Google_Comment($data); 
  93. } else { 
  94. return $data;