1. Go to this page and download the library: Download filippo-toso/api-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
filippo-toso / api-sdk example snippets
use FilippoToso\Api\Sdk\Sdk;
class Windy extends Sdk
{
public function list(): ListEndpoint
{
return new ListEndpoint($this);
}
}
use FilippoToso\Api\Sdk\Endpoint;
use FilippoToso\Api\Sdk\Support\Response;
class ListEndpoint extends Endpoint
{
public function nearby($latitude, $longitude, $radius = 10): Response
{
return $this->get('/list/nearby=' . $latitude . ',' . $longitude . ',' . $radius . '?' . http_build_query($this->params([
'show' => 'webcams:location,image',
])));
}
}