addresses-and-postcodes / lookup-php-sdk
Addresses and Postcodes - Lookup PHP SDK
dev-develop
2022-09-03 12:47 UTC
Requires
- php: ^7.4
- league/booboo: ^2.1
- mzdr/oh-snap: ^1.0
- php-http/client-common: ^2.5
- php-http/discovery: ^1.14
- php-http/httplug: ^2.3
- psr/http-client: ^1.0
- psr/http-client-implementation: ^1.0
- psr/http-factory: ^1.0
- symfony/dotenv: ^5.4
Requires (Dev)
- guzzlehttp/psr7: ^2.4
- laminas/laminas-diactoros: ^2.14
- php-http/curl-client: ^2.2
- php-http/message: ^1.13
- phpstan/phpstan: ^1.8
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: ^3.7
- symfony/var-dumper: ^5.1
This package is not auto-updated.
Last update: 2024-11-11 21:42:22 UTC
README
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
- PHP >= 7.4
- A HTTP client
- A PSR-7 implementation
- (optional) PHPUnit to run tests.
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