| class info |
| public class Drive.Comments.Delete extends DriveRequest<Void> |
| Drive.Comments.Delete class. |
| Constructor name |
Drive.Comments.Delete(String fileId, String commentId) Constructor for the Drive.Comments.Delete class. |
| Return type | Method name |
| String | getCommentId() Obtains a file comment ID. |
| String | getFileId() Obtains a file ID. |
| Drive.Comments.Delete | set(String parameterName, Object value) Sets the given parameter value for the given parameter name. |
| Drive.Comments.Delete | setForm(String form) Sets the response data format. |
| Drive.Comments.Delete | setCommentId(String commentId) Sets a file comment ID. |
| Drive.Comments.Delete | setFields(String fields) Sets the fields to be contained in a response. |
| Drive.Comments.Delete | setFileId(String fileId) Sets a file ID. |
| Drive.Comments.Delete | setPrettyPrint(Boolean prettyPrint) Sets whether to return a response containing indentations and line-wrapping breaks. |
| Drive.Comments.Delete | setQuotaId(String quotaId) Sets a string of less than 40 characters to identify a user. The string is used by the server to restrict the user’s API calls. |
| void | execute() Sends an HTTP request and returns the object to be converted. |
| constructor |
| protected Drive.Comments.Delete(String fileId, String commentId) |
| Constructs a Drive.Comments.Delete object. |
Parameters
| Parameter name | Parameter desc |
| fileId | File ID. |
| commentId | Comment ID. |
| Method |
| public String getCommentId() |
| Obtains a file comment ID. |
Return
| type | desc |
| String | Comment ID. |
| Method |
public String getFileId() |
| Obtains a file ID. |
Return
| type | desc |
| String | File ID. |
| Method |
public Drive.Comments.Delete set(String parameterName, Object value) |
| Sets the given parameter value for the given parameter name. |
Parameters
| Parameter name | Parameter desc |
| parameterName | Parameter name. |
| value | Parameter value. |
Return
| type | desc |
| Drive.Comments.Delete | A Drive.Comments.Delete object. |
| Method |
public Drive.Comments.Delete setForm(String form) |
| Sets the response data format. |
Parameters
| Parameter name | Parameter desc |
| form | Response data format. The default data format is JSON, and only this format is supported currently. |
Return
| type | desc |
| Drive.Comments.Delete | A Drive.Comments.Delete object. |
| Method |
public Drive.Comments.Delete setCommentId(String commentId) |
| Sets a file comment ID. |
Parameters
| Parameter name | Parameter desc |
| commentId | Comment ID. |
Return
| type | desc |
| Drive.Comments.Delete | A Drive.Comments.Delete object. |
| Method |
public Drive.Comments.Delete setFields(String fields) |
| Sets the fields to be contained in a response. |
Parameters
| Parameter name | Parameter desc |
| fields | Fields to be contained in a response. An asterisk (*) can be used to match all related fields. |
Return
| type | desc |
| Drive.Comments.Delete | A Drive.Comments.Delete object. |
| Method |
public Drive.Comments.Delete setFileId(String fileId) |
| Sets a file ID. |
Parameters
| Parameter name | Parameter desc |
| fileId | File ID. |
Return
| type | desc |
| Drive.Comments.Delete | A Drive.Comments.Delete object. |
| Method |
public Drive.Comments.Delete setPrettyPrint(Boolean prettyPrint) |
| Sets whether to return a response containing indentations and line-wrapping breaks. |
Parameters
| Parameter name | Parameter desc |
| prettyPrint | Indicates whether to return a response containing indentations and line-wrapping breaks. The value is a Boolean value. |
Return
| type | desc |
| Drive.Comments.Delete | A Drive.Comments.Delete object. |
| Method |
public Drive.Comments.Delete setQuotaId(String quotaId) |
| Sets a string of less than 40 characters to identify a user. The string is used by the server to restrict the user’s API calls. |
Parameters
| Parameter name | Parameter desc |
| quotaId | A string of less than 40 characters to identify a user. The string is used by the server to restrict the user’s API calls. |
Return
| type | desc |
| Drive.Comments.Delete | A Drive.Comments.Delete object. |
| Method |
public T execute() throws IOException |
| Sends an HTTP request and returns the object to be converted. |
Throws
| Parameter name | Parameter desc |
java.io.IOException | I/O exception thrown upon an API call failure. You can use the getMessage() method to obtain the error description. |
Note: The Drive.Comments.Delete class extends DriveRequest<Void>. Therefore, no result is returned if the execute() method is called in the Drive.Comments.Delete class.
Sample Code
- private void deleteComments(Drive drive, File file, Comment comment){
- try{
- drive.comments().delete(file.getId(), comment.getId()).execute();
- } catch (Exception e){
- Log.e(TAG, "deleteComments error: " + e.toString());
- }
- }