2013-10-03 28 views
0

我似乎無法獲取用於添加要訂閱的日曆的顏色設置,並且用戶可以看到該顏色設置。我爲foregroundColor和backgroundColor設置了值,並將colorRgbFormat設置爲true,但無論我將顏色設置爲何種顏色,該顏色在用戶的顯示中始終呈藍色。Google CalendarList API顏色

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 
) 

回答

1

今天我很好地回答了我自己的問題。 colorRgbFormat實際上是一個參數,因此呼叫應該是:

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,} 
) 
相關問題