Class: YahooVideo::SearchRequest

Inherits:
Record
  • Object
show all
Defined in:
lib/yahoo-video.rb

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

Method Summary

Methods inherited from Record

#initialize

Constructor Details

This class inherits a constructor from YahooVideo::Record

Instance Attribute Details

#adult_okObject (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_idObject (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

#formatObject (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

#queryObject (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

#resultsObject (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

#siteObject (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

#startObject (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

#typeObject (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