Google Drive API . approvals

Instance Methods

close()

Close httplib2 connections.

get(fileId, approvalId, x__xgafv=None)

Gets an Approval by ID.

list(fileId, pageSize=None, pageToken=None, x__xgafv=None)

Lists the Approvals on a file.

list_next()

Retrieves the next page of results.

Method Details

close()
Close httplib2 connections.
get(fileId, approvalId, x__xgafv=None)
Gets an Approval by ID.

Args:
  fileId: string, Required. The ID of the file the Approval is on. (required)
  approvalId: string, Required. The ID of the Approval. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Metadata for an approval. An approval is a review/approve process for a Drive item.
  "approvalId": "A String", # The Approval ID.
  "completeTime": "A String", # Output only. The time time the approval was completed.
  "createTime": "A String", # Output only. The time the approval was created.
  "dueTime": "A String", # The time that the approval is due.
  "initiator": { # Information about a Drive user. # The user that requested the Approval.
    "displayName": "A String", # Output only. A plain text displayable name for this user.
    "emailAddress": "A String", # Output only. The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
    "kind": "drive#user", # Output only. Identifies what kind of resource this is. Value: the fixed string `drive#user`.
    "me": True or False, # Output only. Whether this user is the requesting user.
    "permissionId": "A String", # Output only. The user's ID as visible in Permission resources.
    "photoLink": "A String", # Output only. A link to the user's profile photo, if available.
  },
  "kind": "A String", # This is always drive#approval.
  "modifyTime": "A String", # Output only. The most recent time the approval was modified.
  "reviewerResponses": [ # The responses made on the Approval by reviewers.
    { # A response on an Approval made by a specific Reviewer.
      "kind": "A String", # This is always drive#reviewerResponse.
      "response": "A String", # A Reviewer’s Response for the Approval.
      "reviewer": { # Information about a Drive user. # The user that is responsible for this response.
        "displayName": "A String", # Output only. A plain text displayable name for this user.
        "emailAddress": "A String", # Output only. The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
        "kind": "drive#user", # Output only. Identifies what kind of resource this is. Value: the fixed string `drive#user`.
        "me": True or False, # Output only. Whether this user is the requesting user.
        "permissionId": "A String", # Output only. The user's ID as visible in Permission resources.
        "photoLink": "A String", # Output only. A link to the user's profile photo, if available.
      },
    },
  ],
  "status": "A String", # Output only. The status of the approval at the time this resource was requested.
  "targetFileId": "A String", # Target file id of the approval.
}
list(fileId, pageSize=None, pageToken=None, x__xgafv=None)
Lists the Approvals on a file.

Args:
  fileId: string, Required. The ID of the file the Approval is on. (required)
  pageSize: integer, The maximum number of Approvals to return. When not set, at most 100 Approvals will be returned.
  pageToken: string, The token for continuing a previous list request on the next page. This should be set to the value of nextPageToken from a previous response.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The response of an Approvals list request.
  "items": [ # The list of Approvals. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.
    { # Metadata for an approval. An approval is a review/approve process for a Drive item.
      "approvalId": "A String", # The Approval ID.
      "completeTime": "A String", # Output only. The time time the approval was completed.
      "createTime": "A String", # Output only. The time the approval was created.
      "dueTime": "A String", # The time that the approval is due.
      "initiator": { # Information about a Drive user. # The user that requested the Approval.
        "displayName": "A String", # Output only. A plain text displayable name for this user.
        "emailAddress": "A String", # Output only. The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
        "kind": "drive#user", # Output only. Identifies what kind of resource this is. Value: the fixed string `drive#user`.
        "me": True or False, # Output only. Whether this user is the requesting user.
        "permissionId": "A String", # Output only. The user's ID as visible in Permission resources.
        "photoLink": "A String", # Output only. A link to the user's profile photo, if available.
      },
      "kind": "A String", # This is always drive#approval.
      "modifyTime": "A String", # Output only. The most recent time the approval was modified.
      "reviewerResponses": [ # The responses made on the Approval by reviewers.
        { # A response on an Approval made by a specific Reviewer.
          "kind": "A String", # This is always drive#reviewerResponse.
          "response": "A String", # A Reviewer’s Response for the Approval.
          "reviewer": { # Information about a Drive user. # The user that is responsible for this response.
            "displayName": "A String", # Output only. A plain text displayable name for this user.
            "emailAddress": "A String", # Output only. The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
            "kind": "drive#user", # Output only. Identifies what kind of resource this is. Value: the fixed string `drive#user`.
            "me": True or False, # Output only. Whether this user is the requesting user.
            "permissionId": "A String", # Output only. The user's ID as visible in Permission resources.
            "photoLink": "A String", # Output only. A link to the user's profile photo, if available.
          },
        },
      ],
      "status": "A String", # Output only. The status of the approval at the time this resource was requested.
      "targetFileId": "A String", # Target file id of the approval.
    },
  ],
  "kind": "A String", # This is always drive#approvalList
  "nextPageToken": "A String", # The page token for the next page of Approvals. This will be absent if the end of the Approvals list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results.
}
list_next()
Retrieves the next page of results.

        Args:
          previous_request: The request for the previous page. (required)
          previous_response: The response from the request for the previous page. (required)

        Returns:
          A request object that you can call 'execute()' on to request the next
          page. Returns None if there are no more items in the collection.