【发布时间】:2019-08-08 06:41:09
【问题描述】:
我可以创建单个 Outlook 日历事件,但是如何同时创建多个,有什么方法可以使用 Microsoft graph api?
我尝试将一系列事件传递给 api,抛出 JSON 错误
var event = {
"subject": "Let's go for lunch",
"body": {
"contentType": "HTML",
"content": "Does late morning work for you?"
},
"start": {
"dateTime": "2017-04-15T12:00:00",
"timeZone": "Pacific Standard Time"
},
"end": {
"dateTime": "2017-04-15T14:00:00",
"timeZone": "Pacific Standard Time"
},
"location": {
"displayName": "Harry's Bar"
},
"attendees": [{
"emailAddress": {
"address": "samanthab@contoso.onmicrosoft.com",
"name": "Samantha Booth"
},
"type": "required"
}]
}
client
.api('/me/events')
.post(event, (err, res) => {
console.log(res)
})
对于一个事件它正在工作,但我需要添加多个事件,比如下午 2 点到 3 点和下午 6 点到 7 点,因为循环消耗太多时间
【问题讨论】:
标签: javascript node.js outlook microsoft-graph-api outlook-restapi