David Podolsky > Switchvox-API > Switchvox::API::Response



Annotate this POD

View/Report Bugs
Module Version: 1.02   Source  


Switchvox::API::Response - A response to the Switchvox Extend API.


A Switchvox::API::Response object is returned from the api_request method in the Switchvox::API class.

Note: The Switchvox::API::Response object is a subclass of HTTP::Response so you can use all functionality of HTTP::Response.

You mostly only need to interact with three hash keys in the Switchvox::API::Response object (api_status,api_errors,api_result). If you want to get to the raw xml returned from the API call you can access this through the $response->{_content} field.


Status string that represents the success or failure of the API call. Possible values: success,fault,fault.


Everything went great and you should check the {api_result} for the data.


The connection to the API just fine, but the API returned a fault code (probably due to some invalid parameter) and you should check the {api_errors} for a summary of the problem.


There was a problem with the connection to the API. This could because the hostname was incorrect, a bad HTTP response code was returned, etc. You should check the {api_errors} for a summary of the problem.


Array ref containing any connection errors, xml parsing errors, faults returned, etc during the request.


If the request was successful this is where the data will be.


Written by David W. Podolsky <api at switchvox dot com>

Copyright (C) 2009 Digium, Inc


Switchvox::API::Request, Switchvox::API::Response, http://developers.digium.com/switchvox/

syntax highlighting: