Skip to content

moriony/dadata-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dadata.ru API Client

Dadata.ru API client based on Guzzle 5.

How to use

Add this code into your project. Use yours token and secret provided by dadata.ru

$factory = new \Moriony\Dadata\Factory();
$client = $factory->createClient([
    'token' => '***auth token here***',
    'secret' => '***secret key here***'
]);

Now client is ready to use.

Data clean

See full code here.

$response = $client->cleanAddress("мск сухонска 11/-89");
$response = $client->cleanPhone("тел 7165219 доб139");
$response = $client->cleanPassport("4509 235857");
$response = $client->cleanName("Срегей владимерович иванов");
$response = $client->cleanEmail("serega@yandex/ru");
$response = $client->cleanDate("24/3/12");
$response = $client->cleanVehicle("форд фокус");

Multiply data clean

$response = $client->cleanAddresses([
    "мск сухонска 11/-89",
    "воронеж лизюкова 16",
]);

Installing

This project can be installed using Composer. Add the following to your composer.json:

{
    "require": {
        "moriony/dadata-client": "dev-master"
    }
}

Todo

  • clean structure
  • geo location
  • suggests
  • other api methods
  • automated testing

Links

About

Dadata.ru API client based on Guzzle 5

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages