martedì 30 ottobre 2012

C# Google API - Delete Calendar Event

The following code shows how to delete a calendar event

private void DeleteEvent()
            EventQuery query = new EventQuery();
            CalendarService service = new CalendarService("appName");

            service.setUserCredentials("", "yourPassword");
                     // to get the Uru of the calendar event/feed go to:
                 // C# Google API - Retrieve All Calendar Feeds
            query.Uri = new Uri("the Uri of the event you want to delete");

            EventFeed calFeed = service.Query(query) as EventFeed;
            AtomEntryCollection ee = calFeed.Entries;

            EventEntry ev = ee[0] as EventEntry;
            // delete ok

** I want to remeber to go here to get  Application-specific password

My Two Cents...

Nessun commento:

Posta un commento