public static class SearchTimeline.Builder
extends Object
| Constructor and Description |
|---|
Builder()
Constructs a Builder.
|
| Modifier and Type | Method and Description |
|---|---|
SearchTimeline |
build()
Builds a SearchTimeline from the Builder parameters.
|
SearchTimeline.Builder |
geocode(Geocode geocode)
Sets the geocode for the SearchTimeline.
|
SearchTimeline.Builder |
languageCode(String languageCode)
Sets the languageCode for the SearchTimeline.
|
SearchTimeline.Builder |
maxItemsPerRequest(Integer maxItemsPerRequest)
Sets the number of Tweets returned per request for the SearchTimeline.
|
SearchTimeline.Builder |
query(String query)
Sets the query for the SearchTimeline.
|
SearchTimeline.Builder |
resultType(SearchTimeline.ResultType resultType)
The result_type parameter allows one to choose if the result set will be represented by
recent or popular Tweets, or a mix of both.
|
SearchTimeline.Builder |
untilDate(Date date)
Returns tweets generated before the given date.
|
public SearchTimeline.Builder query(String query)
query - A UTF-8, URL-encoded search query of 500 characters maximum, including
operators. Queries may additionally be limited by complexity.public SearchTimeline.Builder geocode(Geocode geocode)
geocode - Restricts query to a given geolocationpublic SearchTimeline.Builder resultType(SearchTimeline.ResultType resultType)
resultType - possible options include recent, popular, mixed, or filtered.public SearchTimeline.Builder languageCode(String languageCode)
languageCode - Restricts tweets to the given language, given by an ISO 639-1 code.
Language detection is best-effort.public SearchTimeline.Builder maxItemsPerRequest(Integer maxItemsPerRequest)
maxItemsPerRequest - The number of tweets to return per request, up to a maximum of
100.public SearchTimeline.Builder untilDate(Date date)
date - Date before which the tweets were created.public SearchTimeline build()
IllegalStateException - if query is not set (is null).