Google Drive API Files.List Query String

2019-02-13 08:59发布

问题:

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:

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

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