[Tickets #14080] XMLRPC: missing fields of events
noreply at bugs.horde.org
noreply at bugs.horde.org
Thu Aug 6 17:54:15 UTC 2015
BITTE NICHT AUF DIESE NACHRICHT ANTWORTEN. NACHRICHTEN AN DIESE
E-MAIL-ADRESSE WERDEN NICHT GELESEN.
Ticket-URL: https://bugs.horde.org/ticket/14080
------------------------------------------------------------------------------
Ticket | 14080
Erstellt Von | inquisitor at goldmail.de
Zusammenfassung | XMLRPC: missing fields of events
Warteschlange | Kronolith
Version | 4.2.8
Typ | Bug
Status | Unconfirmed
Priorität | 1. Low
Milestone |
Patch |
Zuständige |
------------------------------------------------------------------------------
inquisitor at goldmail.de (2015-08-06 17:54) hat geschrieben:
Hi,
I am trying to retrieve calendar entries from kronolith using XML-RPC
using a perl script. It seems that some fields are missing in the
response: start and end properties, id. The returned data looks like
this:
{
'OikjhrayPWVsxqZn6eCM5Zk' => {
'icon' => '',
'' => 'OikjhrayPWVsxqZn6eCM5Zk',
'baseid' => '',
'sequence' => '',
'status' => '2',
'modifiedby' => '',
'initialized' => 1,
'allday' => 0,
'stored' => 1,
'url' => '',
'methods' => '',
'alarm' => '0',
'createdby' => '',
'first' => 1,
'uid' => '20150806194100.I1-PHdvV3jJDHBC_aOIlGAC at mydomain',
'calendarType' => 'internal',
'location' => '',
'attendees' => [],
'timezone' => '',
'private' => 0,
'last' => 1,
'description' => '',
'recurrence' => '',
'calendar' => '36ItAzeA3490X4h6YKIelg1',
'modified' => '',
'end' => {
'' => '2015'
},
'created' => '',
'exceptionoriginaldate' => '',
'durMin' => '60',
'title' => 'test',
'start' => {
'' => '2015'
}
}
}
When you look at 'start' and 'end', it seems data is missing. Also the
second parameter which should be the ID I guess.
Here is the script I am using:
#---------------------------------------------------------------------------------------------------------------
#!/usr/bin/perl -w
use strict;
use Data::Dumper;
use URI::Escape;
use HTTP::Cookies;
require RPC::XML;
require RPC::XML::Client;
# config
my $user = 'horde_login at my_domain';
my $pw = 'mypassword';
my $horde_api_url =
"https://".uri_escape($user).":".uri_escape($pw)."\@www.hordeserver.com/horde/rpc.php";
# Prepare rpc call
my $rpc_call = RPC::XML::Client->new($horde_api_url, cookie_jar =>
HTTP::Cookies->new(ignore_discard => 1));
# Retrieve ID of own calendar to query
my $resp_calid = $rpc_call->send_request('calendar.listCalendars',
'false', '4');
my $calid = @{$resp_calid->value}[0];
print "Retrieved calendar ID = $calid\n";
my $today = DateTime->today;
$today->set_locale('de_DE');
my $tomorrow = DateTime->today->add(days => 1);
my $resp_events = $rpc_call->send_request('calendar.listEvents',
$today->epoch, $tomorrow->epoch, $calid );
print Dumper($resp_events->value);
#---------------------------------------------------------------------------------------------------------------
When testing make sure you have at least one event in your calendar
for today. Otherwise of course nothing is returned in this case ;)
Versions:
- Horde Groupware Webmail Edition 5.2.7
- Kalender (kronolith) 4.2.8
Is there anything I am missing?
Thanks!
More information about the bugs
mailing list