Beispiel #1
0
        static void weatherBitMapForecastAPI()
        {
            Out output = new Out();

            WeatherBitController weatherBitController = new WeatherBitController();

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

            string cityName = "Valletta";

            output.outputToConsole($"Forecast weather for: {cityName}");
            foreach (WeatherBitForecast forecast in weatherBitController.getForecastList(cityName, EndpointType.FORECAST))
            {
                output.outputToConsole($"Date/Time: {forecast.dateTime.ToString("yyyy-MM-dd")} Min: {forecast.min_temp} Max: {forecast.max_temp}");
            }
            weatherBitController.getForecastList(cityName, EndpointType.FORECAST);
        }
Beispiel #2
0
        static void weatherBitForecastAPI()
        {
            Out output = new Out();
            WeatherBitController weatherBitController = new WeatherBitController();

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

            string cityName = "Valletta";

            output.outputToConsole($"*** Forecast for: {cityName} ***");

            foreach (WeatherBitForecast forecast in weatherBitController.getForecastList(cityName))
            {
                output.outputToConsole($"Date: {forecast.dateTime} Temperature: {forecast.temperature}");
            }
        }