私のアプリケーションは、既知のルート フォルダー ('theFolder' など) を持つツリー構造に基づいています。
<theFolder> という名前のすべての
フォルダー
を取得できます。
gapi.client.request(
{
'path': '/drive/v2/files',
'method': 'GET',
'params': {
q : "title='"+theFolder+"' and mimeType='application/vnd.google-apps.folder'",
fields: "items(description,id,modifiedDate,parents/id,title)"
},
callback: theCallback
});
しかし、ルートフォルダー (存在する場合) のみが必要なので、いくつかの基準を追加しようとしても無駄でした:
and parents.isRoot
and parents.isRoot=true
and parents/isRoot=true
and (isRoot in parents)
これは、Drive SDK のフォルダーごとのファイルのリストの取得に関連していることを理解しています。より一般的には、「サブフィールドに基準を設定する方法」に関連しています。