Google api 由文本创建的google日历更改事件
我正在使用google api php客户端库在我的一个日历中创建事件,其他用户也共享该事件,问题是我无法更改事件详细信息中的“创建人”字段,是否可以更改该文本?请查看我的附加屏幕截图了解更多信息 第二个问题是通知不起作用,当谷歌日历中创建的新事件未向用户发送通知时,是否有任何其他设置或我应该在api参数中更改Google api 由文本创建的google日历更改事件,google-api,google-calendar-api,google-api-php-client,Google Api,Google Calendar Api,Google Api Php Client,我正在使用google api php客户端库在我的一个日历中创建事件,其他用户也共享该事件,问题是我无法更改事件详细信息中的“创建人”字段,是否可以更改该文本?请查看我的附加屏幕截图了解更多信息 第二个问题是通知不起作用,当谷歌日历中创建的新事件未向用户发送通知时,是否有任何其他设置或我应该在api参数中更改 $objCalendar = new \Helper\GoogleCalendar(); $colorid = 8; if($item->
$objCalendar = new \Helper\GoogleCalendar();
$colorid = 8;
if($item->status == 'Pending'){
$colorid = 6;
}elseif($item->status == 'Working'){
$colorid = 9;
}elseif($item->status == 'Completed'){
$colorid = 10;
}
$event = array(
//'params'=>array('sendNotifications'=>true),
'sendNotifications'=>true,
'summary' => $item->subject,
'description' => $item->comment,
'colorId' => $colorid,
'start' => array(
'date' => $item->due_date
),
'end' => array(
'date' => $item->due_date
),
'attendees' => $admin_user_emails,
'reminders' => array(
'useDefault' => FALSE,
'overrides' => array(
array('method' => 'email', 'minutes' => 24 * 60),
array('method' => 'popup', 'minutes' => 10),
),
),
);
$objCalendar->addEvent($event);
Helper/GoogleCalendar.php
function add_event($e){
$calName = 'xyz@group.calendar.google.com';
$event = new Google_Service_Calendar_Event($e);
$optParams = array('sendNotifications' => true);
$createdEvent = $service->events->insert($calName, $event);
$service->events->patch($calName ,$createdEvent->getId(), $event, $optParams );
}
嗨,谢谢你的回复。。你能告诉我如何设置用户的电子邮件在创建时插入功能调用?