Net::Google::Calendar - programmatic access to Google's Calendar API
my $cal = Net::Google::Calendar->new( url => $url ); $cal->login($u, $p); for ($cal->get_events()) { print $_->title."\n"; print $_->content->body."\n*****\n\n"; } my $entry = Net::Google::Calendar::Entry->new(); $entry->title($title); $entry->content("My content"); $entry->location('London, England'); $entry->transparency('transparent'); $entry->status('confirmed'); $entry->when(DateTime->now, DateTime->now() + DateTime::Duration->new( hours => 6 ) ); my $author = Net::Google::Calendar::Person->new( Version => '1.0' ); $author->name('Foo Bar'); $author->email('foo@bar.com'); $entry->author($author); my $tmp = $cal->add_entry($entry); die "Couldn't add event: $@\n" unless defined $tmp; print "Events=".scalar($cal->get_events())."\n"; $tmp->content('Updated'); $cal->update_entry($tmp) || die "Couldn't update ".$tmp->id.": $@\n"; $cal->delete_entry($tmp) || die "Couldn't delete ".$tmp->id.": $@\n";
Interact with Google's new calendar.
Create a new instance. opts is a hash which must contain your private Google url.
See
http://code.google.com/apis/gdata/calendar.html#find_feed_url
for how to get that.
Login to google.
Return a list of Net::Google::Calendar::Entry objects;
Create a new entry.
Delete a given entry.
Update a given entry.
This is ALPHA level software.
Don't use it. Ever. Or something.
Abstract this out to Net::Google::Data
Simon Wistow <simon@thegestalt.org>
Copyright Simon Wistow, 2006
Distributed under the same terms as Perl itself.
http://code.google.com/apis/gdata/calendar.html
To install Net::Google::Calendar, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Google::Calendar
CPAN shell
perl -MCPAN -e shell install Net::Google::Calendar
For more information on module installation, please visit the detailed CPAN module installation guide.