public interface GeoOperations
Modifier and Type | Method and Description |
---|---|
Place |
createPlace(PlacePrototype placePrototype)
Creates a new place.
|
SimilarPlaces |
findSimilarPlaces(double latitude,
double longitude,
String name)
Finds places similar to a place described in the parameters.
|
SimilarPlaces |
findSimilarPlaces(double latitude,
double longitude,
String name,
String streetAddress,
String containedWithin)
Finds places similar to a place described in the parameters.
|
Place |
getPlace(String id)
Retrieves information about a plce
|
List<Place> |
reverseGeoCode(double latitude,
double longitude)
Retrieves up to 20 places matching the given location.
|
List<Place> |
reverseGeoCode(double latitude,
double longitude,
PlaceType granularity,
String accuracy)
Retrieves up to 20 places matching the given location and criteria
|
List<Place> |
search(double latitude,
double longitude)
Searches for up to 20 places matching the given location.
|
List<Place> |
search(double latitude,
double longitude,
PlaceType granularity,
String accuracy,
String query)
Searches for up to 20 places matching the given location and criteria
|
Place getPlace(String id)
id
- the place IDPlace
org.springframework.social.ApiException
- if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException
- if TwitterTemplate was not created with OAuth credentials.List<Place> reverseGeoCode(double latitude, double longitude)
latitude
- the latitudelongitude
- the longitudePlace
s that the point is withinorg.springframework.social.ApiException
- if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException
- if TwitterTemplate was not created with OAuth credentials.List<Place> reverseGeoCode(double latitude, double longitude, PlaceType granularity, String accuracy)
latitude
- the latitudelongitude
- the longitudegranularity
- the minimal granularity of the places to return. If null, the default granularity (neighborhood) is assumed.accuracy
- a radius of accuracy around the given point. If given a number, the value is assumed to be in meters. The number may be qualified with "ft" to indicate feet. If null, the default accuracy (0m) is assumed.Place
s that the point is withinorg.springframework.social.ApiException
- if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException
- if TwitterTemplate was not created with OAuth credentials.List<Place> search(double latitude, double longitude)
latitude
- the latitudelongitude
- the longitudePlace
s that the point is withinorg.springframework.social.ApiException
- if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException
- if TwitterTemplate was not created with OAuth credentials.List<Place> search(double latitude, double longitude, PlaceType granularity, String accuracy, String query)
latitude
- the latitudelongitude
- the longitudegranularity
- the minimal granularity of the places to return. If null, the default granularity (neighborhood) is assumed.accuracy
- a radius of accuracy around the given point. If given a number, the value is assumed to be in meters. The number may be qualified with "ft" to indicate feet. If null, the default accuracy (0m) is assumed.query
- a free form text value to help find places by name. If null, no query will be applied to the search.Place
s that the point is withinorg.springframework.social.ApiException
- if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException
- if TwitterTemplate was not created with OAuth credentials.SimilarPlaces findSimilarPlaces(double latitude, double longitude, String name)
latitude
- the latitudelongitude
- the longitudename
- the name that the place is known asSimilarPlaces
collection, including a token that can be used to create a new place.org.springframework.social.ApiException
- if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException
- if TwitterTemplate was not created with OAuth credentials.SimilarPlaces findSimilarPlaces(double latitude, double longitude, String name, String streetAddress, String containedWithin)
latitude
- the latitudelongitude
- the longitudename
- the name that the place is known asstreetAddress
- the place's street address. May be null.containedWithin
- the ID of the place that the place is contained withinSimilarPlaces
collection, including a token that can be used to create a new place.org.springframework.social.ApiException
- if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException
- if TwitterTemplate was not created with OAuth credentials.Place createPlace(PlacePrototype placePrototype)
placePrototype
- the place prototype returned in a SimilarPlaces
from a call to findSimilarPlaces()Place
object with the newly created place dataorg.springframework.social.ApiException
- if there is an error while communicating with Twitter.org.springframework.social.MissingAuthorizationException
- if TwitterTemplate was not created with OAuth credentials.