Maximilian Gaß > Net-OpenXchange-0.001 > Net::OpenXchange

Download:
Net-OpenXchange-0.001.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.001   Source  

NAME ^

Net::OpenXchange - Object-oriented interface to OpenXchange groupware

VERSION ^

version 0.001

SYNOPSIS ^

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.

ATTRIBUTES ^

uri

Required constructor argument. URI to the HTTP API of your OpenXchange server. Please note you have to add the /ajax manually.

login

Required constructor argument. Username to log into OpenXchange.

password

Required constructor argument. Password to log into OpenXchange.

conn

Read-only. An instance of Net::OpenXchange::Connection. You will not have to use this directly.

calendar

Read-only. An instance of Net::OpenXchange::Module::Calendar. See its documentation for provided methods.

contact

Read-only. An instance of Net::OpenXchange::Module::Contact. See its documentation for provided methods.

folder

Read-only. An instance of Net::OpenXchange::Module::Folder. See its documentation for provided methods.

user

Read-only. An instance of Net::OpenXchange::Module::User. See its documentation for provided methods.

METHODS ^

new

    my $ox = Net::OpenXchange->new(
        uri      => "https://ox.example.com/ajax",
        login    => $username,
        password => $password,
    );

Connect to OpenXchange server.

AUTHOR ^

Maximilian Gass <maximilian.gass@credativ.de>

COPYRIGHT AND LICENSE ^

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.

syntax highlighting: