com.yahoo.search
Class MapSearchRequest

java.lang.Object
  extended by com.yahoo.rest.RestRequest
      extended by com.yahoo.search.MapSearchRequest

public class MapSearchRequest
extends RestRequest

News search request object.

Author:
Ryan Kennedy

Constructor Summary
MapSearchRequest(String query)
          Constructs a new news search request.
 
Method Summary
 void setLanguage(String language)
          The language the results are written in.
 void setQuery(String query)
           
 void setResults(int results)
          The maximum number of results to return.
 void setSort(String sort)
          The sort order for news articles.
 void setStart(BigInteger start)
          The starting result position.
 void setType(String type)
          Sets the type of the search.
 
Methods inherited from class com.yahoo.rest.RestRequest
addParameter, clearParameter, getParameters, getRequestUrl, setParameter, setRequestUrl
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapSearchRequest

public MapSearchRequest(String query)
Constructs a new news search request.

Parameters:
query - The query to search for. This is the only required attribute.
Method Detail

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:

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.

setSort

public void setSort(String sort)
The sort order for news articles. At the time of writing, two options were available: rank (default) or date.

Parameters:
sort - The sort order for news articles.

setLanguage

public void setLanguage(String language)
The language the results are written in. At the time of writing, the following options are available: 'default', 'ar', 'bg', 'ca', 'szh', 'tzh', 'hr', 'cs', 'da', 'nl', 'en', 'et', 'fi', 'fr', 'de', 'el', 'he', 'hu', 'is', 'it', 'ja', 'ko', 'lv', 'lt', 'no', 'fa', 'pl', 'pt', 'ro', 'ru', 'sk', 'sl', 'es', 'sv', 'th', 'tr' .

Parameters:
language - The language the results are written in.