我似乎无法获得用于添加要订阅并且对用户可见的日历的颜色设置。我正在设置foregroundColor和backgroundColor的值以及将colorRgbFormat设置为true,但无论我将颜色设置为什么,用户显示中的颜色总是呈蓝色。
calendarList = api.calendar_list.insert.request_schema.new({
'id' => <calendar id>,
'hidden' => false,
'selected' => true,
'colorRgbFormat' => true,
'backgroundColor' => '#ffff00,
'foregroundColor' => '#000000'
})
result = client.execute(
:api_method => api.calendar_list.insert,
:body_object => calendarList
)
答案 0 :(得分:2)
calendarList = api.calendar_list.insert.request_schema.new({
'id' => cal_id,
'hidden' => false,
'selected' => true,
'backgroundColor' => cal_color,
'foregroundColor' => '#000000'
})
result = client.execute(
:api_method => api.calendar_list.insert,
:body_object => calendarList,
:parameters => {'colorRgbFormat' => true,}
)