lookupReverseGeocodedLocations abstract method
- required double latitude,
- required double longitude,
- int? maxResults,
- String? accuracy,
- GeoGranularity? granularity,
Search for places that can be attached to a Tweet.
Given a latitude and a longitude, searches for up to 20 places that can be used as a place_id when updating a status. This request is an informative call and will deliver generalized results about geography.
Parameters
-
granularity
: This is the minimal granularity of place types to return and must be one of: GeoGranularity.neighborhood, GeoGranularity.city, GeoGranularity.admin or GeoGranularity.country. If no granularity is provided for the request GeoGranularity.neighborhood is assumed. Setting this to GeoGranularity.city, for example, will find places which have a type of GeoGranularity.city, GeoGranularity.admin or GeoGranularity.country. -
maxResults
: 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. -
accuracy
: 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 be0m
. 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.). -
latitude
: The latitude to search around. This parameter will be ignored unless it is inside the range -90.0 to +90.0 (North is positive) inclusive. It will also be ignored if there isn't a correspondinglongitude
parameter -
longitude
: The longitude to search around. The valid ranges for longitude are -180.0 to +180.0 (East is positive) inclusive. This parameter will be ignored if outside that range, if it is not a number, or if there not a correspondinglatitude
parameter.
Authentication Methods
- OAuth 1.0a
Rate Limits
- User rate limit (OAuth 1.0a): 15 requests per 15-minute window per each authenticated user
Endpoint Url
Reference
Implementation
Future<TwitterResponse<List<PlaceData>, void>>
lookupReverseGeocodedLocations({
required double latitude,
required double longitude,
int? maxResults,
String? accuracy,
GeoGranularity? granularity,
});