Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/aksi0/yii2-novaposhta

Nova Poshta Api
https://github.com/aksi0/yii2-novaposhta

nova-poshta-api yii2-extension

Last synced: 26 days ago
JSON representation

Nova Poshta Api

Awesome Lists containing this project

README

        

Nova Poshta
===========
Nova Poshta Api

Installation
------------

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist aksi0/yii2-novaposhta "dev-master"
```

or add

```
"aksi0/yii2-novaposhta": "dev-master"
```

to the require section of your `composer.json` file.

Usage
-----

1. Setup configuration:
```php
'components' => [
'novaPoshta' => [
'class' => 'aksi0\novaposhta\NovaPoshta',
'api_key' => '*specify your api key*'
]
]
```
2. Getting/Search cities
```php
$novaPoshta = Yii::$app->novaPoshta;
// get all cities
$cities = $novaPoshta->getAddress()->getCities();
// or search
$cities = $novaPoshta->getAddress()->getCities('Dnipro');
```