php-extended / php-api-fr-gouv-ensap-object
php-api-fr-gouv-ensap-interface 库的实现
7.0.5
2024-07-31 14:51 UTC
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-08-31 13:03:18 UTC
README
连接到 ensap.gouv.fr 实例的 php API 包装器
安装
此库的安装通过 composer 完成,并且通过其自动加载器自动加载此库的所有类。
- 从其网站下载
composer.phar
。 - 然后运行以下命令将此库作为依赖项安装
php composer.phar require php-extended/php-api-fr-gouv-ensap-object ^7
基本用法
此库可以使用以下方式使用。首先,我们需要登录,这需要 NIR 号码(no_secu)和相关的密码。
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>');
然后,您可以获取最近事件的列表
$endpoint->getDataAccueilConnecte(); // returns EnsapApiAccueilConnecte object
或者您还可以获取您报酬的文档列表
$endpoint->getDataRemuneration(); // returns EnsapApiRemuneration object
最后,您可以通过它们的 uuid 获取文档的原始数据
$endpoint->getRawDocument($documentUuid); // returns EnsapApiRawDocument object
还提供了一个实验性的公告 pdf 文件解析器。
$endpoint->getBulletinFromRawDocument(EnsapApiRawDocument $document); // returns EnsapApiBulletin object
由于此解析器是实验性的,它可能会失败(并抛出 \RuntimeException
),即使 pdf 文件是完全可读的。请在您的 pdf 文件上测试它,并为改进它提供 pull request!
希望与 pdf 生成器的版本一起工作
- PAY18E - V1.4 - 25102016(自 2016 年 12 月起)
- PAY18E - V1.6 - 04122017(自 2018 年 2 月起)
- PAY18E - V2.0 - 26062018(自 2018 年 10 月起)
- PAY18E - V2.1 - 28112018(自 2018 年 12 月起)
- PAY18E - V2.3 - 29032019(自 2019 年 4 月起)
许可
MIT(见许可文件)。