http://www.perlmonks.org?node_id=811611

leocharre has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to access google calendars via the command line. I just want a list of events spat out.

I'm trying out Net::Google::Calendar with not much success. The documentation is creepy- the module has good reviews and it seems a lot of work was put into it.

use Net::Google::Calendar; use Smart::Comments '###'; my $c = Net::Google::Calendar->new; $c->login( $username, $password ); my @calendars = $c->get_calendars; # great, this works- it returns a 5 element list # this next line however.. my @e = $c->get_events; warn "ecount ".@e; ### @e for my $cal (@calendars){ printf "title %s, id %s\n", $cal->title, $cal->id; my @e = $cal->get_events; for (@e){ printf "event %s %s\n", $_->title, $_->content->body; } }

Im trying to get a list of events..

If I don't try to get_events() from the main calendar object created, it goes on fine to list title and id (private url) of each calendar.

As it is.. I get an error when I call get_events() 400 Bad Request at /usr/lib/perl5/site_perl/5.8.8/Net/Google/Calendar.pm line 577.

and then..

Argh.. anyhow.. I figure I must be using the interface wrong- Anyone know how to use the Net::Google::Calendar API?