【发布时间】:2019-04-29 15:40:04
【问题描述】:
我正在尝试在我的 Google 日历中插入一个新活动。插入时,我想更改事件的颜色,因为它出现在 Google 日历上。 我到目前为止是这样的:
$event = new Google_Service_Calendar_Event(array(
'start' => array(
'dateTime' => '2018-09-14T00:00:00-07:00',
'timeZone' => 'America/New_York'
),
'end' => array(
'dateTime' => '2018-09-21T23:59:59-07:00',
'timeZone' => 'America/New_York'
),
'backgroundColor' => "#C1292E"
));
$parameter = array ('colorRgbFormat' => true);
$calendarId = 'someemail@gmail.com';
$event = $service->events->insert($calendarId, $event, $parameter);
如果您想设置颜色,文档中说将 colorRgbFormat 设置为 true:https://developers.google.com/calendar/v3/reference/calendarList/insert#examples
问题是,我设置它的方式是错误的。
如果我想更改插入事件的颜色,如何在 php 中将 colorRgbFormat 设置为参数?
【问题讨论】:
-
这个链接可能对你有帮助link