5

Googleカレンダーアカウントから今後20日間のイベントのリストを表示しようとしています。腹立たしいほど繰り返されるイベントは表示されていません(開始時間が古いためだと思います)...そうです。何か案は?

require_once dirname(__FILE__).'/../../../Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata');
Zend_Loader::loadClass('Zend_Gdata_HttpClient');
Zend_Loader::loadClass('Zend_Gdata_Calendar');

$service = new Zend_Gdata_Calendar();

$query = $service->newEventQuery();
$query->setUser('REMOVED');
$query->setVisibility('public');
$query->setProjection('full');
$query->setOrderby('starttime');
$query->setSortOrder('ascending');
$query->setFutureevents('true');
$query->setMaxResults(20); 

try { $eventFeed = $service->getCalendarEventFeed($query); }
catch (Zend_Gdata_App_Exception $e) { return; }

私は、すべての公開イベントを昇順で取得する代替方法を喜んで受け入れます。RSSを試しましたが、日付はカレンダーに追加された時刻のようです。

4

2 に答える 2

1

これを変更する:

$query->setProjection('full');

これに:

$query->setProjection('composite');

定期的なイベントを含む、あらゆる種類の追加データを提供します。これは、Google Calendar APIリファレンスによるものです:http ://code.google.com/apis/calendar/docs/2.0/reference.html

于 2009-08-18T19:54:38.717 に答える