static void accuWeatherCurrentConditionsAPI() { Out output = new Out(); AccuWeatherController accuWeatherController = new AccuWeatherController(); output.outputToConsole("\n**** AccuWeather Current Conditions ****"); string cityName = "Valletta"; output.outputToConsole($"Location key for city {cityName} is {accuWeatherController.getCurrentWeather(cityName)}"); }
static void accuweatherCurrentConditionsAPI() { Out output = new Out(); AccuWeatherController accuweatherController = new AccuWeatherController(); output.outputToConsole("***** Accuweather Current Conditions *****"); string cityName = "Valletta"; output.outputToConsole($"Temperature for {cityName}: {accuweatherController.getCurrentWeather(cityName)}"); }
private static void AccuWeatherAPI() { string cityName = "Valletta"; /**** AccuWeather ****/ /**** Current Weather ****/ AccuWeatherController accuWeatherController = new AccuWeatherController(); Console.WriteLine("***** AccuWeather *****"); Console.WriteLine("***** Current Weather API *****"); Console.WriteLine($"Current Temperature for {cityName}: {accuWeatherController.getCurrentWeather(cityName)}"); /**** FORECAST****/ Console.WriteLine("***** Forecast API *****"); Console.WriteLine($"Forecast for {cityName}: "); foreach (AccuWeatherForecast forecast in accuWeatherController.getForecast(cityName)) { Console.WriteLine($"{forecast.getDateTime().ToString()} Minimum: {forecast.getMinimum()} Maximum: {forecast.getMaximum()}"); } }