public IWeatherData GetWeatherData(IToponymData toponym) { var request = new ForecastIORequest(_apiKey, (float)toponym.Latitude, (float)toponym.Longitude, Unit.si); var response = request.Get(); return(new ForecastWeatherData(response)); }
public IWeatherData GetWeatherData(IToponymData toponym) { var data = _repository.GetWeatherDataByLatLong(_apiKey, toponym.Latitude.ToString("F2").Replace(',', '.'), toponym.Longitude.ToString("F2").Replace(',', '.')); if (data == null) { throw new NotFoundWeatherDataException(); } return(new ApixuWeatherData(data)); }
public IWeatherData GetWeatherData(IToponymData toponym) { var data = _repository.GetWeatherDataByLatLong(_apiKey, toponym.Latitude.ToString("F2").Replace(',', '.'), toponym.Longitude.ToString("F2").Replace(',', '.')); if (data == null) { throw new NotFoundWeatherDataException(); } return new ApixuWeatherData(data); }
public IWeatherData GetWeatherData(IToponymData Toponym) { return new FakeWeatherData(_random); }
public CityWeatherInfo(IToponymData toponym, IWeatherFromProviderInfo[] weatherFromProvider) { Toponym = toponym; WeatherFromProvider = weatherFromProvider; }
public IWeatherData GetWeatherData(IToponymData toponym) { var request = new ForecastIORequest(_apiKey, (float)toponym.Latitude, (float)toponym.Longitude, Unit.si); var response = request.Get(); return new ForecastWeatherData(response); }
public IWeatherData GetWeatherData(IToponymData Toponym) { return(new FakeWeatherData(_random)); }