views:

20

answers:

1

Hello

I'm hoping this will be relatively easy to someone who is familiar with the Google Calendar API, have done some searching but the API isn't giving me the answer!

Imagine that a Google Account has 3 calendars, all created by that user.

I'm trying to get events from a SPECIFIC calendar of that user, using the .NET Google API, as follows:

    Calendar.userName = CalendarUserName;
    Calendar.userPassword = CalendarPassword;
    Calendar.feedUri = "https://www.google.com/calendar/feeds/default/private/full";

What that gives me is the feed of ALL events from ALL calendars, which is all very well, but then I need to parse them (presumably there is a way to identify but I don't know that either).

What would be ideal is for me to be able to cherry-pick and ask for a particular calendar, and only get the events from that one.

Is that possible? Is it only possible using the magic-cookie request?

Thanks Duncan

+1  A: 

Have you read this one?

http://code.google.com/apis/calendar/data/2.0/reference.html#Event_feeds

And this one?

http://code.google.com/apis/calendar/data/2.0/developers_guide_dotnet.html#RetrievingEvents

This is the key part to understand it I think:

Note: Some of these code snippets show adding an event to a default calendar or to a specific user's primary calendar (substituting a gmail address for the 'default' string in the POST URI), but events can also be added to non-primary calendars as well. To do this, you simply need the calendar ID which can be retrieved from the allcalendars feed, and is also shown in the Calendar Settings page of the UI. This id is again used in the feed URI: https://www.google.com/calendar/feeds/id/private/full.

http://code.google.com/apis/calendar/data/2.0/developers_guide_dotnet.html#RetrievingCalendars

Leniel Macaferi
So the feed that I request should be: https://www.google.com/calendar/feeds/<magicid>/private/full ? My understanding was that the magic cookie would be in the private section above....hmmm, still a bit confused! Anyway, I think I will just use the magic cookie version as that will get me the calendar I want.
Duncan