我希望获得特定日期时间之后的线程列表,但无法找到任何方法。 我已根据上次使用Gmail API获取线程列表时将更新的日期时间存储在数据库中。 然后使用更新的时间我想进一步检索列表。
答案 0 :(得分:0)
Gmail API允许您在specific timestamp with second accuracy之后列出主题/消息。
假设您希望list threads收到Friday, 22-Jul-16 00:00:00 UTC
后收到的消息,您可以在after:1469145600
- 参数中写q
。
请求强>
GET https://www.googleapis.com/gmail/v1/users/me/threads?q=after%3A1469145600&access_token={YOUR_ACCESS_TOKEN}
<强>响应强>
{
"threads": [
{
"id": "1561153ce695b9ab",
"snippet": "Infinite Elgintensity has uploaded Gym Idiots - Spread Eagle Rows & Mike O'Hearn 585-Lb. Squat A montage of gym fails with... Infinite Elgintensity has uploaded Gym Idiots - Spread Eagle Rows",
"historyId": "895071"
}
],
"resultSizeEstimate": 1
}