Dave Houston > Bing-Search-1.121210 > Bing::Search::Response

Download:
Bing-Search-1.121210.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source  

NAME ^

Bing::Search::Response - A response object for the Bing AJAX Api

SYNOPSIS ^

    my $resulsts = $search->search();

    my $array_ref = $response->results;

DESCRIPTION ^

This object contains the results from a search. Or something telling you why things went horribly wrong. It should be noted that this does not tell you if your request failed at some LWP-style failure -- for that, check the request_obj of your Bing::Search object.

METHODS ^

Responses are generally a read-only ordeal. You may change the values here in these various methods, if it makes you feel better. Nothing will try to stop you. Won't do much, though.

Version

Contains the Bing API version.

Query

The query sent to Bing. Use this for verification.

AlterationOverride

If the query sent to Bing is "fixed" automatically by Bing, this string will allow you to re-submit the query "as-is". The example from the Bing documentation:

For example, if the original query is microsift offic, then AlterationOverrideQuery would be +microsift +offic

results

This is the biggie. This is an arrayref of the Bing::Search::Result objects. This is what you want to fiddle with.

Total

This is the total number of results generated by your search(es). If you have more than one source, these results are summed together.

If you need access to the individual source's counts, you may access it in the data hashref (see below) with {SearchResponse}->{source name}->{Total}, where the source name is "Web" or "Video" or so forth and so on.

data

A hashref, it initially contains the deparsed JSON structure. As objects are populated, it is depopulated. Anything left over is something Bing sent but was, for some reason, not handled. In a perfect world, by the time you're able to do anything, this should be empty. You probably don't want to fiddle with it.

_parse

Don't mess with this. It's what turns data into objects. Seriously. Just leave it alone.

BUGS ^

Probably. Patches welcome.

SEE ALSO ^

Bing::Search

AUTHOR ^

Dave Houston, " dhouston@cpan.org ", 2010

LICENSE ^

This library is free software; you may redistribute and/or modify it under the same terms as Perl itself.

syntax highlighting: