Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/shell/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google drive api Google Drive API-查询拥有的项目_Google Drive Api - Fatal编程技术网

Google drive api Google Drive API-查询拥有的项目

Google drive api Google Drive API-查询拥有的项目,google-drive-api,Google Drive Api,我正在使用一个工具,我只想查询我自己的文件夹。我无法制定一个被接受的查询字符串。我已经阅读了这个页面,现在正在试用API浏览器 StringmimeType='application/vnd.google apps.folder'生成文件夹。好的开始 ownedByMe,ownedByMe=true和ownedByMe=false都会产生错误400(无效值),而当我在结果集中使用此字段时,它会显示出来 sharedWithMe,sharedWithMe=true和sharedWithMe!=fa

我正在使用一个工具,我只想查询我自己的文件夹。我无法制定一个被接受的查询字符串。我已经阅读了这个页面,现在正在试用API浏览器

  • String
    mimeType='application/vnd.google apps.folder'
    生成文件夹。好的开始
  • ownedByMe
    ownedByMe=true
    ownedByMe=false
    都会产生错误400(无效值),而当我在结果集中使用此字段时,它会显示出来
  • sharedWithMe
    sharedWithMe=true
    sharedWithMe!=false
    生成结果,但有趣的是,我无法将此字段添加到结果集中,也无法将其包含在字段选择器中
  • sharedWithMe=false
    非sharedWithMe
    非sharedWithMe=true
    sharedWithMe!=真
    所有产量错误400
  • 我也尝试过其他一些不太常见的语法,但现在我没有主意了:(

    在所有者中使用“[我的电子邮件]”或在所有者中使用“'me”:


    这需要一个额外的作用域来获取用户的电子邮件地址。无论如何,它是有效的。如果几天内没有更好的消息发布,我将接受这个答案。谢谢。如果您需要多个用户上下文,请使用“我”。var files=DriveApp.searchFolders((mimeType='application/vnd.google apps.folder')和('me'in owners');
      var files = DriveApp.searchFolders("\(mimeType = 'application/vnd.google-apps.folder'\) and \('test@example.org' in owners\)");
    
      var files = DriveApp.searchFolders("\(mimeType = 'application/vnd.google-apps.folder'\) and \('me' in owners\)");