BoxKite.Twitter.TrendsExtensions.GetTrendsByLocation C# (CSharp) Метод

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

Returns the locations that Twitter has trending topic information for, closest to a specified location.
ref: https://dev.twitter.com/docs/api/1.1/get/trends/closest
public static GetTrendsByLocation ( this session, double latitude = 0.0, double longitude = 0.0 ) : Task>
session this
latitude double If provided with a long parameter the available trend locations will be sorted by distance, nearest to furthest, to the co-ordinate pair.
longitude double If provided with a lat parameter the available trend locations will be sorted by distance, nearest to furthest, to the co-ordinate pair.
Результат Task>
        public static async Task<TwitterResponseCollection<TrendsAvailableLocationsResponse>> GetTrendsByLocation(
            this ITwitterSession session, double latitude = 0.0,
            double longitude = 0.0)
        {
            var parameters = new TwitterParametersCollection
                             {
                                 {"lat", latitude.ToString()},
                                 {"long", longitude.ToString()},
                             };

            return await session.GetAsync(TwitterApi.Resolve("/1.1/trends/closest.json"), parameters)
                .ContinueWith(c => c.MapToMany<TrendsAvailableLocationsResponse>());
        }
    }