Git Product home page Git Product logo

gleif-sdk's Introduction

GLEIF-SDK for PHP

The GLEIF-SDK provides a simple and object-oriented way for interaction with the GLEIF-API powered by Saloon for PHP.

Installation

You can install the package via composer:

composer require k2oumais/gleif-sdk

You can publish the config file with:

php artisan vendor:publish --tag="gleif-sdk-config"

This is the contents of the published config file:

return [
    'gleif-api' => [
        'url' => 'https://api.gleif.org/api',
    ],
];

Usage

$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();

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

The MIT License (MIT). Please see License File for more information.

gleif-sdk's People

Contributors

k2oumais avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.