当我查询 Gmail API 时
results = service.users().messages().list(userId='me',q="from:xyz@wso2.com", maxResults=10).execute()
我得到了这个输出。在这里我没有收到所有消息它只返回了Thread Id
和id
"messages": [
{
"id": "1655b9b497dc76aa",
"threadId": "165380da74833127"
},
{
"id": "1655b9a7409383dd",
"threadId": "1655b9a7409383dd"
},
{
"id": "1655b9a25c441268",
"threadId": "16470b77316be7ab"
},
{....
为了得到消息,我必须再次查询。这里的问题是,当我使用 Id 查询时,它返回 400 错误,但是当我使用线程时,它返回带有片段的消息。但是在文档中,他们已经明确提到我们必须提供 id
id - string - The ID of the message to retrieve.
- Thread Id 和 Id 有什么区别?
- 我不能查询所有字段吗?
"labelIds": [ "UNREAD", "CATEGORY_FORUMS", "INBOX" ], "snippet": "嗨,Amanda、Ruwan 和 Mifan,我们已经完成了与 Verizon 的 RFP 回合!请您查看 RFP 并开始正在做这个吗?如果我们需要让 WSO2 电信公司参与进来,请告诉我。谢谢,”,“historyId”:“5217959”,“internalDate”:“1534833021000”....
作为一个没有查询的JSON,一次又一次,使用每个ID?如果我查询那么多时间,因为我必须查询 150000 个 ID,似乎 Google API 可能会阻止我使用节流机制。