Simon Wistow

NAME

OurCal::Provider - class for getting events and TODOs from the system

CONFIGURATION

Teh default provider is a Multi provider named providers. This means that you can do

    [providers]
    providers=default birthday 

    [default]
    dsn=dbi:SQLite:ourcal
    type=dbi

    [birthday]
    file=birthday.ics
    type=icalendar

Alternatively you can specify another default provider using the provider config option

    provider=cache_everything

    [cache_everything]
    child=providers
    type=cache

    [providers]
    providers=default birthday 
    type=multi

    [default]
    dsn=dbi:SQLite:ourcal
    type=dbi

    [birthday]
    file=birthday.ics
    type=icalendar

Read individual providers for config options.

METHODS

new <param[s]>

Requires an OurCal::Config object as config param.

Authomatically instantiates the default provider.

providers

Returns a hash of all providers installed on the system as key-value pairs of the name of the provider and class it represents.

load_provider <name>

Load a provider with a given name as defined in the config and returns it as an object.

todos

Returns all the todos on the system.

has_events <param[s]>

Returns whether there are events given the params.

events <param[s]>

Returns all the events for the given params.

users

Returns the name of all the users on the system.

save_todo <OurCal::Todo>

Save a todo.

del_todo <OurCal::Todo>

Delete a todo.

save_event <OurCal::Event>

Save an event.

del_event <OurCal::Event>

Delete an event..