Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/api-postcode/php-client

PHP Api Client using Curl
https://github.com/api-postcode/php-client

api client curl json php postcode

Last synced: about 5 hours ago
JSON representation

PHP Api Client using Curl

Awesome Lists containing this project

README

        

Api Postcode PHP Client
=======================

A PHP client for fetching address detials from https://api-postcode.nl

Installation
------------
Installation is a quick step process:

1. Download the client with composer

### Step 1: Download php-client using composer

``` bash
$ composer require api-postcode/php-client
```

Usage
-----
``` php
$token = 'secret-token';
$client = new ApiPostcode\Client\PostcodeClient($token);

$address = $client->fetchAddress('1082MD', 34);

$address->getStreet(); // Claude Debussylaan
$address->getCity(); // Amsterdam
$address->getHouseNumber(); // 34
$address->getZipCode(); // 1082MD
$address->getLatitude(); // 52.3377074
$address->getLongitude(); // 4.8719565
```