Package twitter4j.v1
Class GeoQuery
java.lang.Object
twitter4j.v1.GeoQuery
- All Implemented Interfaces:
Serializable
- Since:
- Twitter4J 2.1.1
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal @Nullable String
accuracyfinal @Nullable String
granularityfinal @Nullable String
ipfinal @Nullable GeoLocation
locationfinal int
maxResultsfinal String
query -
Method Summary
Modifier and TypeMethodDescriptionSets a hint on the "region" in which to search.boolean
geoLocation
(double latitude, double longitude) Creates a GeoQuery with the specified locationgranularity
(@NotNull String granularity) Sets the minimal granularity of data to return.int
hashCode()
maxResults
(int maxResults) Sets a hint as to the number of results to return.static GeoQuery
ofGeoLocation
(double latitude, double longitude) Creates a GeoQuery with the specified locationstatic GeoQuery
Creates a GeoQuery with the specified IP addressstatic GeoQuery
Creates a GeoQuery with the specified query, ip and locationCreates a GeoQuery with the specified query, ip and locationtoString()
-
Field Details
-
location
location -
query
query -
ip
ip -
accuracy
accuracy -
granularity
granularity -
maxResults
public final int maxResultsmaxResults
-
-
Method Details
-
ofGeoLocation
Creates a GeoQuery with the specified location- Parameters:
latitude
- latitudelongitude
- longitude- Returns:
- GeoQuery
-
geoLocation
Creates a GeoQuery with the specified location- Parameters:
latitude
- latitudelongitude
- longitude- Returns:
- GeoQuery
-
ofIP
Creates a GeoQuery with the specified IP address- Parameters:
ip
- IP address- Returns:
- GeoQuery
-
ip
- Parameters:
ip
- IP- Returns:
- GeoQuery
-
ofQuery
Creates a GeoQuery with the specified query, ip and location- Parameters:
query
- free-form text to match- Returns:
- GeoQuery
-
query
Creates a GeoQuery with the specified query, ip and location- Parameters:
query
- free-form text to match- Returns:
- GeoQuery
-
accuracy
Sets a hint on the "region" in which to search. If a number, then this is a radius in meters, but it can also take a string that is suffixed with ft to specify feet. If this is not passed in, then it is assumed to be 0m. If coming from a device, in practice, this value is whatever accuracy the device has measuring its location (whether it be coming from a GPS, WiFi triangulation, etc.).- Parameters:
accuracy
- a hint on the "region" in which to search.- Returns:
- this instance
-
granularity
Sets the minimal granularity of data to return. If this is not passed in, then neighborhood is assumed. city can also be passed.- Parameters:
granularity
- the minimal granularity of data to return- Returns:
- GeoQuery
-
maxResults
Sets a hint as to the number of results to return. This does not guarantee that the number of results returned will equal max_results, but instead informs how many "nearby" results to return. Ideally, only pass in the number of places you intend to display to the user here.- Parameters:
maxResults
- A hint as to the number of results to return.- Returns:
- this instance
-
equals
-
hashCode
public int hashCode() -
toString
-