Reputation: 31
I'm trying to get metadata for all files in a particular publicly shared Google Drive folder using the v3/drive.files.list API. My current approach is to first get a list of everything in root,
q='some-id' in parents
and then repeat similar queries for all the subdirectiories found. What I'd like to do instead of requesting data for each subdirectory individually is to combine queries like so:
q='some-subdir-id-1' in parents or 'some-dubdir-id-2' in parents
(edited: originally posted query with and
by mistake)
However, in APIs explorer this (sometimes) returns only files in one of directories, and in .NET binding it simply returns an empty list with no exceptions being thrown. So, is there a way to have multiple 'something' in parents
parameters in a single query?
Upvotes: 1
Views: 1262
Reputation: 201378
You want to retrieve all files in several folders by one query. If my understanding is correct, how about this query?
q='some-subdir-id-1' in parents or 'some-dubdir-id-2' in parents or 'some-dubdir-id-3' in parents
or
, the files in the folders of some-subdir-id-1
, some-subdir-id-2
and some-subdir-id-3
are retrieved.parents
is used for fields
, you can also retrieve the parents for each file, simultaneously.If this was not what you want, I'm sorry.
Upvotes: 1