Skip to content

Latest commit

 

History

History
47 lines (33 loc) · 1.12 KB

README.md

File metadata and controls

47 lines (33 loc) · 1.12 KB

Yii2 Dadata API client

A PHP library for the DaData.ru REST API

Latest Stable Version Total Downloads License

API documentation

Installation

The suggested installation method is via composer:

composer require gietos/yii2-dadata

Usage

In config:

'components' => [
    // ...
    'dadata' => [
        'class' => '\gietos\yii\Dadata\Client',
        'token' => '...',
        'secret' => '...',
    ],
],

Example usage:

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