目录

class info
public class Drive.Changes. List extends DriveRequest<ChangeList>
Drive.Changes.List class.

Protected Constructor Summary

Constructor name

Drive.Changes.List (String cursor) 

Constructor for the Drive.Changes.List class.

Public Method Summary

Return typeMethod 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.

Protected Constructors

constructor
protected Drive.Changes.List (String cursor)
Constructs a Drive.Changes.List object.

Parameters

Parameter nameParameter desc
cursorCursor, 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.

Public Methods

Method
public Drive.Changes.List setFields(String fields)
Sets the fields to be contained in a response.

Parameters

Parameter nameParameter desc
fieldsFields 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

typedesc
Drive.Changes.ListA 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 nameParameter desc
parameterNameParameter name.
valueParameter value.

Return

typedesc
Drive.Changes.ListA Drive.Changes.List object.
Method


public String getCursor()

Obtains the value of cursor.

Return

typedesc
StringValue of cursor.
Method


public Drive.Changes.List setCursor(String cursor)

Sets cursor.

Parameters

Parameter nameParameter desc
cursorCursor, 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

typedesc
Drive.Changes.ListA Drive.Changes.List object.
Method


public Integer getPageSize()

Obtains the value of pageSize.

Return

typedesc
IntegerValue of pageSize.
Method


public Drive.Changes.List setPageSize(Integer pageSize)

Sets pageSize.

Parameters

Parameter nameParameter desc
pageSizeNumber of changes returned on each page. The default value is 100. The value can range from 1 to 100.

Return

typedesc
Drive.Changes.ListA Drive.Changes.List object.
Method


public String getContainers()

Obtains the types of space to query.

Return

typedesc
StringTypes 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 nameParameter desc
containers Types of space to query. The options are drive and applicationData.

Return

typedesc
Drive.Changes.ListA Drive.Changes.List object.
Method


public Drive.Changes.List setForm(String form)

Sets the response data format.

Parameters

Parameter nameParameter desc
formResponse data format. The default data format is JSON, and only this format is supported currently.

Return

typedesc
Drive.Changes.ListA 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 nameParameter desc
prettyPrintIndicates whether to return a response containing indentations and line-wrapping breaks. The value is of the Boolean type.

Return

typedesc
Drive.Changes.ListA 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 nameParameter desc
quotaIdA 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

typedesc
Drive.Changes.ListA 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

typedesc
BooleanIndicates 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 nameParameter desc
includeDeletedIndicates 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

typedesc
Drive.Changes.ListA Drive.Changes.List object.
Method


public boolean isIncludeDeleted()

Obtains the value converted from the value set for includeDeleted.

Return

typedesc
booleanValue 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 nameParameter 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

typedesc
ChangeListThe Drive.Changes.List class extends DriveRequest<ChangeList>. Therefore, the return result of the execute() method is encapsulated as a DriveRequest<ChangeList> object.


Sample Code

  1. private void listChange (Drive drive, String cursor) {
  2.    try {
  3.        Drive.Changes.List listRequest = drive.changes().list(cursor);
  4.        ChangeList changeList = listRequest.execute();
  5.    } catch (Exception e) {
  6.        Log.e(TAG, "listChange error: " + e.toString());
  7.    }
  8. }