我正在通过Microsoft Graph创建一个新的日历事件。我正在尝试在图表日历事件中插入组织者信息
if organizer.get('email'):
log('email: ')
log(organizer.get('email', ''))
eventJson["organizer"] = {
"emailAddress": {
"address":str(organizer.get('email', ''))
}
}
日志:
2019-05-17T17:05:45.421475+00:00 app[web.1]: ERROR
2019-05-17T17:05:45.421493+00:00 app[web.1]: <Response [400]>
2019-05-17T17:05:45.421501+00:00 app[web.1]:
{
"error": {
"code": "BadRequest",
"message": "Property emailAddress in payload has a value that does not match schema.",
"innerError": {
"request-id": "xxxxxxxxxxxx",
"date": "2019-05-17T17:05:45"
}
}
}
我已经检查了organizer.get('email')
内容。此外,在其他一些事件中,同样的结构运作良好。我不知道架构期望什么。
这是我在文档中找到的示例
"organizer": {
"emailAddress": {
"name": "Megan Bowen",
"address": "MeganB@contoso.OnMicrosoft.com"
}
}