SimpleAPI::Agent - Role for custom user agents
package MyApp::Model::ServiceApp; use Moose; use namespace::autoclean; extends 'Catalyst::Model'; with 'SimpleAPI::Agent'; __PACKAGE__->config( api_key => 'AE281S228D4', application_id => 'myapp', api_base_url => 'http://localhost:5000/' ); 1;
A role for building custom user agents which provides a request method to interface with CatalystX::SimpleAPI apps.
request
String used as authorization token.
Application's identification which can be a number, UUID, name, etc.
Base URL to send request to. That is concatenated with the path supplied as arg on the call to request.
request( $relative_path, $params?, $http_method? )
do_request( $http_method, $uri_obj, $params? )
handle_response( $http_response_obj )
See CatalystX::SimpleAPI.
To install CatalystX::SimpleAPI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CatalystX::SimpleAPI
CPAN shell
perl -MCPAN -e shell install CatalystX::SimpleAPI
For more information on module installation, please visit the detailed CPAN module installation guide.