mariusasensi / meteocat-api-php-client
API client for Meteocat REST API
1.0
2019-08-12 19:06 UTC
Requires
- php: ^7.1
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ~6.0
Requires (Dev)
- phpunit/phpunit: ^7.5
This package is auto-updated.
Last update: 2024-09-19 03:54:31 UTC
README
An unofficial PHP client for easy use of the Meteo.cat API REST.
Documentation of the API can be found at https://apidocs.meteocat.gencat.cat/documentacio/.
As the documentation indicates, to use this provider it is necessary to request the access token from this form.
About the provider
Installation
Use Composer:
$ composer require mariusasensi/meteocat-api-php-client
Usage
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);
Operation query types
License
The MIT License (MIT). Please see License File for more information.