I'm trying to clear a calendar of all entries.  I've searched the forum and 
found two suggested methods.  I've tried both of them, but neither works.  I 
always get a com.google.gdata.util.ResourceNotFoundException thrown. Any 
suggestions?

Method one:

        URL calFeedUrlFull = new 
URL("https://www.google.com/calendar/feeds/"; + gUser + "/private/full");
        CalendarService calSrv = new CalendarService("my-calservice-1");
        calSrv.setUserCredentials(gUser, gPwd);
        resultFeed = calSrv.getFeed(calFeedUrlFull, 
CalendarEventFeed.class);

        List<CalendarEventEntry> entries = resultFeed.getEntries();
        int nEntries = entries.size();
        for (int i = 0; i < nEntries; i++) {
            CalendarEventEntry event = entries.get(i);
            event.delete();
        }


Method two:

        List<CalendarEventEntry> entries = resultFeed.getEntries();
        int nEntries = entries.size();
        for (int i = 0; i < nEntries; i++) {
            URL deleteUrl = new URL(entries.get(i).getEditLink().getHref());
            calSrv.delete(deleteUrl);            
        }


Thanks for any help.

-- 
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

Reply via email to