static void climaRealtime() { Out output = new Out(); ClimaWeatherController climaWeatherController = new ClimaWeatherController(); output.outputToConsole("***** ClimaWeather Weather *****"); string cityName = "Valletta"; ClimaRealTimeModel crtm = climaWeatherController.getWeather(cityName, EndpointType.CURRENT); output.outputToConsole($"In {cityName} current temp is: {crtm.temp.value}"); }
static void climaForecast() { Out output = new Out(); ClimaWeatherController climaWeatherController = new ClimaWeatherController(); output.outputToConsole("***** ClimaForecast *****"); string cityName = "Valletta"; output.outputToConsole(cityName + " Forecast"); foreach (ClimaForecast forecast in climaWeatherController.getForecast(cityName, EndpointType.FORECAST)) { output.outputToConsole($"Date: {forecast.dateTime} MIN:{forecast.min_temp} MAX: {forecast.max_temp}"); } }