7
votes

I would like to know the keywords and parameters for formulating a query string for the google drive api list.setQ method.

Here is my code:

FileList files = drive.files().list()
            .setQ("trashed=true")
            .setMaxResults(100)
            .execute();

So far, I found "TRASHED" is valid parameter which I can use to list all the trashed files in my google drive. It would be nice to have the complete list of parameters. Is that list available?

1
new way of writing the query .setQ is list(q=('trashed=true')).execute() - MagTun

1 Answers

8
votes

The Google Drive SDK documentation lists all fields and operators you can use in your queries:

https://developers.google.com/drive/search-parameters