com.yahoo.search
Class VideoSearchRequest
java.lang.Object
|
+--com.yahoo.rest.RestRequest
|
+--com.yahoo.search.VideoSearchRequest
- public class VideoSearchRequest
- extends com.yahoo.rest.RestRequest
Video search request object.
- Author:
- Ryan Kennedy
| Methods inherited from class com.yahoo.rest.RestRequest |
addParameter, clearParameter, getParameters, getRequestUrl, setParameter, setRequestUrl |
VideoSearchRequest
public VideoSearchRequest(String query)
- Constructs a new video search request.
- Parameters:
query - The query to search for. This is the only required attribute.
setQuery
public void setQuery(String query)
setType
public void setType(String type)
- Sets the type of the search. At the time of writing, three options are available:
- all (default): 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
- Parameters:
type - The type of search to execute.
setResults
public void setResults(int results)
- The maximum number of results to return. May return fewer results if there aren't enough results
in the database. At the time of writing, the default value is 10, the maximum value is 50.
- Parameters:
results - The maximum number of results to return.
setStart
public void setStart(BigInteger start)
- The starting result position. This number should increment by the value of the results
argument each time the user chooses the next page of results. The default is 1.
- Parameters:
start - The starting result position.
setFormat
public void setFormat(String format)
- Specifies the kind of video file to search for. At the time of writing, the following
options are available: all (default), avi, flash, mpeg, msmedia, quicktime, realmedia.
- Parameters:
format - Specifies the kind of video file to search for.
setAdultOk
public void setAdultOk(boolean adultOk)
- Specifies if adult related results are permitted. Defaults to false.
- Parameters:
adultOk - Specifies if adult related results are permitted.