1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
use Cal::DAV; use Data::ICal; use Data::Dumper; my $url = "http://xxx.de/nextcloud/remote.php/dav/calendars/joe/personal/"; my $user = "joe"; my $pass = "XXX"; open FH, ">DEBUG.txt" or die ("Fehler beim schreiben $!"); my $cal = Cal::DAV->new( user => $user, pass => $pass, url => $url); print $cal->parse(filename => "personal.ics"); $cal->add_entry(make_entry()); $cal->save; my $dav = $cal->dav; print FH Dumper($cal); print FH Dumper($dav); print "message:".$cal->message; print "error:".$cal->errors; sub make_entry { my $d = Data::ICal->new( filename => 'personal2.ics' ); return $d->entries->[0]; }
1
2
3
4
5
6
7
8
9
Fatal webdav Sabre\DAV\Exception\Conflict: HTTP/1.1 409 PUT is not allowed on non-files.
[internal function] Sabre\DAV\CorePlugin->httpPut(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
/www/htdocs/w00c1c26/domains/cloud/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Array, Array)
/www/htdocs/w00c1c26/domains/cloud/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 479: Sabre\Event\EventEmitter->emit('method PUT', Array)
/www/htdocs/w00c1c26/domains/cloud/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
/www/htdocs/w00c1c26/domains/cloud/nextcloud/apps/dav/lib/Server.php - line 227: Sabre\DAV\Server->exec()
/www/htdocs/w00c1c26/domains/cloud/nextcloud/apps/dav/appinfo/v2/remote.php - line 30: OCA\DAV\Server->exec()
/www/htdocs/w00c1c26/domains/cloud/nextcloud/remote.php - line 165: require_once('/www/htdocs/w00...')
{main}
HTTP::DAV::DebugLevel(3);
1 2 3 4 5 6 7 8 9 10 11 12 13 14
use Net::Google::Calendar; use Data::Dumper; my $username = 'MEINE_EMAIL_BEI_GOOGLE'; my $password = 'MEIN_PASSWORT_FUER_GOOGLE'; my $cal = Net::Google::Calendar->new; $cal->login($username, $password); my @calendars = $cal->get_calendars; foreach(@calendars){ print Dumper $_."\n-----------------------------\n"; }
403 Forbidden at /usr/local/share/perl/5.20.2/Net/Google/Calendar.pm line 629, <DATA> line 1.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
sub get_feed { my ($self, $feed, %opts) = @_; if (ref($feed)){ return $feed if $feed->isa('XML::Atom::Feed'); if ($feed->isa('URI')) { my %params = ($self->{_auth}->auth_params('GET', $feed), %opts); my $r = $self->{_ua}->get("$feed", %params); my $redirect_tries = 0; while ($r->code == 302 || $r->code == 301) { my $location = $r->header('location'); %params = ($self->{_auth}->auth_params('GET', $location), %opts); $r = $self->{_ua}->get($location, %params); $redirect_tries++; die "Too many redirects ($redirect_tries)" if $redirect_tries > $REDIRECT_MAX; } --> die $r->status_line unless $r->is_success; $feed = $r->content; } } return XML::Atom::Feed->new(\$feed); }
2017-01-31T18:12:41 GustlIst das Modul auch wieder veraltet?
Edit: Habe gerade nachgeschaut. V1.05 unten steht
Copyright Simon Wistow, 2006
http://search.cpan.org/~plytle/Net-Google-Calendar...
oh mann...