BoxKite.Twitter.PlacesGeoExtensions.GetPlaceIDFromGeocode C# (CSharp) Метод

GetPlaceIDFromGeocode() публичный статический Метод

Given a latitude and a longitude, searches for up to 20 places that can be used as a place_id when updating a status.
ref: https://dev.twitter.com/docs/api/1.1/get/geo/reverse_geocode
public static GetPlaceIDFromGeocode ( this session, double latitude = 0.0, double longitude = 0.0, string accuracy = "10m", string granularity = "neighborhood", int maxResults = 20 ) : Task
session this
latitude double The latitude to search around.
longitude double The longitude to search around.
accuracy string 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.
granularity string This is the minimal granularity of place types to return and must be one of: poi, neighborhood, city, admin or country.
maxResults int A hint as to the number of results to return.
Результат Task
        public static async Task<ReverseGeoCodePlaces> GetPlaceIDFromGeocode(this IUserSession session, double latitude = 0.0,
            double longitude = 0.0, string accuracy = "10m", string granularity = "neighborhood", int maxResults=20)
        {
            var parameters = new TwitterParametersCollection
                             {
                                 {"lat", latitude.ToString()},
                                 {"long", longitude.ToString()},
                                 {"accuracy", accuracy},
                                 {"granularity", granularity},
                                 {"max_results", maxResults.ToString()}
                             };

            return await session.GetAsync(TwitterApi.Resolve("/1.1/geo/reverse_geocode.json"), parameters)
                          .ContinueWith(c => c.MapToSingle<ReverseGeoCodePlaces>());
 
        }