eddypouw / geodata-postal-api
Geodata postal API to find Dutch addresses
1.0.2
2017-05-08 20:08 UTC
Requires
- php: ^7.0
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- phpunit/phpunit: ^6.1
This package is not auto-updated.
Last update: 2024-10-27 03:05:38 UTC
README
PHP client to find Dutch addresses based on postal code and house number.
This library is based on the open geodata from https://nationaalgeoregister.nl.
Usage
Install the latest version via composer:
php composer.phar require eddypouw/geodata-postal-api
Example:
<?php require_once('vendor/autoload.php'); $client = new \GuzzleHttp\Client(['base_uri' => 'https://geodata.nationaalgeoregister.nl/geocoder/Geocoder']); $geodata_api = new \Eddypouw\GeodataPostalApi\GeodataAddressRepository($client); $response = $geodata_api->findByPostal('1509AW', 7); print $response->getStreet() . ' ' . $response->getHouseNumber() . "\n"; print $response->getPostalCode() . ' ' . $response->getMunicipality() . "\n";
Requirements
PHP 7.0.x or above.
License
This library is licensed under the MIT License - see the LICENSE file for details.