0
我一直在嘗試玩谷歌日曆api v3。我有日曆和事件列表沒有問題。但是,我正在嘗試獲取有關事件的某些數據。我有getSummary()
工作和猜測getLocation()
。GCAL APIv3事件啓動時間?
有誰知道如何調用事件的開始時間?這些功能是否列在我失蹤的任何地方?
if ($client->getAccessToken()) {
$calList = $cal->calendarList->listCalendarList();
//print "<h1>Calendar List</h1><pre>" . print_r($calList, true) . "</pre>";
$eventList = $cal->events->listEvents('[email protected]');
foreach($eventList->getItems()as $eventList){
print "Name: ";
echo $eventList->getSummary();
echo "<br/><br/>";
print "Start: ";
echo $eventList->getdateTime(); <--- doesnt work hahah
echo "<br/><br/><hr>";
}
}
嗨,我很感激你的迴應。我看到了那些文檔,但不知道如何調用JSON返回。我是一位設計師嘗試做一些原型。生病做一些谷歌搜索謝謝;) – andehlu
如果這解決了你的問題一定要把它標記爲最好的答案,以便其他人也可以找到它。 – dudewad
'code' $ obj = json_decode($ eventList); print $ obj - > {「summary」};'code' – andehlu