A PHP implementation of the Nova Poshta API via Guzzle.
This project currently implements the Cities & Warehouses List.
You will need an API Key to run the examples. You can get them from Nova Poshta user cabinet https://my.novaposhta.ua/settings/index#apikeys. Note: you should be registered to do so.
use Drupalway\NovaPoshta\NovaPoshtaClient;
$api = NovaPoshtaClient::factory([
'defaults' => [
'api_key' => YOUR_API_KEY,
]
]);
use Drupalway\NovaPoshta\NovaPoshtaClient;
$api = NovaPoshtaClient::factory([
'defaults' => [
'api_key' => YOUR_API_KEY,
]
]);
$cities = $api->getCities();
$cities = $api->getCities([
'filters' => [
'search_text' => 'Ки',
]]);
- PHP 5.4
- php5-curl (suggested, unless you want to use a custom adapter)
Guzzle does most of the heavy lifting. This project is really just an elaborate Guzzle Services config.
MIT