开发者

Retrieving a Google Calendar Event with Zend_Gdata Library Using Event URL

I'm trying to retrieve a Google Calendar event using the Zend Gdata library.

When I create an event I store in my database the event URL returned by the insertevent method. Initially I thought I could just use this URL to then delete the event later on. After a little research I realized that you actually need a special URL which is the event URL with an extra string of numbers appended to it. I looked at the various event retrieval methods in the Zend Gdata library but none of them seem to allow you to just pass the event URL in. They all seem to want a text or date range query. H开发者_C百科ow would I go about retrieving the delete URL for an event whose URL I already know?


I ended up realizing that when you use the insertevent method you can query for the edit url by calling $createdEvent->getEditLink()->href; For example:

// ... All the code to connect to the calendar and create the event
$createdEvent = $gCal->insertEvent($newEvent);
$link_gcal = $createdEvent->getEditLink()->href;

Hopefully this helps someone else down the road. Enjoy!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜