Class: YahooVideo::SearchRequest
Overview
Describes a search request’s parameters for submission to the Yahoo! Video search service via Client#search. Parameters are passed to the constructor as hash key/value pairs.
Instance Attribute Summary collapse
-
#adult_ok ⇒ Object
readonly
Optional: a boolean value representing whether adult-only results are permitted in the result set, defaulting to false.
-
#app_id ⇒ Object
readonly
Required: the application id to associate with the request, as obtained from developer.yahoo.com/faq/index.html#appid.
-
#format ⇒ Object
readonly
Optional: a list of the output formats by which the search should be constrained.
-
#query ⇒ Object
readonly
Required: the query string representing the query to search for.
-
#results ⇒ Object
readonly
Optional: the number of results to return, defaulting to 10 and at most 50.
-
#site ⇒ Object
readonly
Optional: a list of the site domains by which the search should be constrained, e.g.,
www.yahoo.com
. -
#start ⇒ Object
readonly
Optional: The starting result index to return (1-based), defaulting to 1.
-
#type ⇒ Object
readonly
Optional: the kind of search to execute, one of
all
(default),any
, orphrase
.
Method Summary
Methods inherited from Record
Constructor Details
This class inherits a constructor from YahooVideo::Record
Instance Attribute Details
#adult_ok ⇒ Object (readonly)
Optional: a boolean value representing whether adult-only results are permitted in the result set, defaulting to false.
54 55 56 |
# File 'lib/yahoo-video.rb', line 54 def adult_ok @adult_ok end |
#app_id ⇒ Object (readonly)
Required: the application id to associate with the request, as obtained from developer.yahoo.com/faq/index.html#appid.
58 59 60 |
# File 'lib/yahoo-video.rb', line 58 def app_id @app_id end |
#format ⇒ Object (readonly)
Optional: a list of the output formats by which the search should be constrained. One of any
(default), avi
, flash
, mpeg
, msmedia
, quicktime
, realmedia
.
68 69 70 |
# File 'lib/yahoo-video.rb', line 68 def format @format end |
#query ⇒ Object (readonly)
Required: the query string representing the query to search for. Supports +
, to include terms, -
to exclude terms, and quotes around “exact phrase” matching.
78 79 80 |
# File 'lib/yahoo-video.rb', line 78 def query @query end |
#results ⇒ Object (readonly)
Optional: the number of results to return, defaulting to 10 and at most 50.
82 83 84 |
# File 'lib/yahoo-video.rb', line 82 def results @results end |
#site ⇒ Object (readonly)
Optional: a list of the site domains by which the search should be constrained, e.g., www.yahoo.com
.
86 87 88 |
# File 'lib/yahoo-video.rb', line 86 def site @site end |
#start ⇒ Object (readonly)
Optional: The starting result index to return (1-based), defaulting to 1. The finishing position (start + results - 1)
cannot exceed 1000.
91 92 93 |
# File 'lib/yahoo-video.rb', line 91 def start @start end |
#type ⇒ Object (readonly)
Optional: the kind of search to execute, one of all
(default), any
, or phrase
.
-
all
: returns results with all query terms. -
any
: returns results with one or more of the query terms. -
phrase
: returns results containing the query terms as a phrase.
99 100 101 |
# File 'lib/yahoo-video.rb', line 99 def type @type end |