php-extended / php-api-fr-gouv-ensap-object
An implementation of the php-api-fr-gouv-ensap-interface library
Requires
Requires (Dev)
- dev-master
- 7.0.5
- 7.0.4
- 7.0.3
- 7.0.2
- 7.0.1
- 7.0.0
- 6.3.4
- 6.3.3
- 6.3.2
- 6.3.1
- 6.3.0
- 6.2.1
- 6.2.0
- 6.1.10
- 6.1.9
- 6.1.8
- 6.1.7
- 6.1.6
- 6.1.5
- 6.1.4
- 6.1.3
- 6.1.2
- 6.1.1
- 6.1.0
- 6.0.0
- 5.0.0
- 4.0.4
- 4.0.3
- 4.0.2
- 4.0.1
- 4.0.0
- 3.1.10
- 3.1.9
- 3.1.8
- 3.1.7
- 3.1.6
- 3.1.5
- 3.1.4
- 3.1.3
- 3.1.2
- 3.1.1
- 3.1.0
- 3.0.17
- 3.0.16
- 3.0.15
- 3.0.14
- 3.0.13
- 3.0.12
- 3.0.11
- 3.0.10
- 3.0.9
- 3.0.8
- 3.0.7
- 3.0.6
- 3.0.5
- 3.0.4
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
This package is auto-updated.
Last update: 2024-10-31 00:19:47 UTC
README
A php API wrapper to connect to ensap.gouv.fr instances
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-ensap-object ^7
Basic Usage
This library may be used the following way. First, we need to log in, this needs the NIR number (no_secu) and the associated password.
use PhpExtended\EnsapGouvFr\EnsapApiEndpoint;
/* @var $client \Psr\Http\Client\ClientInterface */
/* @var $uriFactory \Psr\Http\Message\UriFactory */
/* @var $requestFactory \Psr\Http\Message\RequestFactory */
$endpoint = new EnsapApiEndpoint($client, $uriFactory, $requestFactory);
// first, we need to log in
$endpoint->login('<no_secu>', '<password>');
Next, you can retrieve the list of recent events :
$endpoint->getDataAccueilConnecte(); // returns EnsapApiAccueilConnecte object
Or you can retreive the list of documents for your remuneration :
$endpoint->getDataRemuneration(); // returns EnsapApiRemuneration object
Finally, you can get the raw data of the documents in both objects by using their uuid :
$endpoint->getRawDocument($documentUuid); // returns EnsapApiRawDocument object
There also exists an experimental parser for bulletin pdf files.
$endpoint->getBulletinFromRawDocument(EnsapApiRawDocument $document); // returns EnsapApiBulletin object
As this parser is experimental, it may fail (and throw \RuntimeException
s) even
if the pdf is a perfectly human readable pdf file. Test it on your pdf files and
give me a pull request for it to be improved !
Wants to be working with the versions of the pdf generator :
- PAY18E - V1.4 - 25102016 (since dec 2016)
- PAY18E - V1.6 - 04122017 (since feb 2018)
- PAY18E - V2.0 - 26062018 (since oct 2018)
- PAY18E - V2.1 - 28112018 (since dec 2018)
- PAY18E - V2.3 - 29032019 (since apr 2019)
License
MIT (See license file).