PHP code example of mariusasensi / meteocat-api-php-client
1. Go to this page and download the library: Download mariusasensi/meteocat-api-php-client 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/ */
mariusasensi / meteocat-api-php-client example snippets
use Meteocat\Provider\Meteocat;
use Meteocat\Model\Query\Forecast\Forecasting\GetCatalunyaByDate;
use Meteocat\Model\Entity\Forecast;
$client = new Meteocat('your_api_token');
$query = new GetCatalunyaByDate(DateTime::createFromFormat('Y-m-d', '2019-08-06'));
/** @var Forecast $entityResponse */
$response = $client->executeQuery($query);
bash
$ composer