AppMaker Drive.Files.list查询属性

时间:2018-11-07 23:58:55

标签: google-app-maker

function searchDrive(teamDriveId) { var args = { corpora: 'teamDrive', includeTeamDriveItems: true, supportsTeamDrives: true, teamDriveId: teamDriveId, q: "properties has { key = 'source' and value = 'internet' }" }; return Drive.Files.list(args).items;

结果:GoogleJsonResponseException:在searchDrive上查询无效(ServerScript:9)

我已经在API Explorer中运行了相同的查询,并收到了成功的结果。我已经使用AppMaker中的Drive.Files.list API运行了其他查询(mimeType='image/jpeg'),并收到了成功的结果。

有人使用此API查询“属性”吗?有人对我在做什么错有任何见解吗?

谢谢

1 个答案:

答案 0 :(得分:1)

要进行正确的查询,您需要包括可见性属性;因此应该是:

v-bind

请注意function searchDrive(teamDriveId) { var args = { corpora: 'teamDrive', includeTeamDriveItems: true, supportsTeamDrives: true, teamDriveId: teamDriveId, q: "properties has { key = 'source' and value = 'internet' and visibility='PRIVATE' }" }; return Drive.Files.list(args).items; } 部分。根据{{​​3}},可能的值为visibility='PRIVATE'