Subject: | Patch to allow attendees, fix recurring events |
Hello,
I'm using Net::Google::Calendar for a project of mine, and it's very
handy. Thanks!
I had a bit of trouble getting it to work with recurring events, and
also needed access to information about the attendees of a meeting.
This patch fixes the problems I had with recurring events, and adds a
"who" method to get the attendees of a meeting.
Thanks!
Subject: | Net-Google-Calendar-0.8-sg.patch |
Only in Net-Google-Calendar-0.8-sg/: blib
diff -ur Net-Google-Calendar-0.8/lib/Net/Google/Calendar/Entry.pm Net-Google-Calendar-0.8-sg/lib/Net/Google/Calendar/Entry.pm
--- Net-Google-Calendar-0.8/lib/Net/Google/Calendar/Entry.pm 2007-04-16 03:20:11.000000000 -0400
+++ Net-Google-Calendar-0.8-sg/lib/Net/Google/Calendar/Entry.pm 2007-04-26 23:35:49.000000000 -0400
@@ -5,7 +5,7 @@
use DateTime;
use XML::Atom;
use XML::Atom::Entry;
-use XML::Atom::Util qw( set_ns first nodelist iso2dt);
+use XML::Atom::Util qw( set_ns first nodelist childlist iso2dt);
use base qw(XML::Atom::Entry);
@@ -180,7 +180,7 @@
my $obj = shift;
my($ns, $name) = @_;
my $ns_uri = ref($ns) eq 'XML::Atom::Namespace' ? $ns->{uri} : $ns;
- my @node = nodelist($obj->elem, $ns_uri, $name);
+ my @node = childlist($obj->elem, $ns_uri, $name);
return @node;
}
@@ -242,6 +242,33 @@
}
+
+=head2 who
+
+Get the list of event invitees.
+
+***NOTE: Setting functionality is not yet implemented.
+
+Returns a list containing zero or more XML::Atom::Person objects.
+
+
+=cut
+
+sub who {
+ my $self = shift;
+
+ if (@_) {
+ die "Setting of who not yet implemented\n";
+ }
+ my @who = map {
+ my $person = XML::Atom::Person->new();
+ $person->email($_->getAttribute("email"));
+ $person->name($_->getAttribute("valueString"));
+ $person;
+ } $self->_my_getlist($self->{_gd_ns},'who');
+}
+
+
=head2 edit_url
Return the edit url of this event.
@@ -325,6 +352,8 @@
eval {
require Data::ICal;
Data::ICal->import;
+ require Data::ICal::Entry::Event;
+ Data::ICal::Entry::Event->import;
};
if ($@) {
$@ = "Couldn't load Data::ICal";
@@ -347,10 +376,9 @@
return undef unless defined $string;
$string =~ s!\n+$!!g;
$string = "BEGIN:VEVENT\n${string}\nEND:VEVENT";
- my $vfile = Text::vFile::asData->parse_lines( split(/\n/, $string) );
+ my $vfile = Text::vFile::asData->new->parse_lines( split(/\n/, $string) );
my $event = Data::ICal::Entry::Event->new();
-
$event->parse_object($vfile->{objects}->[0]);
return $event->{entries}->[0];
Only in Net-Google-Calendar-0.8-sg/lib/Net/Google/Calendar: Entry.pm.orig
diff -ur Net-Google-Calendar-0.8/lib/Net/Google/Calendar.pm Net-Google-Calendar-0.8-sg/lib/Net/Google/Calendar.pm
--- Net-Google-Calendar-0.8/lib/Net/Google/Calendar.pm 2007-04-16 03:20:11.000000000 -0400
+++ Net-Google-Calendar-0.8-sg/lib/Net/Google/Calendar.pm 2007-04-26 23:35:49.000000000 -0400
@@ -460,7 +460,7 @@
$url->path("$path");
}
- $url->query_form(\%opts);
+ $url->query_form(%opts);
my %params = $self->_auth_params;
my $r = $self->{_ua}->get("$url", %params);
Only in Net-Google-Calendar-0.8-sg/lib/Net/Google: Calendar.pm.orig
Only in Net-Google-Calendar-0.8-sg/: Makefile
Only in Net-Google-Calendar-0.8-sg/: pm_to_blib