public final class Query
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
geocode |
static java.lang.String |
KILOMETERS |
private java.lang.String |
lang |
private java.lang.String |
locale |
private long |
maxId |
static java.lang.String |
MILES |
static java.lang.String |
MIXED
mixed: Include both popular and real time results in the response.
|
private int |
page |
static java.lang.String |
POPULAR |
private java.lang.String |
query |
static java.lang.String |
RECENT |
private java.lang.String |
resultType |
private int |
rpp |
private static long |
serialVersionUID |
private java.lang.String |
since |
private long |
sinceId |
private java.lang.String |
until |
Modifier and Type | Method and Description |
---|---|
private void |
appendParameter(java.lang.String name,
long value,
java.util.List<twitter4j.internal.http.HttpParameter> params) |
private void |
appendParameter(java.lang.String name,
java.lang.String value,
java.util.List<twitter4j.internal.http.HttpParameter> params) |
(package private) twitter4j.internal.http.HttpParameter[] |
asHttpParameterArray() |
boolean |
equals(java.lang.Object o) |
Query |
geoCode(GeoLocation location,
double radius,
java.lang.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
|
java.lang.String |
getGeocode()
Returns the specified geocode
|
java.lang.String |
getLang()
Returns the lang
|
java.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
|
java.lang.String |
getQuery()
Returns the specified query
|
java.lang.String |
getResultType()
Returns resultType
|
int |
getRpp()
Returns the number of tweets to return per page, up to a max of 100
|
java.lang.String |
getSince()
Returns tweets with since the given date.
|
long |
getSinceId()
returns sinceId
|
java.lang.String |
getUntil()
Returns until
|
int |
hashCode() |
Query |
lang(java.lang.String lang)
restricts tweets to the given language, given by an ISO 639-1 code
|
Query |
locale(java.lang.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(java.lang.String query)
Sets the query string
|
Query |
resultType(java.lang.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,
java.lang.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(java.lang.String lang)
restricts tweets to the given language, given by an ISO 639-1 code
|
void |
setLocale(java.lang.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(java.lang.String query)
Sets the query string
|
void |
setResultType(java.lang.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(java.lang.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(java.lang.String until)
If specified, returns tweets with generated before the given date.
|
Query |
since(java.lang.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.
|
java.lang.String |
toString() |
Query |
until(java.lang.String until)
If specified, returns tweets with generated before the given date.
|
private java.lang.String query
private java.lang.String lang
private java.lang.String locale
private long maxId
private int rpp
private int page
private java.lang.String since
private long sinceId
private java.lang.String geocode
private java.lang.String until
private java.lang.String resultType
private static final long serialVersionUID
public static final java.lang.String MILES
public static final java.lang.String KILOMETERS
public static final java.lang.String MIXED
public static final java.lang.String POPULAR
public static final java.lang.String RECENT
public java.lang.String getQuery()
public void setQuery(java.lang.String query)
query
- the query stringpublic Query query(java.lang.String query)
query
- the query stringpublic java.lang.String getLang()
public void setLang(java.lang.String lang)
lang
- an ISO 639-1 codepublic Query lang(java.lang.String lang)
lang
- an ISO 639-1 codepublic java.lang.String getLocale()
public void setLocale(java.lang.String locale)
locale
- the localepublic Query locale(java.lang.String locale)
locale
- the localepublic long getMaxId()
public void setMaxId(long maxId)
maxId
- maxIdpublic Query maxId(long maxId)
maxId
- maxIdpublic 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 pagepublic 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 returnpublic java.lang.String getSince()
public void setSince(java.lang.String since)
since
- sincepublic Query since(java.lang.String since)
since
- sincepublic 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 idpublic java.lang.String getGeocode()
public void setGeoCode(GeoLocation location, double radius, java.lang.String unit)
location
- geo locationradius
- radiusunit
- Query.MILES or Query.KILOMETERSpublic Query geoCode(GeoLocation location, double radius, java.lang.String unit)
location
- geo locationradius
- radiusunit
- Query.MILES or Query.KILOMETERSpublic java.lang.String getUntil()
public void setUntil(java.lang.String until)
until
- untilpublic Query until(java.lang.String until)
until
- untilpublic java.lang.String getResultType()
public void setResultType(java.lang.String resultType)
resultType
- Query.MIXED or Query.POPULAR or Query.RECENTpublic Query resultType(java.lang.String resultType)
resultType
- resultTypetwitter4j.internal.http.HttpParameter[] asHttpParameterArray()
private void appendParameter(java.lang.String name, java.lang.String value, java.util.List<twitter4j.internal.http.HttpParameter> params)
private void appendParameter(java.lang.String name, long value, java.util.List<twitter4j.internal.http.HttpParameter> params)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object