static Map openWeatherMap_maxTempForecast(S cityName) { S url = "http://api.openweathermap.org/data/2.5/forecast"; S xml = loadPageWithParams(url, APPID := openWeatherMapAPIKey(), q := cityName, mode := "xml"); new TreeMap maxPerDay; for (L tTime : findContainerOrEmptyTag(xml, "time")) { S from = tagParam(tTime, "from"); S day = takeFirst(from, lastIndexOf(from, "T")); L tTemperature = first(findContainerOrEmptyTag(tTime, "temperature")); int maxTemp = iround(kelvinToCelsius(parseDouble(tagParam(tTemperature, "max")))); maxPerDay.put(day, max(maxTemp, toInt(maxPerDay.get(day)))); } ret maxPerDay; }