예제 #1
0
        public void get_all_temperatures_for_a_position_a_given_day()
        {
            var service = new SmhiService();
            var result  = service.GetMeteorologicalForecast(11.9751M, 57.7087M).Result;

            List <TimeTemp> timeTemps = service.FilterTemperature(result, DateTime.Now);
        }
예제 #2
0
        public void ExtractInfoFromForecast()
        {
            var service = new SmhiService();

            decimal longitud = 11.9751m;
            decimal latitud  = 57.7087m;

            Rootobject result = service.GetMeteorologicalForecast(longitud, latitud).Result;
            //Parameter param = rootObject.timeSeries[0].parameters.Single(p => p.name == "t");
            //decimal temp = param.values[0];
            DateTime time = result.timeSeries[0].validTime;
            decimal  temp = result.timeSeries[0].parameters[11].values[0];
        }