I would not use link[0] = use AlternateUri instead (from top of my head)... the order of the links is not guaranteed. Frank Mantek Google
On Thu, Jul 10, 2008 at 3:43 AM, slishnevsky <[EMAIL PROTECTED]> wrote: > > Thank you! > > calendarEntry.Links[0].AbsoluteUri is the one that works. > > On Jul 9, 11:49 am, "Austin (Google)" <[EMAIL PROTECTED]> wrote: > > Yes, Frank is correct. The alternate URL, which looks like this - > > > > <atom:link rel="alternate" type="application/atom+xml" > > href=" > http://www.google.com/calendar/feed/0lhe47j4cgh6jrkkfm0n8shjeo%40grou... > > "/> > > > > This elements contains the event feed URL for this calendar. > > > > Hope it helps, > > Austin > > > > On Wed, Jul 9, 2008 at 6:45 AM, Frank Mantek <[EMAIL PROTECTED]> wrote: > > > > > If you use the value of the Edit URI, you are using the URI that is > > > supposed to be used to UPDATE/DELETE that particular entry in the feed > > > of calendars. > > > > > If i am not mistaken (top of my head), you are supposed to use the > > > alternate link to get the URI for that calendar. > > > > > Regards > > > > > Frank Mantek > > > Google > > > On Jul 8, 2008, at 8:52 PM, slishnevsky wrote: > > > > > > Hello everyone! I am using .NET library to get all events from all my > > > > calendars. I get calendars just fine. But when I try to create > > > > EventFeed for each calendar, it fails. Please take a minute to look > at > > > > this simple code and tell me what could be wrong. Thanks in advance. > > > > > > ================================================================ > > > > > > CalendarService service = new CalendarService("Calendar"); > > > > service.setUserCredentials("myusername", "mypassword"); > > > > > > // Retrieving all calendars > > > > CalendarQuery calendarQuery = new CalendarQuery("http:// > > > >www.google.com/ > > > > calendar/feeds/default/allcalendars/full"); > > > > CalendarFeed calendarFeed = service.Query(calendarQuery); > > > > > > // Retrieve events for each calendar > > > > foreach (CalendarEntry calendarEntry in calendarFeed.Entries) { > > > > > > // MY QUESTION IS HERE: > > > > // How to get THE RIGHT URL for each calendar, so that I can > > > retrieve > > > > events from it? > > > > // The address below will result in exception further in code > (see > > > > below...) > > > > var address = calendarEntry.EditUri.Content; > > > > > > EventQuery eventQuery = new EventQuery(address); > > > > > > // Starting from today, I need 10 upcoming events max > > > > eventQuery.FutureEvents = true; > > > > eventQuery.SingleEvents = true; > > > > eventQuery.NumberToRetrieve = 10; > > > > > > // FAILS HERE WITH THIS EXCEPTION: > > > > // Execution of request failed: > > > > > > http://www.google.com/calendar/feeds/default/allcalendars/full/[EMAIL > PROTECTED]&futureevents=true&singleevents=true > > > > EventFeed eventFeed = service.Query(eventQuery); > > > > foreach (EventEntry eventEntry in eventFeed.Entries) { > > > > > > // Retrieving events information here... > > > > > > } > > > > } > > > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
