Google Drive SDK“sharedWithMe = false”搜索查询不起作用

Jae*_*aex 5 google-drive-api

我正在尝试获取“我的云端硬盘”中的文件夹列表,并使用以下搜索查询请求“ https://www.googleapis.com/drive/v2/files ”:

mimeType = 'application/vnd.google-apps.folder' and trashed = false and 'me' in writers and sharedWithMe = false
Run Code Online (Sandbox Code Playgroud)

但它给出了这个错误:

{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "invalid",
    "message": "Invalid Value",
    "locationType": "parameter",
    "location": "q"
   }
  ],
  "code": 400,
  "message": "Invalid Value"
 }
}
Run Code Online (Sandbox Code Playgroud)

但当我使用sharedWithMe = true它时效果很好。

这里https://developers.google.com/drive/web/search-parameters没有提到任何有关 sharedWithMe 的真实检查是不可能的。那么这是有意的行为吗?

有没有更好的方法来获取“我的云端硬盘”的文件夹列表而不是此查询?

小智 0

正确的查询是
mimeType = 'application/vnd.google-apps.folder' 和rashed = false 以及 writers 和 shareWithMe 中的 'me'

没有 = 假