Unix Man page/Perldoc/Info page, English-Chinese Dictionary,
Chinese-English Dictionary
Yahoo::Search::RequestUser)Contributed Perl DocumenYahoo::Search::Request(3pm)
NAME
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 automati-
cally 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.
Copyright
Copyright (C) 2005 Yahoo! Inc.
Author
Jeffrey Friedl (jfriedl AT yahoo.com)
$Id: Request.pm 3 2005-01-28 04:29:54Z jfriedl $
perl v5.8.7 2005-03-31 Yahoo::Search::Request(3pm)
|