Skip to content

Google Drive API v3: revisions().list lacking support for orderBy #2498

Open
@danielgrittner

Description

@danielgrittner

Thanks for stopping by to let us know something could be better!

PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.

Please run down the following list and make sure you've tried the usual "quick fixes":

If you are still having issues, please be sure to include as much information as possible:

Environment details

  • OS type and version: MacOSX 14.5
  • Python version: 3.12.6
  • pip version: 24.2
  • google-api-python-client version: 2.149.0

Steps to reproduce

  1. Build Google Drive service API v3
  2. Try to retrieve revisions of a file

Code example

drive_service = build("drive", "v3", credentials=creds)
request = drive_service.revisions().list(
    fileId=file_id,
    fields="nextPageToken, revisions(id, modifiedTime, lastModifyingUser, exportLinks)",
    orderBy="modifiedTime desc",
)

Stack trace

  File "/Users/danielgrittner/development/work/security_automation/another/admyral/admyral/actions/integrations/compliance/google_drive.py", line 91, in list_google_docs_revisions
    request = drive_service.revisions().list(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/danielgrittner/development/work/security_automation/another/admyral/.venv/lib/python3.12/site-packages/googleapiclient/discovery.py", line 1101, in method
    raise TypeError("Got an unexpected keyword argument {}".format(name))
TypeError: Got an unexpected keyword argument orderBy

Making sure to follow these steps will guarantee the quickest resolution possible.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions