Hi, You are not using the Query object correctly. The Query object doesn't return result by itself, it is passed to a feed request method as an argument and you would use a callback method to iterate through the result set to look for the event that you are looking for. This is an example of how to do a feed query using the Query object -
// QUERY EVENT var searchText = 'test'; var feedUri = 'http://www.google.com/calendar/feeds/default/private/full'; var query = new google.gdata.calendar.CalendarEventQuery(feedUri); query.setFullTextQuery(searchText); var callback = function(root) { var entries = root.feed.getEntries(); for (var i=0;i<entries.length ;i++ ) { var entry = entries[i]; PRINT('event title: ' + entry.getTitle().getText()); } } calendarService.getEventsFeed( query, callback, handleError ); Austin On Feb 1, 2008 9:18 AM, warrenjb <[EMAIL PROTECTED]> wrote: > > I've made some progress in identifying the URI (I think). However I > must be doing something wrong when I execute the delete. Can anyone > help? > > var feedUrl = "http://www.google.com/calendar/feeds/default/private/ > full"; > function getMyFeed() { > myService = setupMyService(); > searchMyFeed(); > myService.getEventsFeed(feedUrl, insertIntoMyFeed); > } > function setupMyService() { > var myService = > new google.gdata.calendar.CalendarService('exampleCo- > exampleApp-1'); > return myService; > } > function searchMyFeed() { > var myQuery = new google.gdata.calendar.CalendarEventQuery(feedUrl); > myQuery.setFullTextQuery("Pat Id: " + pat); > myQuery.setParam('start-min', starttimex); > myQuery.setParam('start-max', starttimex); > var uri = myQuery.getUri(); > deleteMyEntry(uri); > } > function deleteMyEntry(myResultsFeedRoot) { > myResultsFeedRoot.deleteEntry(handleMyDeletedEntry); > } > function handleMyDeletedEntry() { > alert("Calendar Updating"); > } > > On Jan 31, 2:28 pm, warrenjb <[EMAIL PROTECTED]> wrote: > > I need to delete an event. I don't know the event id but I do know > > the title, location, description and start time (none of these are > > unique by themselves - only together do they create a unique event). > > It looks like I should be able to query the calendar based on these > > criteria and then delete the event but all I saw was a fulltextsearch > > and I'm not sure how that would help. What is the best way to find a > > specific event based on title, location, description and time and then > > delete it? By the way I'm using javascript. > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
