删除事件发生时从 Microsoft Graph 获取通知发生、事件、通知、Microsoft

2023-09-06 17:18:19 作者:久友

我已订阅事件 (https://outlook.office.com/api/v2.0/me/events) 推送通知.

I have subscribed to events (https://outlook.office.com/api/v2.0/me/events) push notification.

当我删除一个重复主事件的事件时,我会收到更新通知,其中包含主事件的 ID,而不是特定的发生事件 ID.

When I delete one event of recurrence master event, I receive UPDATED notification with id of master event and not specific occurrence event id.

如果不与所有以前的重复事件进行比较,我如何知道哪个事件被删除了?而不是只接收主 id 事件.

How can I know which event was deleted without comparison with all previous recurrence events? And not receive only master id event.

推荐答案

当您删除"并出现时,从技术上讲,您并没有删除实体.您实际上是在向主人的重复模式添加一个例外.这就是为什么您会收到主节点已更新的通知,而不是事件已删除的通知.

When you "delete" and occurrence, you're technically not deleting an entity. You're actual adding an exception to the master's recurrence pattern. This is why you're receiving a notification that the master was updated rather than a notification that an event was deleted.

您可以通过调用 /instances.这将返回 事件对象的集合 对于给定的主人.您可以通过查看 type 属性(可能的值为 SingleInstanceOccurrence异常,或SeriesMaster).

You can see the list of event occurrences and exceptions by calling the /instances. This will return a collection of event objects for a given master. You can determine if an object is an occurrence or an exception by looking at the type property (possible values are SingleInstance, Occurrence, Exception, or SeriesMaster).

 
精彩推荐
图片推荐