philwc/companies-house

There is no license information available for the latest version (0.0.1) of this package.

A client for the companies house API

0.0.1 2017-04-11 13:06 UTC

This package is not auto-updated.

Last update: 2024-04-27 17:48:09 UTC


README

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

Example

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...
}