我正在使用谷歌日历 API v3 来显示我的谷歌日历中的公共事件。
这是一段代码
require_once 'google-api-php-client-read-only/src/Google_Client.php';
require_once 'google-api-php-client-read-only/src/contrib/Google_CalendarService.php';
session_start();
$client = new Google_Client();
$client->setApplicationName("Calendar API Project");
$client->setDeveloperKey('xxxxxxxxxxxxxxx');
$service = new Google_CalendarService($client);
$events = $service->events->listEvents('u8v19163rlkb6qkhpj3e0ag2g0@group.calendar.google.com',array('maxResults'=>15));
$event = $service->events->get('u8v19163rlkb6qkhpj3e0ag2g0@group.calendar.google.com', $id);
$events = $events['items'];
foreach($events as $key=>$val){
$events[] = $service->events->get('u8v19163rlkb6qkhpj3e0ag2g0@group.calendar.google.com', $val['id']);
}
问题是我正在获取与事件相关的所有信息,事件颜色除外。
请帮忙。