我试着使用list thread方法:
GET https://www.googleapis.com/gmail/v1/users/{MyEmailAddress}/threads?labelIds=INBOX&labelIds=UNREAD&key={YOUR_API_KEY}
Run Code Online (Sandbox Code Playgroud)
resultSizeEstimate与Gmail网络应用中我的收件箱旁边的数字不匹配.
还有另外一种方法吗?
Gmail API现在使用Labels.Get()方法为每个Label上的消息和线程提供总计和未读计数.请参阅:https: //developers.google.com/gmail/api/release-notes 和 https://developers.google.com/gmail/api/v1/reference/users/labels
在 Gmail 用户界面中关闭对话视图,以便获得收件箱中邮件(而非线程)的准确计数。
您还可以使用:
在:收件箱是:未读
作为 UI 和 API 中的查询。删除 labelId 参数。
| 归档时间: |
|
| 查看次数: |
5820 次 |
| 最近记录: |