about processes and engines

something about gcal

I had a request for creating events in Google Calendar from some business processes. It gave me the opportunity to play with Google Data; it wasn’t too difficult, especially since it’s based on Atom and AtomPub.

I have thus started working on a new rufus library. It’s very limited for now, but I can have code that looks like that :

require 'rubygems'
require 'rufus/gcal'

calendars = Rufus::Google::Calendar.get_calendars(
  :account => ENV['GUSER'],
  :password => ENV['GPASS'])

#calendars.values.each { |c| p [, c.href ] }

cal = calendars['gwork']

id = cal.post_quick!(
  'Tennis with John November 13 3pm-4:30pm') => 'tennis').each do |e|
  puts e.to_s

Behind the scenes, it relies heavily on the fine atom-tools gem by Brendan Taylor.

The only authentication mechanism used is the ClientLogin. For the other mechanisms, one can look at gdata-ruby.

My next step will be to polish the Event class and to allow for manipulation of Calendar resources. Then I will take a look at other Google Data APIs.

source :
mailing-list :

Written by John Mettraux

November 13, 2008 at 12:07 am

Posted in atom, atompub, google, ruby, workflow

2 Responses

Subscribe to comments with RSS.

  1. Hi,

    thanks for sharing. I think I will use it in the next couple of months to automate my invoices generation (I write down the days I work and for which customer in a google calendar).


    Thibaut Barrère

    November 19, 2008 at 3:14 pm

  2. Hi Thibaut,

    thanks for your interest, bug reports and forks are welcome.


    John Mettraux

    November 19, 2008 at 11:07 pm

Comments are closed.

%d bloggers like this: