Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/aksi0/yii2-novaposhta
- Owner: Aksi0
- Created: 2017-06-13T14:36:58.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-06-14T09:40:37.000Z (over 7 years ago)
- Last Synced: 2024-10-13T21:44:19.333Z (26 days ago)
- Topics: nova-poshta-api, yii2-extension
- Language: PHP
- Size: 21.5 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Nova Poshta
===========
Nova Poshta ApiInstallation
------------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');
```