NAME

WebService::ReutersConnect::APIResponse - A ReutersConnect API Response (decorates HTTP::Response).

xml_document

Returns the XML::LibXML::Document of this reuter response.

reuters_status

Returns the reuter status of this query. As per Reuters Connect doc:

5 - Pending (only for Items)
10 - Success
20 - Warnings (Partial success)
30 - Failure

reuters_errors

Returns an array ref of reuteur errors:

[ { code => 1234 , error => 'This is error 1234' },
  { code => 5678', error => 'This is error 5678' },
  ...
]

is_reuters_success

Returns true if this Response is successfull in reuter's term. Meaning success or partial success.

Usage:

unless( $this->is_reuters_success() ){
   print "Return STATUS code says: ".$this->reuters_status()."\n";
   print "Errors are: ".$this->reuters_errors_string()."\n";
}

reuters_errors_string

Convenience method. Returns something reasonably nice to display in case this request is not a success.

Usage:

print $this->reuters_errors_string();

has_reuters_error

Returns true of this response has the given reuters error code.

Usage:

if( $this->has_reuters_error(3002) ){
   ...
}