Google Drive 允许您将自定义属性添加到文件 ( https://developers.google.com/drive/v3/web/properties ),但它们不包含在可搜索文本中。
从https://developers.google.com/drive/v3/web/search-parameters:
fullText string contains Full text of the file including name, description, content, and indexable text.
您只能搜索完全匹配的属性:
appProperties 有 { key='additionalID' and value='8e8aceg2af2ge72e78' }
还有其他方法可以搜索自定义属性吗?
示例:如果我有一个带有自定义属性“标签”和值“活动银行紧急”的文件,我如何才能files.list
(https://developers.google.com/drive/v3/reference/files/list)找到这个文件当我搜索“紧急”时?
论文方法呢?不幸的是,它找不到appProperties
使用q
. 因此,为了实现您想要做的事情,我提出了以下 2 种模式。
files/appProperties
用作查询参数的文件列表。
GET https://www.googleapis.com/drive/v3/files?fields=files%2FappProperties
appProperties
从谷歌云端硬盘中的所有文件检索。appProperties has { key='tags' and value='active banking urgent' }
for检索文件q
。在此模式中,API 的使用计数为 2。
files(appProperties,id,name)
用作查询参数的文件列表。
GET https://www.googleapis.com/drive/v3/files?fields=files(appProperties%2Cid%2Cname)
appProperties
,fileId
并filename
从 Google Drive 上的所有文件中检索。这些参数被搜索为or
。appProperties
,并检索具有 appProperties(键“标签”,值“活动银行紧急”)的文件。在此模式中,API 的使用计数为 1。
如果这对你没有用,我很抱歉。
归档时间: |
|
查看次数: |
2576 次 |
最近记录: |