[英]Responding to an Office 365 event invite via REST
I'm currently working on adding functionality to allow a user to respond to an Office 365 event invitation (accept/maybe/decline) via their REST API. 我目前正在努力添加功能,以允许用户通过其REST API响应Office 365事件邀请(接受/可能/拒绝)。 I'm not entirely sure how developers are supposed to utilize this functionality via the API, however.
但是,我不完全确定开发人员应如何通过API使用此功能。
Google, for example, has a attendeesOmitted
flag that you can set to true
, then pass in the updated invitees on their normal event update endpoint. 举例来说,Google拥有一个
attendeesOmitted
标志,您可以将其设置为true
,然后在其正常事件更新端点上传递更新后的被邀请者。
I don't see any of this functionality on Office 365's API, though. 不过,我在Office 365的API上看不到任何此功能。 I have tried the following code to update invitations, but it has no effect on the status of the user (though it does return a
200
success message): 我尝试了以下代码来更新邀请,但是它对用户的状态没有影响(尽管它确实返回了
200
成功消息):
NSMutableDictionary *params = [ActivityCommon parametersFromEvent:event type:service dateOnly:TRUE]; //Don't need all params
[params setObject:@[@{@"EmailAddress": @{@"Name": invitee[@"Name"],
@"Address": invitee[@"Email"]},
@"Status": @{@"Response": @"Accepted"},
@"Type": @"Required"}] forKey:@"Attendees"];
[networkMgr PATCH:[NSString stringWithFormat:@"events/%@", identifier] parameters:params success:nil failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"%@", operation.responseObject);
}];
Has anyone had any experience with this? 有没有人有这方面的经验? Any insights would be much appreciated!
任何见解将不胜感激!
The meeting invitation will show up as a Message
in the user's inbox. 会议邀请将作为
Message
显示在用户的收件箱中。 You would use the Mail API to access this. 您将使用Mail API来访问它。 For the most part it looks like a normal email, but it has a few extra properties.
在大多数情况下,它看起来像一封普通的电子邮件,但是它具有一些额外的属性。
"MeetingMessageType": "MeetingRequest",
"Event@odata.navigationLink": "https://outlook.office365.com/api/v1.0/Users('user@domain.com')/Events('AAMkADRm...')"
By using the value of the Event@odata.navigationLink
property, you can access the corresponding Event on the user's calendar using the Calendar API. 通过使用
Event@odata.navigationLink
属性的值,可以使用Calendar API访问用户日历上的相应Event。
On the Event, you can use the Accept
, Decline
, or TentativelyAccept
actions. 在事件上,您可以使用
Accept
, Decline
或TentativelyAccept
操作。 (See https://outlook.office365.com/api/v1.0/ $metadata for the full declaration). (有关完整的声明,请参见https://outlook.office365.com/api/v1.0/ $ metadata)。
So for example, if you want to accept the meeting invite, you would do something like: 因此,例如,如果您想接受会议邀请,则可以执行以下操作:
POST /Me/Events('AAMkADRm...')/Accept
{
"Comment": "I will be there!",
"SendResponse": true
}
The organizer gets the acceptance message with the text "I will be there!". 组织者收到带有“我会在那里!”文本的接受消息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.