Net::ThreeScale::Response - object encapsulating a response to a 3Scale API v2.0 call
$response = $client->authorize(app_id=>$app_id, app_key=>$app_key); if($response->is_success){ my @usage = @{$response->usage_reports()}; }else{ print STDERR "An error occurred with code ", $response->error_code, ":" ,$response->error,"\n"; }
A response object is returned from various calls in the 3Scale API, the following fields are of relevance: Objects are constructed within the API, you should not create them yourself.
Indicates if the operation which generated the response was successfull. Successful responses will have an associated transaction within the response.
A list of usage reports returned by 3Scale indicating how much of the user's quota has been used.
Returns the error code (as a string) which was genrerated by this response, these correspond to constants exported by the Net::ThreeScale::Client module. See Net::ThreeScale::Client for a list of available response codes.
Returns a textual description of the error returned by the server.
Net::ThreeScale::Client
(c) Owen Cliffe 2008, Eugene Oden 2010.
Dave Lambley
Ed Freyfogle
Marc Metten
To install Net::ThreeScale::Client, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::ThreeScale::Client
CPAN shell
perl -MCPAN -e shell install Net::ThreeScale::Client
For more information on module installation, please visit the detailed CPAN module installation guide.