Hello Patrick,

Using a query as you did won't change the request feed URL which will
default to the user's default calendar. What you should do instead is:

  events = client.GetCalendarEventFeed(*
client.GetCalendarEventFeedUri(calendar=calendar_id)*)

I hope this helps!
Best,
Alain

On Thu, Aug 25, 2011 at 11:04 AM, Patrick C. <[email protected]>wrote:

> Hi all,
>
> So I know a lot of people have run into the issue of getting an event feed
> of a secondary calendar, and what seems to fix the problem is use the
> calendar ID plus the secret magic cookie in 'private-MAGICCOOKIE'. I am
> trying to avoid having to ask my user to go into the calendar settings to
> retrieve the cookie for me, after all isn't that the point of having an
> API?
>
>       client = gdata.calendar.client.CalendarClient(APP_NAME)
>       client.auth_token = gdata.gauth.ae_load('access_token')
>       calendars = client.GetOwnCalendarsFeed();
>       for i, c in enumerate(calendars.entry):
>         calendar_id = c.id.text # The [email protected] id
> number.
>         if calendar_id in desired_calendars:
>           query = gdata.calendar.client.CalendarEventQuery()
>           query.user = calendar_id
>           events = client.GetCalendarEventFeed(q=query)
>
> When I do this and loop through the returned events from my calendar, I get
> events for my default calendar (even though calendar_id I use is of a
> secondary calendar).
>
> Thanks for your help!
> -Patrick
>
> --
> 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://code.google.com/apis/calendar/community/forum.html
>



-- 
Alain Vongsouvanh

-- 
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://code.google.com/apis/calendar/community/forum.html

Reply via email to