php-extended / php-api-fr-gouv-datatourisme-producteur-object
A library that implements the php-extended/php-api-fr-gouv-datatourisme-producteur-interface library
6.1.8
2023-08-21 19:52 UTC
Requires
Requires (Dev)
This package is auto-updated.
Last update: 2023-09-21 20:05:37 UTC
README
A library that implements the php-extended/php-api-fr-gouv-datatourisme-producteur-interface library.
Installation
The installation of this library is made via composer and the autoloading of all classes of this library is made through their autoloader.
- Download
composer.phar
from their website. - Then run the following command to install this library as dependency :
php composer.phar php-extended/php-api-fr-gouv-datatourisme-producteur-object ^6
Basic Usage
This library may be used the following way :
use PhpExtended\DatatourismeProducteurApi\DtProdApiEndpoint;
use PhpExtended\Endpoint\HttpEndpoint;
/** @var $client \Psr\Http\Client\ClientInterface */
// note : the $client must support cookies, should not follow
// locations, and must have extended timeout
$endpoint = new DtProdApiEndpoint('/tmp/', new HttpClient($client));
$endpoint->login($username, $password);
foreach($endpoint->getTodaysReutilisationStats() as $line)
{
// $line instanceof DtProdApiStatReutilisationLine
// do something with $line
}
License
MIT (See license file).