
WebService::iThenticate::Response - manipulate response objects for the WebService::iThenticate

# make the request u
$response = $ithenticate_api_client->login;
# check for any errors
my %errors = %{ $response->errors };
foreach my $key ( keys %errors ) {
warn(sprintf('Error %s encountered, message %s', $key, $errors{$key}));
}
# grab the numeric api status code
$api_status_code = $response->api_status;
# grab the session id
$sid = $response->sid

This class encapsulates responses received from the WebService::iThenticate

%errors = %{ $response->errors };
Returns a hash reference of error name => error value, or undefined if no errors present.
$sid = $response->sid;
Returns the session id for an authenticated client, or undefined if the client has not authenticated (no session present).
$xml_response = $response->as_xml;
Returns the stringified xml response
$timestamp = $response->timestamp;
Returns the timestamp of the api response in the format iso8601 XMLRPC field in UTC (with a "Z" appended).
$api_status = $response->api_status;
Returns the numeric api status code for the client request.
Values correspond to HTTP status codes, e.g. 200 OK, 404 Not Found, etc.
$id = $response->id;
Returns the id of a newly created object
$report = $response->report;
# a url to view the report which requires user authentication
$report_url = $report->{report_url};
# a view only report url which expires in a set amount of time
$view_only_url = $report->{view_only_url};
# the expiration time in minutes of the $view_only_url
$view_only_expires = $report->{view_only_expires};
Returns a hash reference containing links to view the report, one link requires authentication, one does not but expires a set amount of time after the api request is made.
$document = $response->document;
Returns an hash reference of the document data
$account = $response->account;
Returns a hash reference of the account status
$folder = $response->folder;
Returns a hash reference of the folder data
$uploaded = $response->uploaded;
Returns an array reference of document hash references
$documents = $response->documents;
Returns an array reference of document hash references
@groups = @{ $response->groups };
Returns an array reference of group hash references
$folders_array_reference = $response->folders;
where the array reference contains a set of hash references with the folder data
[ {
folder_id => '1',
name => 'test_folder',
},
{
...
},
]
Returns an array reference of folder hash references
@users = @{ $response->users };
Returns an array reference of user hash references
if ( $response->messages ) {
@messages = @{ $response->messages };
}
Returns an array reference of message scalars

WebService::iThenticate::Request, WebService::iThenticate::Client, RPC::XML

Fred Moyer <fred@turnitin.com>

Copyright 2008 iParadigms LLC