使用Outlook REST API实现邮件文件夹对话视图的最佳方法 [英] Best way to achieve Conversation view for mail folder using Outlook REST API

查看:82
本文介绍了使用Outlook REST API实现邮件文件夹对话视图的最佳方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Outlook REST API来显示邮件文件夹中的消息,并按照对话对消息进行分组,就像在任何现代网络邮件中一样.

I would like to use the Outlook REST API to display the messages in a mail folder and group messages by conversations, like you have in any modern webmail.

例如对于inbox,我会要求使用诸如<mailuri>/inbox/messages?$select=ConversationId之类的第一个查询(默认情况下是按时间倒序排列)

For example with inbox, I would request using a first query such as <mailuri>/inbox/messages?$select=ConversationId (by default it is reverse chronological order)

仅按ConversationId分组此请求结果是不够的,因为某些电子邮件可能不在inbox(认为是sentmails)中,或者它们可能是分页的,没有在第一页中返回.

It is not sufficient to group this request results by ConversationId because some emails may not be in inbox (think of sentmails) or they may be paginated and not returned in the first page.

因此,对于每个不同的ConversationId,我需要执行另一个REST请求,以检索参与者或简单地计算对话中的电子邮件.我可能会使用新的批量请求为此.

Consequently, for each distinct ConversationId I need to perform another REST request, for retrieving participants or simply counting the emails in the conversation. I may use the new batch request to do this.

涉及很多请求.有更好的解决方案吗?

There are a lot of requests involved. Is there a better solution ?

推荐答案

您可能已经意识到REST API并没有直接提供一种将对话作为一个实体进行工作的方法.这是我们路线图上有待改进的地方.

As you've probably realized the REST API doesn't directly provide a way to work with conversations as an entity. This is something that we have on our roadmap to improve.

使用API​​的当前状态,您所描述的基本上是正确的方法.您可以将第二个请求推迟"进行对话,直到用户选择它为止.

With the current state of the API what you're describing is basically the right approach. You could possibly defer the second request to "fill in" a conversation until the user selects it.

这篇关于使用Outlook REST API实现邮件文件夹对话视图的最佳方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆