Spring Social Twitter

org.springframework.social.twitter.api.impl
Class SearchParameters

java.lang.Object
  extended by org.springframework.social.twitter.api.impl.SearchParameters

public class SearchParameters
extends java.lang.Object

Twitter search parameters. See specifications: https://dev.twitter.com/docs/api/1.1/get/search/tweets

Author:
Rosty Kerei

Nested Class Summary
static class SearchParameters.ResultType
          ResultType enumeration.
 
Constructor Summary
SearchParameters(java.lang.String query)
          Constructs SearchParameter object
 
Method Summary
 java.lang.Integer getCount()
          Returns count search parameter
 GeoCode getGeoCode()
          Returns geo_code search parameter
 java.lang.String getLang()
          Returns lang search parameter
 java.lang.String getLocale()
          Returns locale search parameter
 java.lang.Long getMaxId()
          Returns max_id search parameter
 java.lang.String getQuery()
          Returns query, q parameter
 SearchParameters.ResultType getResultType()
          Returns result_type search parameter
 java.lang.Long getSinceId()
          Returns since_id search parameter
 java.util.Date getUntil()
          Returns until search parameter
 boolean isIncludeEntities()
          Returns include_entities search parameter
 void setCount(int count)
          Sets optional count parameter.
 void setGeoCode(GeoCode geoCode)
          Sets optional geocode parameter.
 void setIncludeEntities(boolean includeEntities)
          Sets optional include_entities parameter.
 void setLang(java.lang.String lang)
          Sets optional lang parameter.
 void setLocale(java.lang.String locale)
          Sets optional locale parameter.
 void setMaxId(long maxId)
          Sets optional max_id parameter.
 void setResultType(SearchParameters.ResultType resultType)
          Sets optional result_type parameter.
 void setSinceId(long sinceId)
          Sets optional since_id parameter.
 void setUntil(java.util.Date untilDate)
          Sets optional until parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchParameters

public SearchParameters(java.lang.String query)
Constructs SearchParameter object

Parameters:
query - Search keywords
Method Detail

setGeoCode

public void setGeoCode(GeoCode geoCode)
Sets optional geocode parameter. Restricts tweets by users located within a given radius of the given latitude/longitude.

Parameters:
geoCode - GeoCode object stuffed with coordinates and radius
See Also:
GeoCode

setLang

public void setLang(java.lang.String lang)
Sets optional lang parameter. Restricts tweets to the given language, given by an ISO 639-1 code.

Parameters:
lang - an ISO 639-1 language code

setLocale

public void setLocale(java.lang.String locale)
Sets optional locale parameter. Specify the language of the query you are sending (only ja is currently effective).

Parameters:
locale - locale

setResultType

public void setResultType(SearchParameters.ResultType resultType)
Sets optional result_type parameter. Specifies what type of search results. Default is mixed.

Parameters:
resultType - type of preferred result type
See Also:
SearchParameters.ResultType

setCount

public void setCount(int count)
Sets optional count parameter. Restricts the number of tweets to return, up to a maximum of 100. Defaults to 15.

Parameters:
count - number of tweets to return

setUntil

public void setUntil(java.util.Date untilDate)
Sets optional until parameter. Restricts search to tweets generated before the given date.

Parameters:
untilDate - date to search until

setSinceId

public void setSinceId(long sinceId)
Sets optional since_id parameter. Restricts search results with an ID greater than the specified one.

Parameters:
sinceId - The minimum Tweet ID to return in the results

setMaxId

public void setMaxId(long maxId)
Sets optional max_id parameter. Restricts search results with an ID less or equel than the specified one.

Parameters:
maxId - The maximum Tweet ID to return in the results

setIncludeEntities

public void setIncludeEntities(boolean includeEntities)
Sets optional include_entities parameter. The entities node will be excluded when set to false.

Parameters:
includeEntities - Include entities node

getQuery

public java.lang.String getQuery()
Returns query, q parameter

Returns:
query

getGeoCode

public GeoCode getGeoCode()
Returns geo_code search parameter

Returns:
geoCode

getLang

public java.lang.String getLang()
Returns lang search parameter

Returns:
lang

getLocale

public java.lang.String getLocale()
Returns locale search parameter

Returns:
locale

getResultType

public SearchParameters.ResultType getResultType()
Returns result_type search parameter

Returns:
result_type

getCount

public java.lang.Integer getCount()
Returns count search parameter

Returns:
count

getUntil

public java.util.Date getUntil()
Returns until search parameter

Returns:
until

getSinceId

public java.lang.Long getSinceId()
Returns since_id search parameter

Returns:
since_id

getMaxId

public java.lang.Long getMaxId()
Returns max_id search parameter

Returns:
max_id

isIncludeEntities

public boolean isIncludeEntities()
Returns include_entities search parameter

Returns:
include_entities

Spring Social Twitter