NAME

VERSION

version 1.11.3 Yahoo::Search::Request -- Container object for a Yahoo! Search request. (This package is included in, and automatically loaded by, the Yahoo::Search package.)

Package Use

You never need to use this package directly -- it is loaded automatically by Yahoo::Search.

Object Creation

In practice, this class is generally not dealt with explicitly, but rather implicitly via functions in Yahoo::Search such as Query and Links, which build and use a Request object under the hood.

You also have access to the Request object via Request() method of resulting Response and Result objects.

To be clear, Request objects are created by the Request() method of a Search Engine object (Yahoo::Search).

Methods

A Request object provides the following methods:

$Request->Uri

Returns the URI::http object representing the url fetched (or to be fetched) from Yahoo's Search servers. The url is actually fetched when the Request object's Fetch() method is called.

Note that this does not reflect the fact that a request is changed to a POST when request is sufficiently large. Thus, there are times when the url represented by the URI::http object returned is not actually fetchable from the Yahoo! servers.

$Request->Url

Like the Uri method, but returns a string with the full url fetched (or to be fetched).

Note that this does not reflect the fact that a request is changed to a POST when request is sufficiently large. Thus, there are times when the url returned is not actually fetchable from the Yahoo! servers.

$Request->SearchSpace

Returns the search space the request represents (Doc, Image, etc.)

$Request->SearchEngine

Returns the Yahoo::Search "search engine" object used in creating this request.

$Request->Fetch

Actually contact the Yahoo Search servers, returning a Result (Yahoo::Search::Result) object.

$Request->RelatedRequest
$Request->RelatedResponse

Perform a Related request for search terms related to the query phrase of the current request, returning the new Request or Response object, respectively.

Both return nothing if the current request is already for a Related search.

$Request->SpellRequest
$Request->SpellResponse

Perform a Spell request for a search term that may reflect proper spelling of the query phrase of the current request, returning the new Request or Response object, respectively.

Both return nothing if the current request is already for a Spell search.

Author

Jeffrey Friedl (jfriedl@yahoo.com)