public async Task <Measurement> GetMeasurmentNearestAsync(double lat, double lng, double maxDistance = 3, IndexQueryType type = IndexQueryType.AirlyCAQI) { return(await Api.Request <Measurement>("measurements/nearest", "GET", new { lat, lng, maxDistanceKM = ParamsValidator.InfinityToDouble(maxDistance), indexType = ResolveIndexType(type) })); }
public async Task <List <Installation> > GetInstallationsNearestAsync(double lat, double lng, double maxDistance = 3, int maxResults = 1) { return(await Api.Request <List <Installation> >("installations/nearest", "GET", new { lat, lng, maxDistanceKM = ParamsValidator.InfinityToDouble(maxDistance), maxResults })); }