matthewbdaly / postcode-client
邮编查询客户端。
0.0.3
2017-11-28 12:14 UTC
Requires
- php-http/client-implementation: ^1.0
- php-http/discovery: ^1.0
- php-http/httplug: ^1.0
- php-http/message-factory: ^1.0
- psr/http-message: ^1.0
Requires (Dev)
- guzzlehttp/psr7: ^1.0
- php-http/message: ^1.0
- php-http/mock-client: ^1.0
- phpspec/phpspec: ^3.2
- psy/psysh: ^0.8.0
- squizlabs/php_codesniffer: ^2.7
This package is auto-updated.
Last update: 2024-08-28 07:12:53 UTC
README
邮编查询客户端。使用 Ideal Postcodes 查询英国邮编。您需要获取一个API密钥才能使用它。
安装
composer require matthewbdaly/postcode-client
此库使用 HTTPlug 来发送HTTP请求,因此您还需要安装 一个客户端或适配器。
使用方法
<?php
require 'vendor/autoload.php';
use Matthewbdaly\Postcode\Client;
$client = new Client();
$response = $client->setKey('<MY_API_KEY>')
->get('ID1 1QD');