Hello all,
I am developing an application where the user can export the event
details to the google calendar. I have used google calendar javascript
api,
but I am not get the end results finding few errors and am not able to
export events to the google calendar. I have placed all the functions
like error handling, logMeIn(), logMeOut(), myServices in a .js file
and retrieving those functions inside a function called init_it(), and
I have called all the create single event function inside another
function called AddEvent();.
function init_it() {
google.load("gdata", "2");
google.setOnLoadCallback(getMyFeed);
setupMyService();
getMyFeed();
}
function Addevent() {
var calendarService = new
google.gdata.calendar.CalendarService('GoogleInc-jsguide-1.0');
var feedUri = 'http://www.google.com/calendar/feeds/default/private/
full';
var entry = new google.gdata.calendar.CalendarEventEntry();
entry.setTitle(google.gdata.Text.create('JS-Client: insert event'));
var when = new google.gdata.When();
var startTime =
google.gdata.DateTime.fromIso8601("2008-02-10T09:00:00.000-08:00");
var endTime =
google.gdata.DateTime.fromIso8601("2008-02-10T10:00:00.000-08:00");
when.setStartTime(startTime);
when.setEndTime(endTime);
// Add the When object to the event
entry.addTime(when);
// The callback method that will be called after a successful
insertion from insertEntry()
var callback = function(result) {
PRINT('event created!');
}
// Error handler will be invoked if there is an error from
insertEntry()
var handleError = function(error) {
PRINT(error);
}
though I am fighting to run the initial example specified by google it
self, since I am new to google api's, I am not able to figure it out.
Kindly help me out.
--
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