NAME

Net::Google::Calendar - programmatic access to Google's Calendar API

SYNOPSIS

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";

DESCRIPTION

Interact with Google's new calendar.

METHODS

new <opts>

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 <username> <password>

Login to google.

get_events

Return a list of Net::Google::Calendar::Entry objects;

add_entry <Net::Google::Calendar::Entry>

Create a new entry.

delete_entry <Net::Google::Calendar::Entry>

Delete a given entry.

update_entry <Net::Google::Calendar::Entry>

Update a given entry.

WARNING

This is ALPHA level software.

Don't use it. Ever. Or something.

TODO

Abstract this out to Net::Google::Data

AUTHOR

Simon Wistow <simon@thegestalt.org>

COPYRIGHT

Copyright Simon Wistow, 2006

Distributed under the same terms as Perl itself.

SEE ALSO

http://code.google.com/apis/gdata/calendar.html