philwc / companies-house

此包最新版本(0.0.1)无可用许可证信息。

companies house API 客户端

0.0.1 2017-04-11 13:06 UTC

This package is not auto-updated.

Last update: 2024-09-28 20:35:41 UTC


README

API 文档: https://developer.companieshouse.gov.uk/api/docs/index.html

示例

require_once __DIR__ . '/vendor/autoload.php';

$apiKey = 'API KEY HERE';

/** @var \philwc\Call\Search\Name $nameSearch */
$nameSearch = \philwc\CompaniesHouseFactory::get('Search', 'Name', $apiKey);
/** @var \philwc\Call\Search\Number $numberSearch */
$numberSearch = \philwc\CompaniesHouseFactory::get('Search', 'Number', $apiKey);

$results = $nameSearch->search('cast uk');
/** @var \philwc\Entity\CompanySearch $result */
foreach ($results as $result) {
    /** @var \philwc\Entity\CompanyProfile $company */
    $company = $numberSearch->search($result->getCompanyNumber());

    // Do something with company...
}