computerminds / ecoes-api
API client for the ECOES API.
Installs: 11 096
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- gimler/guzzle-description-loader: dev-fb-update-symfony-packages
- guzzlehttp/guzzle-services: ^1.1.3
This package is auto-updated.
Last update: 2024-10-24 12:14:23 UTC
README
This library provides an API client for communicating with the ECOES API.
It uses Guzzle as a the underlying HTTP client.
Making requests
SearchUtilityAddress
$ecoes = new Ecoes\Api('API KEY GOES HERE');
$request = new Ecoes\SearchUtilityAddress\Request('POSTCODE');
// $matches will be an array of matching addresses.
$matches = $ecoes->SearchUtilityAddress($request)->getUtilityAddressMatches();
GetTechnicalDetailsByMpan
$ecoes = new Ecoes\Api('API KEY GOES HERE');
$request = new Ecoes\GetTechnicalDetailsByMpan\Request('MPAN');
// $matches will be an array of matching MPANs.
$matches = $ecoes->GetTechnicalDetailsByMpan($request)->getUtilityMatches();
// $match will be an array of a single matched MPAN.
$match = $ecoes->GetTechnicalDetailsByMpan($request)->getUtilityMatch();