public void get_all_temperature_for_a_position_a_given_day() { var service = new SmhiService(); var result = service.GetMetereologicalForecast(13.846M, 58.390M).Result; List <TimeTemp> timetemps = service.FilterTemperature(result, DateTime.Now); }
public void get_temperature_for_first_timeserie_better() { var service = new SmhiService(); var result = service.GetMetereologicalForecast(13.846M, 58.390M).Result; DateTime time = result.timeSeries[0].validTime; Parameter param = result.timeSeries[0].parameters.Single(p => p.name == "t"); decimal temperature = param.values[0]; }
public void get_temperature_for_first_timeserie() { var service = new SmhiService(); Rootobject result = service.GetMetereologicalForecast(13.846M, 58.390M).Result; // Skövde Timesery firstTimeSeries = result.timeSeries[0]; DateTime time = result.timeSeries[0].validTime; // klockslag decimal value = result.timeSeries[0].parameters[11].values[0]; //värde(temperatur) (om temperaturen fortfarande är på position 11) string paramname = result.timeSeries[0].parameters[11].name; // namn ("t") }
public void get_forecast_as_object_longlat() { var service = new SmhiService(); Rootobject forecast = service.GetMetereologicalForecast(57.84528M, 12.96771M).Result; }