twitter4j.api

## Interface PlacesGeoResourcesAsync

All Known Subinterfaces:
  AsyncTwitter

    public interface PlacesGeoResourcesAsync

Since:
  Twitter4J 2.1.1
Author:
  Yusuke Yamamoto - yusuke at mac.com

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `getGeoDetails(String id)` Find out more details of a place that was returned from the `reverseGeoCode(twitter4j.GeoQuery)` method.
`void` `getSimilarPlaces(GeoLocation location, String name, String containedWithin, String streetAddress)` Locates places near the given coordinates which are similar in name.
`void` `reverseGeoCode(GeoQuery query)` Search for places (cities and neighborhoods) that can be attached to a statuses/update.
`void` `searchPlaces(GeoQuery query)` Search for places that can be attached to a statuses/update.

### Method Detail

#### getGeoDetails

    void getGeoDetails(String id)

Find out more details of a place that was returned from the `reverseGeoCode(twitter4j.GeoQuery)` method.
This method calls https://api.twitter.com/1.1/geo/id/:id.json

Parameters:
  `id` - The ID of the location to query about.
Since:
  Twitter4J 2.1.1
See Also:
  GET geo/id/:place_id | Twitter Developers

#### getSimilarPlaces

    void getSimilarPlaces(GeoLocation location,
                          String name,
                          String containedWithin,
                          String streetAddress)

Locates places near the given coordinates which are similar in name.
Conceptually you would use this method to get a list of known places to choose from first. Then, if the desired place doesn't exist, make a request to post/geo/place to create a new one.
The token contained in the response is the token needed to be able to create a new place.
This method calls https://api.twitter.com/1.1/geo/similar_places.json

Parameters:
  `location` - The latitude and longitude to search around.
  `name` - The name a place is known as.
  `containedWithin` - optional: the place_id which you would like to restrict the search results to. Setting this value means only places within the given place_id will be found.
  `streetAddress` - optional: This parameter searches for places which have this given street address. There are other well-known, and application specific attributes available. Custom attributes are also permitted. Learn more about Place Attributes.
Since:
  Twitter4J 2.1.7

#### reverseGeoCode

    void reverseGeoCode(GeoQuery query)

Search for places (cities and neighborhoods) that can be attached to a statuses/update. Given a latitude and a longitude, return a list of all the valid places that can be used as a place_id when updating a status. Conceptually, a query can be made from the user's location, retrieve a list of places, have the user validate the location he or she is at, and then send the ID of this location up with a call to statuses/update.
There are multiple granularities of places that can be returned -- "neighborhoods", "cities", etc. At this time, only United States data is available through this method.
This API call is meant to be an informative call and will deliver generalized results about geography.
This method calls https://api.twitter.com/1.1/geo/reverse_geocode.json

Parameters:
  `query` - search query
Since:
  Twitter4J 2.1.1
See Also:
  GET geo/reverse_geocode | Twitter Developers

#### searchPlaces

    void searchPlaces(GeoQuery query)

Search for places that can be attached to a statuses/update. Given a latitude and a longitude pair, an IP address, or a name, this request will return a list of all the valid places that can be used as the place_id when updating a status.
Conceptually, a query can be made from the user's location, retrieve a list of places, have the user validate the location he or she is at, and then send the ID of this location with a call to statuses/update.
This is the recommended method to use find places that can be attached to statuses/update. Unlike geo/reverse_geocode which provides raw data access, this endpoint can potentially re-order places with regards to the user who is authenticated. This approach is also preferred for interactive place matching with the user.
This method calls https://api.twitter.com/1.1/geo/search.json

Parameters:
  `query` - search query
Since:
  Twitter4J 2.1.7
See Also:
  GET geo/search | Twitter Developers