Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kstkn/dadata
A PHP library for the DaData.ru REST API
https://github.com/kstkn/dadata
address-parser dadata phone-number php-library standardization
Last synced: 1 day ago
JSON representation
A PHP library for the DaData.ru REST API
- Host: GitHub
- URL: https://github.com/kstkn/dadata
- Owner: kstkn
- License: mit
- Created: 2015-11-16T16:51:18.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-03-19T13:07:02.000Z (9 months ago)
- Last Synced: 2024-12-16T19:12:20.033Z (8 days ago)
- Topics: address-parser, dadata, phone-number, php-library, standardization
- Language: PHP
- Homepage:
- Size: 104 KB
- Stars: 50
- Watchers: 2
- Forks: 25
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
Dadata API client
=================Non-official PHP library for the DaData.ru REST API
[![Latest Stable Version](https://poser.pugx.org/kstkn/dadata/version)](https://packagist.org/packages/kstkn/dadata)
[![Total Downloads](https://poser.pugx.org/kstkn/dadata/downloads)](https://packagist.org/packages/kstkn/dadata)
[![License](https://poser.pugx.org/kstkn/dadata/license)](https://packagist.org/packages/kstkn/dadata)[API documentation](https://dadata.ru/api/clean/)
## Installation
The suggested installation method is via [composer](https://getcomposer.org/):
```sh
composer require kstkn/dadata
```## Usage
``` php
$client = new Dadata\Client(new \GuzzleHttp\Client(), [
'token' => '...',
'secret' => '...',
]);
```### Clean
``` php
$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('форд фокус')
```