I'm trying to call the weather via api.openweathermap.org/.../onecall, but sometimes it doesn't work correctly.
For me it is temperature_min, temperature_max, rainfall.
Here they attach their code:
function makeForecastWeatherRequest() { var UNITS = (System.getDeviceSettings().temperatureUnits==System.UNIT_STATUTE) ? "imperial" : "metric"; var url = "https://api.openweathermap.org/data/2.5/onecall"; var param = { "lat" => lattitude, "lon" => longitude, "appid" =>"7xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", //"lang" => lang == null ? "en" : lang, "exclude" => "current,minutely,hourly", "units" => UNITS}; var options = { :methods => Communications.HTTP_REQUEST_METHOD_GET, :headers => {"Content-Type" => Communications.REQUEST_CONTENT_TYPE_URL_ENCODED}, :responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON }; System.println("Forecast request "+ url); Communications.makeWebRequest( url, param, options, method(:forecastWeatherCallback)); }