Thank you. I really appreciate the effort you put in. The quiznight
xml is certainly a lot more complicated than I need.
I found the following code in the Google Calendar API:
/*
* Create a single event
*/
// Create the calendar service object
var calendarService = new
google.gdata.calendar.CalendarService('GoogleInc-jsguide-1.0');
// The default "private/full" feed is used to insert event to the
// primary calendar of the authenticated user
var feedUri = 'http://www.google.com/calendar/feeds/default/private/
full';
// Create an instance of CalendarEventEntry representing the new event
var entry = new google.gdata.calendar.CalendarEventEntry();
// Set the title of the event
entry.setTitle(google.gdata.Text.create('JS-Client: insert event'));
// Create a When object that will be attached to the event
var when = new google.gdata.When();
// Set the start and end time of the When object
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);
}
// Submit the request using the calendar service object
calendarService.insertEntry(feedUri, entry, callback,
handleError, google.gdata.calendar.CalendarEventEntry);
I understand how this works and I got it to add entries into my
calendar from the page it was hosted on. However, I am struggling to
get it working in my own gadget. Is there anyway you can show me how
this code can be put into my gadget within <SCRIPT></SCRIPT> tags.
Then, my preference is for this function to be run from a button
click. I saw in the quiznight.xml file how you did this but I am a
little lost :S
I do apologise if this is a little basic for you, but I have only
recently started studying gadgets and therefore, I am totally new to
the idea. I appreciate all the assistance you have been giving me.
Thank you
On Feb 10, 8:51 am, bickerdyke <[email protected]> wrote:
> I can show you my gadgets, but for a start, I guess
> thishttp://gadget-doc-examples.googlecode.com/svn/trunk/opensocial-gadget...
> example from google shows much better how to work with oauth-proxy
> from within an igoogle gadget.
>
> It fetches and shows your contacts, but to fetch a calendar, you'd
> only have to give that gadget your calendar feeds url instead of your
> contact feeds url.
>
> you can find more samples
> here:http://code.google.com/intl/de/apis/gdata/samples.html
>
> The actual adding of events is described
> here:http://code.google.com/intl/de/apis/calendar/data/2.0/developers_guid...
> but it is a description of a language independant protocol, so you
> should work through the other examples first to see how this protocol
> is handled in javascript.
>
> My own stuff:http://www.ullebambulle.de/gg/gravatars.xmlReads your contacts,
> the
> gravatar images and then fails miserably while trying to get the
> contact images from your contacts :-) (I'd apprecieate any help on
> that!)http://www.ullebambulle.de/gg/quiznight.xmlreads a calendar, lists
> upcomming events (sundays through tuesday), shows your events guests
> with their response status, and is (as far as I know) the only
> possible solution if you want to change your guests response status
> manually. (you need to fill in your calendar id and set "token" to
> "oauth" for that to work - else another, easier method of
> authentication is used which only gives read-only-access)
>
> Have fun!
>
> On 10 Feb., 02:41, jazKular <[email protected]> wrote:
>
> > On Feb 9, 4:43 pm, bickerdyke <[email protected]> wrote:
>
> > My gagdet is running inside the iGoogle-container.
>
> > > For a single event, yes. It's easy to program, the user gets a chance
> > > to check everything, perhaps enter a additional note or an extended
> > > title, and google would have handled all the access rights.
>
> > Is there anyway you can show me how this can be done via coding? Sorry
> > I am very new to this! =)
>
> > > I could show you my sample gadgets that use oauth for read and write
> > > access to the guest lists of events or that diaplays contact
> > > information from the users adressbook. (tahst based on the official
> > > oauth-proxa example) but as these were my first steps into that field,
> > > they are poorly documented.
>
> > I would be extremely grateful if you could show me that.
>
> > Thank you
--
You received this message because you are subscribed to the Google Groups
"iGoogle Developer Forum" 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-Gadgets-API?hl=en.