PHP code example of greenplugin / yandex-pdd

1. Go to this page and download the library: Download greenplugin/yandex-pdd 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/ */

    

greenplugin / yandex-pdd example snippets


$pdd = new Constructor('your api key');
$dm = $pdd->getDomainManager('domain.example');

		$response = $dm->get(); 

		$response = $dm->register(); 

		$response = $dm->getStatus(); 

		$response = $dm->getDetails(); 

		$response = $dm->remove(); 

		$response = $dm->setCountry(CountryInterface::COUNTRY_RU); 

		$response = $dm->setDomainLogo('absolute path to file'); 

		$response = $dm->getDomainLogo(); 

		$response = $dm->removeDomainLogo(); 

$error = $dm->getError();