*Hi everyone
I am trying to get calendar feed uri for private calendar via .NET api. What
I'm trying at the moment is:
To get calendar URI by calendar title like follows*
public string getCalendarURIbyTitle(string calendarTitle)
{
CalendarQuery query = new
CalendarQuery("https://www.google.com/calendar/feeds/default/owncalendars/full");
CalendarFeed calendars = (CalendarFeed)service.Query(query);
foreach (CalendarEntry calendar in calendars.Entries) {
if (calendar.Title.Text == calendarTitle) {
return calendar.EditUri.ToString();
}
}
return null;
}
*I also tried returning following values:*
//return calendar.Feed.Id.Uri.Content;
//return calendar.Id.Uri.Content;
//return calendar.Feed.Id.Uri.Content;
//return calendar.Feed.Id.AbsoluteUri;
//return calendar.Id.Uri.Content;
//return calendar.Id.AbsoluteUri;
//return calendar.EditUri.Content;
//return calendar.Feed.Id.Uri.Content;
*and no matter which I return, when I try to get the feed in my other
function based on returned 'calendarUri':*
public void manageEvenets(string calendarUri)
{
EventQuery query = new EventQuery(calendarUri);
EventFeed feed = service.Query(query);
foreach (EventEntry entry in feed.Entries) {
entry.Id = new AtomId(entry.EditUri.ToString());
// rest of the the code goes here...
}
}
*I either get 'feed = null' or "Bad request" exception(depends on which
returned URI I use). The only way I could get right feeds is to copy and
paste private calendar XML address from calendar settings tab **but then
again when I iterate over feed.Entries entry.EditUri is null(it is not null
when I provide https://www.google.com/calendar/feeds/default/private/full as
calendarUri to work with my default calendar private events .*
*Just to summarize:
1) Is there a way to get private calendar Uri from CalendarEntry via .NET
calendar API so I could get private feed?
2) Why entry.EditUri is null and is there a way to get right value(I need it
later for batch updates)?
If you know solution to any of these issues or see I am doing something
wrong and could point me in the right direction that would be greately
appricaited.
Thanks a lot
gxx
*
--
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