2013-10-03 8 views
0

캘린더를 추가하여 사용자를 구독하고 볼 수 있도록 색상 설정을 가져올 수 없습니다. 전 foregroundColor와 backgroundColor에 대한 값을 설정하고 colorRgbFormat을 true로 설정하지만 색상을 설정하는 것에 관계없이 색상이 항상 사용자의 디스플레이에 파란색으로 표시됩니다.Google 캘린더 목록 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,} 
)