public WeatherService( IGlobalWeatherService globalWeatherService, IOpenWeatherMapService openWeatherMapService) { _globalWeatherService = globalWeatherService; _openWeatherMapService = openWeatherMapService; }
public WeatherProvider( ILogger <WeatherProvider> logger, ILocationProvider locationProvider, ICacheRepository <WeatherConditions> cacheRepository, IForecastService forecastService, IOpenWeatherMapService openWeatherMapService, IYahooWeatherService yahooWeatherService) : base(logger, cacheRepository) { try { var location = locationProvider.Execute().Result; if (location == null) { _logger.LogError($"{GetType().Name}: Cannot get Location. Weather will disabled."); } else { _serializedLocation = JsonConvert.SerializeObject(location); _operations.Add(yahooWeatherService); _operations.Add(openWeatherMapService); _operations.Add(forecastService); } } catch (Exception e) { _logger.LogError("WeatherProvider", e); throw e; } }
public OpenWeatherMapService() { this.owms = RestService.For <IOpenWeatherMapService>( new HttpClient() { BaseAddress = new Uri(@"https://api.openweathermap.org/data/2.5") }, new RefitSettings { JsonSerializerSettings = Utilities.JsonSettingsUtility.GetSnakeCaseJsonSerializerSettings() } ); }
public TemperatureController(ICityTemperatureRepository cityTempRepository, IOpenWeatherMapService openWeatherMapService) { _cityTempRepository = cityTempRepository; _openWeatherMapService = openWeatherMapService; }
public TemperaturaRepositorio(DataContext contexto, IOpenWeatherMapService servico) { _contexto = contexto; _contexto.Database.EnsureCreated(); _servico = servico; }
public GetSpellsForLocationActionHandler(IOpenWeatherMapService openWeatherMap, IMapper <CurrentWeather, CurrentWeatherRequestDto, CurrentWeatherRequestDto> weatherMapper, ISpellRepository context) { OpenWeatherMap = openWeatherMap; WeatherMapper = weatherMapper; Context = context; }
public WeatherController(IOpenWeatherMapService openWeatherMapService) { _openWeatherMapService = openWeatherMapService; }
public WeatherController() { _openWeatherMapService = new OpenWeatherMapService(); }
public EnvironmentController(IConfiguration configuration, IDataLogService dataLogService, IOpenWeatherMapService openWeatherMapService) { _dataLogService = dataLogService; _openWeatherMapService = openWeatherMapService; _configuration = configuration; }
/// <summary> /// Constructor /// </summary> /// <param name="weatherMapService"></param> /// <param name="dataService"></param> public WeatherFunction(IOpenWeatherMapService weatherMapService, IDataService dataService) { _weatherMapService = weatherMapService; _dataService = dataService; }
public HomeController(IOpenWeatherMapService openWeatherMapService, IWeatherInfoGenerator weatherInfoGenerator, ICSVReader cSVReader) { _openWeatherMapService = openWeatherMapService; _weatherInfoGenerator = weatherInfoGenerator; _csvReader = cSVReader; }
public GetCurrentWeatherActionHandler(IOpenWeatherMapService openWeatherMap, IMapper <CurrentWeather, CurrentWeatherRequestDto, CurrentWeatherRequestDto> mapper) { OpenWeatherMap = openWeatherMap; Mapper = mapper; }