addresses-and-postcodes/lookup-php-sdk

Addresses and Postcodes - Lookup PHP SDK

dev-develop 2022-09-03 12:47 UTC

This package is not auto-updated.

Last update: 2022-09-26 11:37:25 UTC


README


68747470733a2f2f616464726573736573616e64706f7374636f6465732e636f2e756b2f6173736574732f696d672f61702d6c6f676f2d6e65772e737667


GitHub

About

This is the official PHP SDK for the Addresses and Postcodes API. It provides a way to list coordinates to produce a polygon and such.

Requirements

Install

Via Composer:

$ composer require addresses-and-postcodes/lookup-php-sdk

Basic usage of Addresses-Postcodes-PHP-SDK client

<?php

// This file is generated by Composer
require_once __DIR__ . '/vendor/autoload.php';

$client = new AddressesAndPostcodes\Lookup\PHP\SDK\Client('API_KEY');
$response = $client->boundaries()->getAreaBoundaryPath('AB');

Tests

WARNING: Before running the tests, please add your api key in tests/TestCase.php

<?php

namespace AddressesAndPostcodes\Lookup\PHP\SDK\Tests;

use AddressesAndPostcodes\Lookup\PHP\SDK\Client;

abstract class TestCase extends \PHPUnit\Framework\TestCase
{
    protected function client(): Client
    {
        return new Client('API_KEY');
    }
}

To run the tests, go to the root folder of the project in terminal and run the following command:

$ composer tests

Documentation

See the doc directory for more detailed documentation.

License

Licensed under the MIT license, see LICENSE