Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
danielgrittner opened this issue Oct 11, 2024 · 0 comments
Open
Assignees

Comments

@danielgrittner
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants