Created
June 23, 2011 21:34
-
-
Save rcknr/1043690 to your computer and use it in GitHub Desktop.
Quick add event to Calendar using GData
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Set the feed URL | |
var EVENT_FEED_URL = 'http://www.google.com/calendar/feeds/default/private/full'; | |
// Create a calendar object | |
var calendarService = new google.gdata.calendar.CalendarEventEntry(); | |
// Create a new event handler | |
var quickEvent = new google.gdata.calendar.CalendarEventEntry(); | |
// Create a new property handler and set it to true | |
var quickAdd = new google.gdata.calendar.QuickAddProperty(); | |
quickAdd.setValue(true); | |
// Set a string from which quick event will be created | |
quickEvent.setContent(google.gdata.atom.Text.create('A meeting tomorrow at 18:00')); | |
// Attach the property to the event | |
quickEvent.setQuickAdd(quickAdd); | |
// Create the event | |
calendarService.insertEntry(EVENT_FEED_URL, quickEvent); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment