I have created a simple PHP redirect to get data from OpenUV.io without having to use Tasker.
I works fine on a free php-hosting service.
Just needs .htaccess to include these two line:
RewriteEngine On
RewriteRule .* index.php
And then an index.php file with the following:
<?php
$urlStr = 'https://api.openuv.io/api/v1/uv?lat=' . $_GET['lat'] . '&lng=' . $_GET['lng'];
$token = 'x-access-token: ' . $_GET['key'];
$cURLConnection = curl_init($urlStr);
curl_setopt($cURLConnection, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cURLConnection, CURLOPT_HTTPHEADER, array($token));
$apiResponse = curl_exec($cURLConnection);
curl_close($cURLConnection);
$json = json_decode($apiResponse, true);
$jsonArrayResponse = json_decode($apiResponse, true);
echo $apiResponse;
?>
Then you can use WG: $wg('example.host.com/?lat={YOUR-LAT}&lng={YOUR-LNG}&key={YOUR-OPENUV-API-KEY}, json, .result.uv)$ to get your data. This gets uv. You can also get max uv or whatever else openuv.io offers.