2017 © Pedro Peláez
 

library dadata-client

image

moriony/dadata-client

  • Wednesday, May 27, 2015
  • by moriony
  • Repository
  • 1 Watchers
  • 1 Stars
  • 470 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Dadata.ru API Client

Dadata.ru API client based on Guzzle 5., (*1)

How to use

Add this code into your project. Use yours token and secret provided by dadata.ru, (*2)

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

Now client is ready to use., (*3)

Data clean

See full code here., (*4)

$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:, (*5)


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

Todo

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

The Versions

27/05 2015

dev-master

9999999-dev

  Sources   Download

MIT

The Requires