Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kstkn/yii2-dadata
Yii 2 binding for gietos/dadata
https://github.com/kstkn/yii2-dadata
Last synced: about 2 months ago
JSON representation
Yii 2 binding for gietos/dadata
- Host: GitHub
- URL: https://github.com/kstkn/yii2-dadata
- Owner: kstkn
- License: mit
- Created: 2015-11-16T16:34:04.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-04-08T08:00:34.000Z (over 8 years ago)
- Last Synced: 2024-10-16T12:22:47.413Z (2 months ago)
- Language: PHP
- Homepage:
- Size: 2.93 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Yii2 Dadata API client
======================A PHP library for the DaData.ru REST API
[![Latest Stable Version](https://poser.pugx.org/gietos/yii2-dadata/version)](https://packagist.org/packages/gietos/yii2-dadata)
[![Total Downloads](https://poser.pugx.org/gietos/yii2-dadata/downloads)](https://packagist.org/packages/gietos/yii2-dadata)
[![License](https://poser.pugx.org/gietos/yii2-dadata/license)](https://packagist.org/packages/gietos/yii2-dadata)[API documentation](https://dadata.ru/api/clean/)
## Installation
The suggested installation method is via [composer](https://getcomposer.org/):
```sh
composer require gietos/yii2-dadata
```## Usage
In config:
``` php
'components' => [
// ...
'dadata' => [
'class' => '\gietos\yii\Dadata\Client',
'token' => '...',
'secret' => '...',
],
],
```Example usage:
``` php
use gietos\yii\Dadata\Client;/** @var Client $client */
$client = \Yii::$app->dadata;$address = $client->cleanAddress('msk, tverskaya, 1');
echo 'Result: ' . $address->result . PHP_EOL;
```[More documentation](https://github.com/gietos/dadata/blob/master/README.md)