public async Task <DancerResponse> Dancing(float latitude, float longitude) { var weather = await GetWeather(latitude, longitude); var random = new Random(); var randomBirds = random.Next(100) < 10; var dancer = new DancerResponse() { Lat = latitude, Lng = longitude, HasBirds = randomBirds, Weather = new WeatherResponse() { WindDirection = WindDirection.WindDegreesToDirection(weather.Wind.Deg), WindDegree = weather.Wind.Deg, WindSpeed = weather.Wind.Speed }, HasDangerDanger = IsDangerDanger(weather), HasNoFlyZone = await _noFlyingBusiness.IsInNoFlyZone(latitude, longitude), MaxHeight = 1000, }; return(dancer); }
public async Task <WeatherResponse> GetParsed(float latitude, float longitude) { var weather = await GetWeather(latitude, longitude); return(new WeatherResponse() { WindDirection = WindDirection.WindDegreesToDirection(weather.Wind.Deg), WindDegree = weather.Wind.Deg, WindSpeed = weather.Wind.Speed }); }