NAME

WebService::Nestoria::Search::Response - Container object for the result set of a query to the Nestoria Search API.

This package is used by WebService::Nestoria::Search and a Result object should never need to be explicitly created by the user.

Functions

status_code

Returns the status code of the response. 200 on success, various other numbers on errors.

get_json

Returns the unchanged JSON (JavaScript Object Notation) returned by the Nestoria API

get_hashref

Returns a reference to a hash that contains exactly what the response from the Nestoria API gave, converted from JSON to a hashref with JSON::jsonToObj()

count

Returns the number of listings found. These can be accessed as Result objects by calling the methods mentioned below.

results

Returns an array of listings (Result objects) containing all the information about the listings returned by the Nestoria API.

next_result

Returns the next Result object to be fetched. When out of listings returns undef, making it suitable for use in while loops.

while ( $listing = $result->next_result ) {
    # do something;
}

reset

Resets the counter used for next_result.

Copyright

Copyright (C) 2006 Lokku Ltd.

Author

Alex Balhatchet (kaoru@slackwise.net)