Work In Progress, not ready for production use.
$http_client = new GuzzleHttp\Client();
$dadata_auth = new Auth('token', 'secret');
$client = new Client($http_client, $dadata_auth);
// Clean email address: https://dadata.ru/api/clean/email/
$email_cleaner = new EmailCleaner($client);
$result_set = $email_cleaner->clean(['serega@yandex/ru']);
$result_items = $result_set->getResultItems();
if ($result_items->count()) {
$first_result = $result_items->first()->getEmail(); // [email protected]
}
Library requires PHP 7.3.0+.
- You must have any HTTP client or adapter that supports PSR-18.
- Require library TBD (library is not distributable for now).
TBD