PHP code example of sitkoru / yandex-direct-api
1. Go to this page and download the library: Download sitkoru/yandex-direct-api 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/ */
sitkoru / yandex-direct-api example snippets
$loader = Registry::registerLoader([$loader, 'loadClass']);
$directApiService = new DirectApiService("ваш токен", "ваш логин");
$criteria = new CampaignsSelectionCriteria();
$criteria->States = [CampaignStateEnum::ON];
$campaigns = $directApiService->getCampaignsService()->get($criteria, CampaignFieldEnum::getValues());