Catalyst::Model::WebService::MyGengo - Catalyst Model providing access to the WebService::MyGengo library
In your model class:
package MyApp::Model::MyGengo; use strict; use parent qw( Catalyst::Model::WebService::MyGengo ); __PACKAGE__->config({ class => 'WebService::MyGengo::Client' , public_key => 'your API public key' , private_key => 'your API private key' , use_sandbox => 0 # Whether to use the production site or the sandbox # See WebService::MyGengo::Client for other options }); 1;
Or in your myapp.conf or myapp_local.conf file ( be sure to escape any # characters in your keys (eg \#) ):
<Model::MyGengo> class WebService::MyGengo::Client public_key my-sandbox-pubkey private_key my-sandbox-privkey use_sandbox 1 </Model::MyGengo>
Then, in a controller:
# Grab a WebService::MyGengo::Job my $job = $c->model('MyGengo')->get_job( 123 ); # Add comments, etc. $job = $c->model('MyGengo')->add_job_comment( $job, "Nicey nice nice!" );
http://mygengo.com
WebService::MyGengo::Client
Catalyst::Model::Factory::PerRequest
Nathaniel Heinrichs
Copyright (c) 2011, Nathaniel Heinrichs <nheinric-at-cpan.org>. All rights reserved.
This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself.
To install Catalyst::Model::WebService::MyGengo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst::Model::WebService::MyGengo
CPAN shell
perl -MCPAN -e shell install Catalyst::Model::WebService::MyGengo
For more information on module installation, please visit the detailed CPAN module installation guide.