twitter4j
Class Query

java.lang.Object
  extended by twitter4j.Query

public class Query
extends java.lang.Object

A data class represents search query.

Author:
Yusuke Yamamoto - yusuke at mac.com
See Also:
Twitter API / Search API Documentation, Twitter API / Search Operators

Field Summary
 java.lang.String KILOMETERS
           
 java.lang.String MILES
           
 
Constructor Summary
Query()
           
Query(java.lang.String query)
           
 
Method Summary
 PostParameter[] asPostParameters()
           
 boolean equals(java.lang.Object o)
           
 java.lang.String getGeocode()
           
 java.lang.String getLang()
           
 int getPage()
           
 java.lang.String getQuery()
           
 int getRpp()
           
 long getSinceId()
           
 int hashCode()
           
 void setGeoCode(double latitude, double longtitude, 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 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 setRpp(int rpp)
          sets the number of tweets to return per page, up to a max of 100
 void setSinceId(long sinceId)
          returns tweets with status ids greater than the given id.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MILES

public java.lang.String MILES

KILOMETERS

public java.lang.String KILOMETERS
Constructor Detail

Query

public Query()

Query

public Query(java.lang.String query)
Method Detail

getQuery

public java.lang.String getQuery()

setQuery

public void setQuery(java.lang.String query)
Sets the query string

Parameters:
query - - the query string
See Also:
Twitter API / Search API Documentation, Twitter API / Search Operators

getLang

public java.lang.String getLang()

setLang

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

Parameters:
lang - an ISO 639-1 code

getRpp

public int getRpp()

setRpp

public void setRpp(int rpp)
sets the number of tweets to return per page, up to a max of 100

Parameters:
rpp - the number of tweets to return per page

getPage

public int getPage()

setPage

public void setPage(int page)
sets the page number (starting at 1) to return, up to a max of roughly 1500 results

Parameters:
page - - the page number (starting at 1) to return

getSinceId

public long getSinceId()

setSinceId

public void setSinceId(long sinceId)
returns tweets with status ids greater than the given id.

Parameters:
sinceId - - returns tweets with status ids greater than the given id

getGeocode

public java.lang.String getGeocode()

setGeoCode

public void setGeoCode(double latitude,
                       double longtitude,
                       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

Parameters:
latitude -
longtitude -
unit - - Query.MILES or Query.KILOMETERS

asPostParameters

public PostParameter[] asPostParameters()

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2009. All Rights Reserved.