Class Info |
|---|
public class Drive.Replies.Create extends DriveRequest<Reply> Drive.Replies.Create class. |
Constructor Name |
|---|
Drive.Replies.Create(String fileId, String commentId, Reply content) Constructs a Drive.Replies.Create object. |
Qualifier and Type | Method Name and Description |
|---|---|
execute() Sends an HTTP request and returns the object to be converted. | |
String | Obtains the ID of a comment replied. |
String | Obtains the ID of a file whose comment is replied. |
set(String parameterName, Object value) Sets the given parameter value for the given parameter name. | |
setCommentId(String commentId) Sets the ID of a comment replied. | |
setFileId(String fileId) Sets the ID of a file whose comment is replied. | |
setFields(String fields) Sets the fields to be contained in a response. | |
setForm(String form) Sets the response data format. | |
setPrettyPrint(Boolean prettyPrint) Sets whether to return a response containing indentations and newline characters. | |
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. |
Constructor |
|---|
protected Drive.Replies.Create(String fileId, String commentId, Reply content) Constructs a Drive.Replies.Create object. |
Parameters
Name | Description |
|---|---|
fileId | File ID. |
commentId | Comment ID. |
content | Reply to a comment. |
Method |
|---|
public String getCommentId() Obtains the ID of a comment replied. |
Returns
Type | Description |
|---|---|
String | Comment ID. |
Method |
|---|
public String getFileId() Obtains the ID of a file whose comment is replied. |
Returns
Type | Description |
|---|---|
String | ID of a file whose comment is replied. |
Method |
|---|
public Drive.Replies.Create set(String parameterName, Object value) Sets the given parameter value for the given parameter name. |
Parameters
Name | Description |
|---|---|
parameterName | Parameter name. |
value | Parameter value. |
Returns
Type | Description |
|---|---|
Drive.Replies.Create | A Drive.Replies.Create object. |
Method |
|---|
public Drive.Replies.Create setCommentId(String commentId) Sets the ID of a comment replied. |
Parameters
Name | Description |
|---|---|
commentId | Comment ID. |
Returns
Type | Description |
|---|---|
Drive.Replies.Create | A Drive.Replies.Create object. |
Method |
|---|
public Drive.Replies.Create setFields(String fields) Sets the fields to be contained in a response. |
Parameters
Name | Description |
|---|---|
fields | Fields to be contained in a response. An asterisk (*) can be used to match all related fields. |
Returns
Type | Description |
|---|---|
Drive.Replies.Create | A Drive.Replies.Create object. |
Method |
|---|
public Drive.Replies.Create setFileId(String fileId) Sets the ID of a file whose comment is replied. |
Parameters
Name | Description |
|---|---|
fileId | ID of a file whose comment is replied. |
Returns
Type | Description |
|---|---|
Drive.Replies.Create | A Drive.Replies.Create object. |
Method |
|---|
public Drive.Replies.Create setForm(String form) Sets the response data format. |
Parameters
Name | Description |
|---|---|
form | Response data format. |
Returns
Type | Description |
|---|---|
Drive.Replies.Create | A Drive.Replies.Create object. |
Method |
|---|
public Drive.Replies.Create setPrettyPrint(Boolean prettyPrint) Sets whether to return a response containing indentations and newline characters. |
Parameters
Name | Description |
|---|---|
prettyPrint | Response containing indentations and newline characters. |
Returns
Type | Description |
|---|---|
Drive.Replies.Create | A Drive.Replies.Create object. |
Method |
|---|
public Drive.Replies.Create 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
Name | Description |
|---|---|
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. |
Returns
Type | Description |
|---|---|
Drive.Replies.Create | A Drive.Replies.Create object. |
Method |
|---|
public T execute() throws IOException Sends an HTTP request and returns the object to be converted. |
Throws
Name | Description |
|---|---|
java.io.IOException | I/O exception thrown upon an API call failure. You can use the getMessage method to obtain the error description. |
Returns
Type | Description |
|---|---|
Reply | The Drive.Replies.Create class inherits DriveRequest< Reply>. Therefore, the return result of the execute() method is encapsulated as a Reply object. |
private void createReplies(Drive drive, File mFile, Comment mComment) {
try {
Reply reply = new Reply();
reply.setDescription("interface test reply");
reply.setOperate("resolve");
drive.replies().create(mFile.getId(), mComment.getId(), reply).setFields("*").execute();
} catch (Exception e) {
Log.e(TAG, "createReplies error: " + e.getMessage());
}
}