k2oumais / gleif-sdk
使用 Saloon v2 开发的 GLEIF-SDK
0.5.5
2023-03-25 15:44 UTC
Requires
- php: ^8.1|^8.2
- illuminate/contracts: ^10.0
- sammyjo20/saloon: ^2.0
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.9
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
README
GLEIF-SDK 提供了一种简单且面向对象的与由 GLEIF-API 驱动的 Saloon 进行交互的方法,适用于 PHP。
安装
您可以通过 composer 安装此包
composer require k2oumais/gleif-sdk
您可以使用以下命令发布配置文件
php artisan vendor:publish --tag="gleif-sdk-config"
这是发布配置文件的内容
return [ 'gleif-api' => [ 'url' => 'https://api.gleif.org/api', ], ];
使用方法
$gleif = new \K2ouMais\Gleif\GleifApi(); ###### LEI-Records >> LVL1-Information $gleif->send(new AllLeiRecords())->json(); $gleif->send(new LeiRecordById('5299000J2N45DDNE4Y28'))->json(); ###### LEI-Records >> LVL2-Relationship Information >> Parents // Get Direct/Ultimate Parent LEI, Relationships and Exceptions $gleif->send(new DirectParentLeiRecord('ZZG38T0MDR3QY1ETUA76'))->json(); $gleif->send(new UltimateParentLeiRecord('01TRDHWDCL69YP41S025'))->json(); $gleif->send(new DirectParentRelationships('549300COKYB5EGSU1838'))->json(); $gleif->send(new UltimateParentRelationships('0292003540H0S4VA7A50'))->json(); $gleif->send(new DirectParentReportingExceptions('001GPB6A9XPE8XJICC14'))->json(); $gleif->send(new UltimateParentReportingExceptions('001GPB6A9XPE8XJICC14'))->json(); ###### LEI-Records >> LVL2-Relationship Information >> Children // Get Direct/Ultimate Children and Child Relationships $gleif->send(new DirectChildren('001GPB6A9XPE8XJICC14'))->json(); $gleif->send(new UltimateChildren('001GPB6A9XPE8XJICC14'))->json(); $gleif->send(new DirectChildRelationships('ZZG38T0MDR3QY1ETUA76'))->json(); $gleif->send(new UltimateChildRelationships('01TRDHWDCL69YP41S025'))->json(); ###### LEI-Records >> Related LEI Records // Get an Associated Entity, Successor Entity or the Managing LOU $gleif->send(new AssociatedEntity('335800OGLWMREXSGH297'))->json(); $gleif->send(new SuccessorEntity('029200098C3K8BI2D551'))->json(); $gleif->send(new ManagingLou('5493001KJTIIGC8Y1R12'))->json(); ###### LEI-Records >> ISINs // Get ISINs $gleif->send(new Isins('529900W18LQJJN6SJ336'))->json(); ###### LEI-Records >> LEI Issuer // Get the LEI Issuer $gleif->send(new LeiIssuer('5299000J2N45DDNE4Y28'))->json(); ###### LEI Autocompletions $gleif->send(new AutoCompletions('Apple', 'fulltext'))->json(); ###### LEI Countries, Regions, Jurisdictions, Issuers, Registration Agents and Registration Authorities // Countries $gleif->send(new AllCountryCodes())->json(); $gleif->send(new CountryCodeById('DE'))->json(); // Regions $gleif->send(new AllRegions())->json(); $gleif->send(new RegionById('DE-HE'))->json(); // Jurisdictions $gleif->send(new AllJurisdictions())->json(); $gleif->send(new JurisdictionById('DE'))->json(); // Issuers $gleif->send(new AllLeiIssuers())->json(); $gleif->send(new LeiIssuerById('259400L3KBYEVNHEJF55'))->json(); $gleif->send(new LeiIssuerJurisdictionById('259400L3KBYEVNHEJF55'))->json(); // Registration Agents $gleif->send(new AllRegistrationAgents())->json(); $gleif->send(new RegistrationAgentById('5d10d4de691522.63705283'))->json(); // Registration Authorities $gleif->send(new AllRegistrationAuthorities())->json(); $gleif->send(new RegistrationAuthorityById('RA000001'))->json();
测试
composer test
变更日志
请参阅 CHANGELOG 了解最近的变化。
致谢
许可证
MIT 许可证(MIT)。有关更多信息,请参阅 许可证文件。