On Wed, Nov 5, 2008 at 11:21 AM, New2Cal <[EMAIL PROTECTED]> wrote:
>
> I am trying to use the Zend framework components for Google Calendar
> for PHP ...
>
> I have a function in my own minimal google_calendar class called
> init_calendar_map that is intended to create a PHP array that maps
> calendar names to URIs:
>
>  private function init_calendar_map() {
>    $calFeed = $this->gdatacal->getCalendarListFeed();
>    foreach ($calFeed as $calendar) {
>      $title = $calendar->title->text;
>      $uri = $calendar->id->text;
>      $this->calendar_map[$title] = $uri;
>    }
>  }
>
> For the default calendar, the URI is just fine, but for any other
> calendars that I have created, the URI that I get back is:
>
> http://www.google.com/calendar/feeds/default/my_cal_id%40group.calendar.google.com
>
> ... but I can't insert to this URI -- I have to use the URI without
> the "/default/":
>
> http://www.google.com/calendar/feeds/my_cal_id%40group.calendar.google.com
>
> ... and that works.
>
> But then why is "id" adding the "/default/" to begin with?
>
> I have spent a lot of time searching this list, and other google lists
> and can't seem to find an answer.
>
> Thanks for any assistance..

The value of the ID element is referring to the calendar's metadata,
not the calendar's event feed. That URL is used to change things such
as the calendar's name.

Instead, you want the value of the <link rel="alternate"> element's
href attribute. You can obtain this by accessing
$calendar->alternateLink->href.

-- 
Trevor Johns

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to