我想向Google日历事件添加一组extendedProperties。我希望这些属性中的一些是列表。As(在python中)
event = {
..., # standard properties
"extendedProperties": {
"shared": {
"max_crew": 3,
"crew_list": [
"crew1@example.com",
"crew2@example.com",
],
}
}
...
}
这将创建max_crew属性,而不是crew_list属性。在
有办法吗?还是需要使用可解析字符串(最多1024个字符)?在
有一种方法:explained in Google Calendar's guide和{a2}。在
在Python中,首先为您的额外字段创建一个字典。
body = { "extendedProperties": { "private": { "petsAllowed": "yes" } } }
然后用:
service.events().patch(calendarId='calendar_id', eventId='event_id', body=body).execute()
如果成功,它将返回更新的事件。在
Hybor证实了我的观察:接口不支持列表作为值。目光短浅,伊荷,但事实的确如此。在
相关问题 更多 >
编程相关推荐