| class info |
| public class Drive.Changes. List extends DriveRequest<ChangeList> |
| Drive.Changes.List class. |
| Constructor name |
Drive.Changes.List (String cursor) Constructor for the Drive.Changes.List class. |
| Return type | Method name |
| Drive.Changes.List | setFields(String fields) Sets the fields to be contained in a response. |
| Drive.Changes.List | set(String parameterName, Object value) Sets the given parameter value for the given parameter name. |
| String | getCursor() Obtains the value of cursor. |
| Drive.Changes.List | setCursor(String cursor) Sets cursor. |
| Integer | getPageSize() Obtains the value of pageSize. |
| Drive.Changes.List | setPageSize(Integer pageSize) Sets pageSize. |
| String | getContainers() Obtains the types of space to query. |
| Drive.Changes.List | setContainers(String containers) Sets the types of space to query. |
| ChangeList | execute() Sends an HTTP request and returns the object to be converted. |
| Drive.Changes.List | setForm(String form) Sets the response data format. |
| Drive.Changes.List | setPrettyPrint(Boolean prettyPrint) Sets whether to return a response containing indentations and line-wrapping breaks. |
| Drive.Changes.List | 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. |
| Boolean | getIncludeDeleted() Checks whether the changes that have been deleted are included in the returned change list. A deleted change may be one deleted by the user or one that the user no longer has the required permission. The default return value is true. |
| Drive.Changes.List | setIncludeDeleted(Boolean includeDeleted) Sets whether the changes that have been deleted are included in the returned change list. A deleted change may be one deleted by the user or one that the user no longer has the required permission. |
| boolean | isIncludeDeleted() Obtains the value converted from the value set for includeDeleted. |
| constructor |
| protected Drive.Changes.List (String cursor) |
| Constructs a Drive.Changes.List object. |
Parameters
| Parameter name | Parameter desc |
| cursor | Cursor, which is obtained from nextCursor in the previous response or using the getStartCursor() method. The server returns a maximum of 100 changes for each query request. If there are more than 100 changes, the cursor needs to be set to nextCursor for a new change notification. This process repeats until nextCursor in the response is empty, which indicates that all changes have been returned. |
| Method |
| public Drive.Changes.List 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. If all related fields need to be contained in a response, set this parameter to asterisk (*). If only certain fields need to be contained in a response, set this parameter to the specific fields, for example, category, nextCursor, newStartCursor, changes/category, and changes/change_type. If this parameter is not set, the following fields are returned: category, changes.fileName, changes.time, newStartCursor, and nextCursor. |
Return
| type | desc |
| Drive.Changes.List | A Drive.Changes.List object. |
| Method |
public Drive.Changes.List 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.Changes.List | A Drive.Changes.List object. |
| Method |
public String getCursor() |
| Obtains the value of cursor. |
Return
| type | desc |
| String | Value of cursor. |
| Method |
public Drive.Changes.List setCursor(String cursor) |
| Sets cursor. |
Parameters
| Parameter name | Parameter desc |
| cursor | Cursor, which is obtained from nextCursor in the previous response or using the getStartCursor() method. The server returns a maximum of 100 changes for each query request. If there are more than 100 changes, the cursor needs to be set to nextCursor for a new change notification. This process repeats until nextCursor in the response is empty, which indicates that all changes have been returned. |
Return
| type | desc |
| Drive.Changes.List | A Drive.Changes.List object. |
| Method |
public Integer getPageSize() |
| Obtains the value of pageSize. |
Return
| type | desc |
| Integer | Value of pageSize. |
| Method |
public Drive.Changes.List setPageSize(Integer pageSize) |
| Sets pageSize. |
Parameters
| Parameter name | Parameter desc |
| pageSize | Number of changes returned on each page. The default value is 100. The value can range from 1 to 100. |
Return
| type | desc |
| Drive.Changes.List | A Drive.Changes.List object. |
| Method |
public String getContainers() |
| Obtains the types of space to query. |
Return
| type | desc |
| String | Types of space to query. The options are drive and applicationData. |
| Method |
public Drive.Changes.List setContainers(String containers) |
| Sets the types of space to query. |
Parameters
| Parameter name | Parameter desc |
| containers | Types of space to query. The options are drive and applicationData. |
Return
| type | desc |
| Drive.Changes.List | A Drive.Changes.List object. |
| Method |
public Drive.Changes.List 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.Changes.List | A Drive.Changes.List object. |
| Method |
public Drive.Changes.List 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 of the Boolean type. |
Return
| type | desc |
| Drive.Changes.List | A Drive.Changes.List object. |
| Method |
public Drive.Changes.List 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.Changes.List | A Drive.Changes.List object. |
| Method |
public Boolean getIncludeDeleted() |
| Checks whether the changes that have been deleted are included in the returned change list. A deleted change may be one deleted by the user or one that the user no longer has the required permission. The default return value is true. |
Return
| type | desc |
| Boolean | Indicates whether the changes that have been deleted are included in the returned change list. A deleted change may be one deleted by the user or one that the user no longer has the required permission. The default return value is true. |
| Method |
public Drive.Changes.List setIncludeDeleted(Boolean includeDeleted) |
| Sets whether the changes that have been deleted are included in the returned change list. A deleted change may be one deleted by the user or one that the user no longer has the required permission. |
Parameters
| Parameter name | Parameter desc |
| includeDeleted | Indicates whether the changes that have been deleted are included in the returned change list. A deleted change may be one deleted by the user or one that the user no longer has the required permission. |
Return
| type | desc |
| Drive.Changes.List | A Drive.Changes.List object. |
| Method |
public boolean isIncludeDeleted() |
| Obtains the value converted from the value set for includeDeleted. |
Return
| type | desc |
| boolean | Value converted from the value set for includeDeleted. |
| 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. |
Return
| type | desc |
| ChangeList | The Drive.Changes.List class extends DriveRequest<ChangeList>. Therefore, the return result of the execute() method is encapsulated as a DriveRequest<ChangeList> object. |
Sample Code
- private void listChange (Drive drive, String cursor) {
- try {
- Drive.Changes.List listRequest = drive.changes().list(cursor);
- ChangeList changeList = listRequest.execute();
- } catch (Exception e) {
- Log.e(TAG, "listChange error: " + e.toString());
- }
- }