PHP code example of vanta / dadata

1. Go to this page and download the library: Download vanta/dadata library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

vanta / dadata example snippets




declare(strict_types=1);

use GuzzleHttp\Psr7\HttpFactory;
use Symfony\Component\HttpClient\CurlHttpClient;
use Symfony\Component\HttpClient\Psr18Client;
use Vanta\Integration\DaData\RestClientBuilder;

$results = RestClientBuilder::create(new Psr18Client(new CurlHttpClient(), new HttpFactory, new HttpFactory) ,'<Ваш ключ>', '<Ваш секрет>')
    ->createSuggestAddressClient()
    ->findByText( '630039')
;