mediapart / lapresselibre
此包已被废弃,不再维护。未建议替代包。
La Presse Libre项目的非官方客户端API
v2.0.1
2017-11-17 08:27 UTC
Requires
- php: ^5.6|^7.0
- ext-hash: *
- ext-json: *
- ext-openssl: *
- psr/http-message: ^1.0
- psr/log: ^1.0
- symfony/options-resolver: ^2.8|^3.3
Requires (Dev)
- phpunit/phpunit: ^5.7|^6.3
- zendframework/zend-diactoros: ^1.4
Suggests
- monolog/monolog: Allows more advanced logging of the application flow
This package is auto-updated.
Last update: 2023-03-07 13:42:41 UTC
README
项目La Presse Libre的非官方PHP SDK。与NextINpact提供的官方包相比,区别在于兼容PSR4、PSR7和php7环境。
使用
$account_always_exists = function ($data, $is_testing) use ($public_key) { $now = new DateTime('next year'); return [ 'Mail' => $data['Mail'], 'CodeUtilisateur' => $data['CodeUtilisateur'], 'TypeAbonnement' => SubscriptionType::MONTHLY, 'DateExpiration' => $now->format("Y-m-d\TH:i:sO"), 'DateSouscription' => $now->format("Y-m-d\TH:i:sO"), 'AccountExist' => true, 'PartenaireID' => $public_key, ]; }; $verification = Endpoint::answer(Verification::class, $account_always_exists);
每个端点的详细示例可在examples/中找到。
安装
只需使用Composer安装此包。
composer require mediapart/lapresselibre
阅读更多
- 官方
La Presse Libre
文档(法语)。