var credentials = new GDataCredentials(userName, password); var service = new CalendarService(null) {Credentials = credentials}; var query = new CalendarQuery("https://www.google.com/calendar/feeds/default/owncalendars/full"); var feed = service.Query(query); var eventFeedLink = feed.Entries.Cast<CalendarEntry>() .Where(item => item.Title.Text == calendarName) .SelectMany(item => item.Links) .First(link => link.Rel == GDataParserNameTable.NSGCal + "#eventFeed"); var entry = new EventEntry(title) {Times = {new When(start, end, allDay)}}; service.Insert(new Uri(eventFeedLink.AbsoluteUri), entry);Google Data API .NET client library
Friday, February 10, 2012
Create a Google calendar event in an existing calendar
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment