Net::OpenXchange - Object-oriented interface to OpenXchange groupware
version 0.001
Net::OpenXchange is new and very unfinished code. Its coverage of the OX API actions, objects and attributes is limited. However it already proved useful, so I decided to release this early experimental version. If you choose to use it, I would really appreciate bug reports, with or without attached patches :-) I'd also welcome help adding support for more parts of the OpenXchange API.
Net::OpenXchange is the frontend to all packages of Net::OpenXchange.
use Modern::Perl; use Net::OpenXchange; use DateTime::Format::Mail; my $ox = Net::OpenXchange->new( uri => 'https://ox.example.org/ajax', login => 'myuser', password => 'mypassword', ); my $folder = $ox->folder->resolve_path('Public folders', 'Calendar'); my @appointments = $ox->calendar->all( folder => $folder, start => DateTime->new(year => 2010, month => 1, day => 1), end => DateTime->new(year => 2010, month => 12, day => 31), ); foreach (@appointments) { say 'Start: ', DateTime::Format::Mail->format_datetime($_->start_date); say 'End: ', DateTime::Format::Mail->format_datetime($_->end_date); say 'Title: ', $_->title; say ''; }
Net::OpenXchange connects to the server when creating an object instance and disconnects on object destruction. All errors are raised as exceptions.
All Net::OpenXchange::Module::* packages are available as attributes on this class - for example Net::OpenXchange::Module::Folder becomes $ox->folder. See the documentation for these packages.
Required constructor argument. URI to the HTTP API of your OpenXchange server. Please note you have to add the /ajax manually.
Required constructor argument. Username to log into OpenXchange.
Required constructor argument. Password to log into OpenXchange.
Read-only. An instance of Net::OpenXchange::Connection. You will not have to use this directly.
Read-only. An instance of Net::OpenXchange::Module::Calendar. See its documentation for provided methods.
Read-only. An instance of Net::OpenXchange::Module::Contact. See its documentation for provided methods.
Read-only. An instance of Net::OpenXchange::Module::Folder. See its documentation for provided methods.
Read-only. An instance of Net::OpenXchange::Module::User. See its documentation for provided methods.
my $ox = Net::OpenXchange->new( uri => "https://ox.example.com/ajax", login => $username, password => $password, );
Connect to OpenXchange server.
Maximilian Gass <maximilian.gass@credativ.de>
This software is copyright (c) 2011 by Maximilian Gass.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Net::OpenXchange, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::OpenXchange
CPAN shell
perl -MCPAN -e shell install Net::OpenXchange
For more information on module installation, please visit the detailed CPAN module installation guide.