Gdata の例外処理 †
デフォルト以外のカレンダー指定 †
- カレンダーIDの取得
$gdataCal = new Zend_Gdata_Calendar($client);
$calFeed = $gdataCal->getCalendarListFeed();
echo "<h1>" . $calFeed->title->text . "</h1>\n";
echo "<ul>\n";
foreach ($calFeed as $calendar) {
preg_match("/\/([^\/]+)$/i",$calendar->id->text,$match);
echo $calendar->title->text . "のカレンダーID:" . $match[1] . "<br />\n";
}
echo "</ul>\n"
- カレンダーIDを指定して取得
$query = $service->newEventQuery();
$query->setUser(カレンダーID);
Google Calenderの操作 †
- 環境。CentOS5.4, PHP5.1.6でもエラー無く動いた。INSTALL.txtには5.2.4以上って書いてあるけど。
- ブラウザでCalendar.phpを開いた場合、 processPageLoad();が実行され、カレンダー一覧を取得する
- コンソール両対応の模様
$ wget http://framework.zend.com/releases/ZendGdata-1.10.1/ZendGdata-1.10.1.zip
$ unzip ZendGdata-1.10.1.zip
$ cd ZendGdata-1.10.1/demos/Zend/Gdata/
$ vi Calendar.php
----
ini_set('include_path', ini_get('include_path') . ':/path/to/ZendGdata-1.10.1/library');
----
$ php -q Calendar.php
Usage: php Calendar.php <action> [<username>] [<password>] [<arg1> <arg2> ...]
Possible action values include:
outputCalendar
outputCalendarMagicCookie
outputCalendarByDateRange
outputCalendarByFullTextQuery
outputCalendarList
updateEvent
deleteEventById
deleteEventByUrl
createEvent
createQuickAddEvent
createWebContentEvent
createRecurringEvent
setReminder
addExtendedProperty
|
|