NAME

Catalyst::Model::EVDB - EVDB model class for Catalyst

SYNOPSIS

# Use the Catalyst helper
script/myapp_create.pl model EVDB EVDB xxxxxxxxxxxxxxxx

# lib/MyApp/Model/EVDB.pm
package MyApp::Model::EVDB;

use base qw/Catalyst::Model::EVDB/;

__PACKAGE__->config(
    app_key => 'xxxxxxxxxxxxxxxx',
);

1;

# In your controller
my $args = {
    location => 'Gainesville, FL',
    keywords => 'tag:music',
};

my $evdb    = $c->model('EVDB');
my $results = $evdb->call('events/search', $args)
    or die 'Error searching for events: ' . $evdb->errstr;

DESCRIPTION

This is the EVDB::API model class for Catalyst. EVDB::API is a Perl interface to EVDB, the Events and Venues Database.

Please note that EVDB API methods require an application key.

For more information on EVDB, or to obtain an application key, see http://api.evdb.com/.

METHODS

new

Create a new EVDB model component, using app_key as specified in your configuration.

errstr

Return the EVDB API error message.

SEE ALSO

AUTHOR

Daniel Westermann-Clark <danieltwc@cpan.org>

ACKNOWLEDGMENTS

  • Brian Cassidy, for clever new code

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.