private static void Weather2020API()
        {
            string city = "Los Angeles";

            /**** Weather2020 ****/
            Weather2020Controller weather2020Controller = new Weather2020Controller();

            /**** FORECAST****/
            Console.WriteLine("***** Forecast API *****");
            Console.WriteLine($"Forecast for {city}: ");
            foreach (Weather2020Forecast forecast in weather2020Controller.getForecast(city))
            {
                Console.WriteLine($"{forecast.getDateTime().ToString()} Temp-High: {forecast.getTemperatureHigh()} Temp-Low: {forecast.getTemperatureLow()}");
            }
        }
예제 #2
0
        static void w2020ForecastAPI()
        {
            Out output = new Out();

            Weather2020Controller w2020Controller = new Weather2020Controller();

            output.outputToConsole("***** Weather2020 Forecast *****");

            string cityName = "Stuart";

            foreach (Weather2020Forecast forecast in w2020Controller.getForecast(cityName))
            {
                output.outputToConsole($"{forecast.dateTime} Minimum: {forecast.min_temp} Maximum: {forecast.max_temp}");
            }
        }
예제 #3
0
        private static void Weather2020API()
        {
            string cityName = "Stuart";

            Weather2020Controller weather2020Controller = new Weather2020Controller();

            Console.WriteLine("**** Weather2020 ****");

            /**** FORECAST****/
            Console.WriteLine("***** Forecast API *****");
            Console.WriteLine($"Forecast for {cityName}: ");
            foreach (Weather2020Forecast forecast in weather2020Controller.getForecast(cityName))
            {
                Console.WriteLine($"{forecast.getDateTime().ToString()} Minimum: {forecast.getMinimum()} Maximum: {forecast.getMaximum()}");
            }
        }
예제 #4
0
        static void weather2020ForecastAPI()
        {
            Out output = new Out();

            Weather2020Controller weather2020Controller = new Weather2020Controller();

            output.outputToConsole("\n**** Weather2020 Forecast ****");

            AccuWeatherController accuWeatherController = new AccuWeatherController();

            string position = accuWeatherController.getLocationGeoPosition("Los Angeles");

            foreach (Weather2020Forecast forecast in weather2020Controller.getForecast(position))
            {
                output.outputToConsole($"Date: {forecast.getDateTime()} Minimum: {forecast.getMinimum()} Maximum: {forecast.getMaximum()}");
            }
        }