2017 © Pedro Peláez
 

library getaddress

A PHP library for the getaddress.io postcode lookup service

image

petelawrence/getaddress

A PHP library for the getaddress.io postcode lookup service

  • Tuesday, September 12, 2017
  • by PeteLawrence
  • Repository
  • 1 Watchers
  • 3 Stars
  • 16,089 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 1 Open issues
  • 7 Versions
  • 9 % Grown

The README.md

getaddress

A PHP library for the getaddress.io postcode lookup service, (*1)

Pre-requisites

You will require a getaddress.io API key. For low use applications (fewer than 20 lookups/day) this is free., (*2)

Usage

$client = new \petelawrence\getaddress\GetAddressClient('YOUR-GETADDRESS.IO-KEY');
$result = $client->lookup('NR10 4JJ');
$address0 = $result->getAddresses()[0];
echo $address0->getTown();

Tests

GETADDRESSKEY=YOUR-GETADDRESS.IO-KEY vendor/bin/phpunit tests/

The Versions