public class SearchParameters extends Object
Modifier and Type | Class and Description |
---|---|
static class |
SearchParameters.ResultType
ResultType enumeration.
|
Constructor and Description |
---|
SearchParameters(String query)
Constructs SearchParameter object
|
Modifier and Type | Method and Description |
---|---|
SearchParameters |
count(int count)
Sets optional
count parameter. |
boolean |
equals(Object o) |
SearchParameters |
geoCode(GeoCode geoCode)
Sets optional
geocode parameter. |
Integer |
getCount()
Returns
count search parameter |
GeoCode |
getGeoCode()
Returns
geo_code search parameter |
String |
getLang()
Returns
lang search parameter |
String |
getLocale()
Returns
locale search parameter |
Long |
getMaxId()
Returns
max_id search parameter |
String |
getQuery()
Returns query,
q parameter |
SearchParameters.ResultType |
getResultType()
Returns
result_type search parameter |
Long |
getSinceId()
Returns
since_id search parameter |
Date |
getUntil()
Returns
until search parameter |
int |
hashCode() |
SearchParameters |
includeEntities(boolean includeEntities)
Sets optional
include_entities parameter. |
boolean |
isIncludeEntities()
Returns
include_entities search parameter |
SearchParameters |
lang(String lang)
Sets optional
lang parameter. |
SearchParameters |
locale(String locale)
Sets optional
locale parameter. |
SearchParameters |
maxId(long maxId)
Sets optional
max_id parameter. |
SearchParameters |
resultType(SearchParameters.ResultType resultType)
Sets optional
result_type parameter. |
SearchParameters |
sinceId(long sinceId)
Sets optional
since_id parameter. |
SearchParameters |
until(Date untilDate)
Sets optional
until parameter. |
public SearchParameters(String query)
query
- Search keywordspublic SearchParameters geoCode(GeoCode geoCode)
geocode
parameter. Restricts tweets by users located within a given radius
of the given latitude/longitude.geoCode
- GeoCode object stuffed with coordinates and radiusGeoCode
public SearchParameters lang(String lang)
lang
parameter. Restricts tweets to the given language, given by an ISO 639-1 code.lang
- an ISO 639-1 language codepublic SearchParameters locale(String locale)
locale
parameter. Specify the language of the query you are sending
(only ja is currently effective).locale
- localepublic SearchParameters resultType(SearchParameters.ResultType resultType)
result_type
parameter. Specifies what type of search results. Default is mixed
.resultType
- type of preferred result typeSearchParameters.ResultType
public SearchParameters count(int count)
count
parameter. Restricts the number of tweets to return, up to a maximum of 100.
Defaults to 15.count
- number of tweets to returnpublic SearchParameters until(Date untilDate)
until
parameter. Restricts search to tweets generated before the given date.untilDate
- date to search untilpublic SearchParameters sinceId(long sinceId)
since_id
parameter. Restricts search results with an ID greater than the specified one.sinceId
- The minimum Tweet
ID to return in the resultspublic SearchParameters maxId(long maxId)
max_id
parameter. Restricts search results with an ID less or equel than the specified one.maxId
- The maximum Tweet
ID to return in the resultspublic SearchParameters includeEntities(boolean includeEntities)
include_entities
parameter. The entities node will be excluded when set to false.includeEntities
- Include entities nodepublic String getQuery()
q
parameterpublic GeoCode getGeoCode()
geo_code
search parameterpublic String getLang()
lang
search parameterpublic String getLocale()
locale
search parameterpublic SearchParameters.ResultType getResultType()
result_type
search parameterpublic Integer getCount()
count
search parameterpublic Date getUntil()
until
search parameterpublic Long getSinceId()
since_id
search parameterpublic Long getMaxId()
max_id
search parameterpublic boolean isIncludeEntities()
include_entities
search parameter