gpt4 book ai didi

python - 跟进术语,寻找行动项目

转载 作者:行者123 更新时间:2023-12-01 07:15:14 24 4
gpt4 key购买 nike

我想编写一个快速脚本来提醒自己在各种 Google 文档上放置的后续操作项,从 Google Drive 中受益,以便从 API list() 中受益。但是,followup:actionitems 搜索查询似乎不适用于该 API,因为搜索词未知。它返回 400 错误。

例如,这样做:

results = service.files().list(q="followup:actionitems",
pageSize=50,
pageToken=page_token,
fields="nextPageToken, files(id, name)").execute()

结果:

Traceback (most recent call last):
File "./reminder.py", line 49, in <module>
main()
File "./reminder.py", line 38, in main
fields="nextPageToken, files(id, name)").execute()
File "/home/x/.virtualenvs/gdocs-followup-reminder-7WeAWiqi/lib/python3.7/site-packages/googleapiclient/_helpers.py", line 130, in positional_wrapper
return wrapped(*args, **kwargs)
File "/home/x/.virtualenvs/gdocs-followup-reminder-7WeAWiqi/lib/python3.7/site-packages/googleapiclient/http.py", line 856, in execute
raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <HttpError 400 when requesting https://www.googleapis.com/drive/v3/files?q=followup%3Aactionitems&pageSize=50&fields=nextPageToken%2C+files%28id%2C+name%29&alt=json returned "Invalid Value">

我有什么遗漏的吗?用法不对?或者将来有计划这样做吗?

最佳答案

您可以将 q 参数设置为

fullText contains 'followup:actionitems' and trashed = false

返回与 Google 云端硬盘 UI 相同的文件

关于python - 跟进术语,寻找行动项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58010474/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com