|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttwitter4j.Query
public final class Query
A data class represents search query.
An instance of this class is NOT thread safe.
Instances can be shared across threads, but should not be mutated while a search is ongoing.
| Field Summary | |
|---|---|
static String |
KILOMETERS
|
static String |
MILES
|
static String |
MIXED
mixed: Include both popular and real time results in the response. |
static String |
POPULAR
|
static String |
RECENT
|
| Constructor Summary | |
|---|---|
Query()
|
|
Query(String query)
|
|
| Method Summary | |
|---|---|
boolean |
equals(Object o)
|
Query |
geoCode(GeoLocation location,
double radius,
String unit)
returns tweets by users located within a given radius of the given latitude/longitude, where the user's location is taken from their Twitter profile |
String |
getGeocode()
Returns the specified geocode |
String |
getLang()
Returns the lang |
String |
getLocale()
Returns the language of the query you are sending (only ja is currently effective). |
long |
getMaxId()
Returns tweets with status ids less than the given id. |
int |
getPage()
Returns the page number (starting at 1) to return, up to a max of roughly 1500 results |
String |
getQuery()
Returns the specified query |
String |
getResultType()
Returns resultType |
int |
getRpp()
Returns the number of tweets to return per page, up to a max of 100 |
String |
getSince()
Returns tweets with since the given date. |
long |
getSinceId()
returns sinceId |
String |
getUntil()
Returns until |
int |
hashCode()
|
Query |
lang(String lang)
restricts tweets to the given language, given by an ISO 639-1 code |
Query |
locale(String locale)
Specify the language of the query you are sending (only ja is currently effective). |
Query |
maxId(long maxId)
If specified, returns tweets with status ids less than the given id. |
Query |
page(int page)
sets the page number (starting at 1) to return, up to a max of roughly 1500 results |
Query |
query(String query)
Sets the query string |
Query |
resultType(String resultType)
If specified, returns tweets included popular or real time or both in the responce |
Query |
rpp(int rpp)
sets the number of tweets to return per page, up to a max of 100 |
void |
setGeoCode(GeoLocation location,
double radius,
String unit)
returns tweets by users located within a given radius of the given latitude/longitude, where the user's location is taken from their Twitter profile |
void |
setLang(String lang)
restricts tweets to the given language, given by an ISO 639-1 code |
void |
setLocale(String locale)
Specify the language of the query you are sending (only ja is currently effective). |
void |
setMaxId(long maxId)
If specified, returns tweets with status ids less than the given id. |
void |
setPage(int page)
sets the page number (starting at 1) to return, up to a max of roughly 1500 results |
void |
setQuery(String query)
Sets the query string |
void |
setResultType(String resultType)
Default value is Query.MIXED if parameter not specified |
void |
setRpp(int rpp)
sets the number of tweets to return per page, up to a max of 100 |
void |
setSince(String since)
If specified, returns tweets with since the given date. |
void |
setSinceId(long sinceId)
returns tweets with status ids greater than the given id. |
void |
setUntil(String until)
If specified, returns tweets with generated before the given date. |
Query |
since(String since)
If specified, returns tweets with since the given date. |
Query |
sinceId(long sinceId)
returns tweets with status ids greater than the given id. |
String |
toString()
|
Query |
until(String until)
If specified, returns tweets with generated before the given date. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String MILES
public static final String KILOMETERS
public static final String MIXED
public static final String POPULAR
public static final String RECENT
| Constructor Detail |
|---|
public Query()
public Query(String query)
| Method Detail |
|---|
public String getQuery()
public void setQuery(String query)
query - the query stringpublic Query query(String query)
query - the query string
public String getLang()
public void setLang(String lang)
lang - an ISO 639-1 codepublic Query lang(String lang)
lang - an ISO 639-1 code
public String getLocale()
public void setLocale(String locale)
locale - the localepublic Query locale(String locale)
locale - the locale
public long getMaxId()
public void setMaxId(long maxId)
maxId - maxIdpublic Query maxId(long maxId)
maxId - maxId
public int getRpp()
public void setRpp(int rpp)
rpp - the number of tweets to return per pagepublic Query rpp(int rpp)
rpp - the number of tweets to return per page
public int getPage()
public void setPage(int page)
page - the page number (starting at 1) to returnpublic Query page(int page)
page - the page number (starting at 1) to return
public String getSince()
public void setSince(String since)
since - sincepublic Query since(String since)
since - since
public long getSinceId()
public void setSinceId(long sinceId)
sinceId - returns tweets with status ids greater than the given idpublic Query sinceId(long sinceId)
sinceId - returns tweets with status ids greater than the given id
public String getGeocode()
public void setGeoCode(GeoLocation location,
double radius,
String unit)
location - geo locationradius - radiusunit - Query.MILES or Query.KILOMETERS
public Query geoCode(GeoLocation location,
double radius,
String unit)
location - geo locationradius - radiusunit - Query.MILES or Query.KILOMETERS
public String getUntil()
public void setUntil(String until)
until - untilpublic Query until(String until)
until - until
public String getResultType()
public void setResultType(String resultType)
resultType - Query.MIXED or Query.POPULAR or Query.RECENTpublic Query resultType(String resultType)
resultType - resultType
public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||