Google日历扩展属性可以列出吗?

时间:2017-04-27 21:33:13

标签: python google-calendar-api

我想将一组extendedProperties添加到Google Calendar事件中。我想要一些属性列表。 As(在python中),

event = {
         ..., # standard properties
         "extendedProperties": {
                "shared": {
                    "max_crew": 3,
                    "crew_list": [
                        "crew1@example.com",
                        "crew2@example.com",
                        ],
                }
            }
           ...
         }

这会创建max_crew属性,但不会创建crew_list属性。

有什么办法吗?或者我是否需要使用可解析的字符串(最多1024个字符)?

2 个答案:

答案 0 :(得分:0)

有一种方法:explained in Google Calendar's guidereference

在Python中,首先为额外的字段创建一个字典。
body = { "extendedProperties": { "private": { "petsAllowed": "yes" } } }

然后提出请求:
service.events().patch(calendarId='calendar_id', eventId='event_id', body=body).execute()

如果成功,它将返回更新的事件。

答案 1 :(得分:0)

Hybor证实了我的观察,即界面不支持列表作为值。短视,imho,但它是如此。