根据API文档 https://developers.google.com/drive/v3/web/search-parameters您可以使用与“trashed”相同的方式搜索“sharedWithMe”:
trashed boolean =, != Whether the file is in the trash or not.
sharedWithMe boolean =, != Files that have been shared with the authorized user.
像“trashed”、“not badged”和“trashed=false”这样的查询都按预期工作。 “sharedWithMe”也有效。
然而,不起作用的是“not shareWithMe”或“sharedWithMe=false”。什么是正确的语法或者这是一个错误?
示例:q=not+sharedWithMe
Error:
"domain": "global",
"reason": "invalid",
"message": "Invalid Value",
"locationType": "parameter",
"location": "q"
我还相信这个问题是 google Drive API 实现中的一个错误。
我正在通过使用“sharedWithMeTime”来解决这个问题(在python中)
我从每个列表请求中返回的属性。
当我取回所有物品(是否与我共享)后,
然后我测试每个项目中是否存在sharedWithMeTime 属性。
如果不是,那么该项目必须是“not shareWithMe”,这就是我想要使用的
作为查询,但收到OP描述的错误。
列表请求中的 python 文档链接如下:https://developers.google.com/resources/api-libraries/documentation/drive/v3/python/latest/drive_v3.files.html#list https://developers.google.com/resources/api-libraries/documentation/drive/v3/python/latest/drive_v3.files.html#list
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)