bing.requests
Class BingRequest
java.lang.Object
bing.requests.BingRequest
- Direct Known Subclasses:
- BingAdRequest, BingBundleRequest, BingImageRequest, BingInstantAnswerRequest, BingMobileWebRequest, BingNewsRequest, BingPhonebookRequest, BingRelatedSearchRequest, BingSpellRequest, BingTranslationRequest, BingVideoRequest, BingWebRequest
public abstract class BingRequest
- extends java.lang.Object
Base class for all request objects.
All general search options are set in this class.
Each subclass of BingRequest has options that can be set on the request such as count, offset, or other source type specific options.
For a list of options, please refer to: http://msdn.microsoft.com/en-us/library/dd250847.aspx
Each option on a specific source type can be set by using the related setter method (ex: Count can be set through setCount).
Methods inherited from class java.lang.Object |
equals, getClass, notify, notifyAll, wait, wait, wait |
DEFAULT_SEARCH_MARKET
public static final java.lang.String DEFAULT_SEARCH_MARKET
- See Also:
- Constant Field Values
DEFAULT_API_VERSION
public static final java.lang.String DEFAULT_API_VERSION
- See Also:
- Constant Field Values
OPTION_SEPERATOR
public static final java.lang.String OPTION_SEPERATOR
- See Also:
- Constant Field Values
ADULT_OPTIONS_OFF
public static final java.lang.String ADULT_OPTIONS_OFF
- See Also:
- Constant Field Values
ADULT_OPTIONS_MODERATE
public static final java.lang.String ADULT_OPTIONS_MODERATE
- See Also:
- Constant Field Values
ADULT_OPTIONS_STRICT
public static final java.lang.String ADULT_OPTIONS_STRICT
- See Also:
- Constant Field Values
SEARCH_OPTIONS_SEPERATOR
public static final java.lang.String SEARCH_OPTIONS_SEPERATOR
- See Also:
- Constant Field Values
SEARCH_OPTIONS_DISABLE_LOCATION_DETECTION
public static final java.lang.String SEARCH_OPTIONS_DISABLE_LOCATION_DETECTION
- See Also:
- Constant Field Values
SEARCH_OPTIONS_ENABLE_HIGHLIGHTING
public static final java.lang.String SEARCH_OPTIONS_ENABLE_HIGHLIGHTING
- See Also:
- Constant Field Values
sourceType
public abstract java.lang.String sourceType()
- Specifies the source type of the current request object.
- Returns:
- A string representing the source type of the current object.
requestOptions
public java.lang.String requestOptions()
- Specifies request specific options to be passed to the API
- Returns:
- A string representing the various set API parameters
setMarket
public void setMarket(java.lang.String market)
setVersion
public void setVersion(java.lang.String version)
setAdult
public void setAdult(java.lang.String adult)
- Parameters:
adult
- One of the ADULT_OPTIONS_ options.
setOptions
public void setOptions(java.lang.String options)
- Parameters:
options
- One or more combinations of the SEARCH_OPTIONS_ options separated by SEARCH_OPTIONS_SEPERATOR.
setLatitude
public void setLatitude(double latitude)
setLongitude
public void setLongitude(double longitude)
setLanguage
public void setLanguage(java.lang.String language)
setRadius
public void setRadius(double radius)
removeParentOptions
public void removeParentOptions()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object