On Sep 2, 2008, at 10:05 AM, JeHamish wrote:
> There is reference in the Protocol section of the Calendar API > Developer's Guide describing how to subscribe users to calendars > (found here: > http://code.google.com/apis/calendar/developers_guide_protocol.html#AddingSubscriptions > ) and the instructions on how to accomplish this using Python. I am > having a difficult time trying to implement this functionality within > the Zend framework or as a stand-alone solution. > > Any tips would be greatly appreciated; and if you know of a functional > solution already developed somewhere I will be in your debt. > > The long and short of it is; does anyone have an idea of how to post > the xml needed to add a calendar subscription using the Zend > Framework? This is untested code, but it should work. Basically, if you can add an event, you can add a calendar. Using the example at your referenced link, you pass the xml for adding an existing calendar and post it to the given url. The only tricky part is passing it the className so that returns you the correct object type. $gc = new Zend_Gdata_Calendar($client); $data = "<entry xmlns='http://www.w3.org/2005/Atom' ><id>c4o4i7m2lbamc4k26sc2vokh5g%40group.calendar.google.com</id></ entry>" $url = "http://www.google.com/calendar/feeds/default/allcalendars/full" $insertedCalendar = gc->insertEntry($data, $url, 'Zend_Gdata_Calendar_EventFeed') Ray -- Ray Baxter http://67central.com/bc --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Calendar Data API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-calendar-help-dataapi?hl=en -~----------~----~----~----~------~----~------~--~---
