In what order does the Gmail API return messages when calling “Users.messages: list”

旧巷老猫 提交于 2019-12-05 09:53:32

Yes, you are correct. Messages are returned in descending order, with the newest one first.

You could save the internalDate of the newest message and list new messages with that value in the query a few days later.

Example

internalDate = 1490213949000 // Wed Mar 22 2017 21:19:09 GMT+0100 (CET)

q=after:1490213949 // 'after' takes seconds since the epoch. internalDate/1000
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!