php-extended/php-api-fr-gouv-datatourisme-producteur-object

A library that implements the php-extended/php-api-fr-gouv-datatourisme-producteur-interface library


README

A library that implements the php-extended/php-api-fr-gouv-datatourisme-producteur-interface library.

coverage build status

Installation

The installation of this library is made via composer. Download composer.phar from their website. Then add to your composer.json :

	"require": {
		...
		"php-extended/php-api-fr-gouv-datatourisme-producteur-object": "^3",
		...
	}

Then run php composer.phar update to install this library. The autoloading of all classes of this library is made through composer's autoloader.

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).