processi

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.name, c.href ] }

cal = calendars['gwork']

id = cal.post_quick!(
  'Tennis with John November 13 3pm-4:30pm')

cal.events(:q => 'tennis').each do |e|
  puts
  puts e.to_s
end

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 : http://github.com/jmettraux/rufus-google
mailing-list : http://groups.google.com/group/rufus-ruby

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).

    thanks!

    Thibaut Barrère

    November 19, 2008 at 3:14 pm

  2. Hi Thibaut,

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

    Cheers,

    http://rubyforge.org/tracker/?group_id=4812&atid=18584

    John Mettraux

    November 19, 2008 at 11:07 pm


Comments are closed.

%d bloggers like this: