nameewgeniy / yandex-direct-api
Client for Yandex.Direct API v5
v2020.10.03
2021-01-21 08:44 UTC
Requires
- php: >=7.1.0
- ext-json: *
- doctrine/annotations: ^1.7
- doctrine/cache: ^1.8
- guzzlehttp/guzzle: ^6.5.5
- netresearch/jsonmapper: ^3.0.0
- psr/log: ^1.1.0
- symfony/validator: ^4.3 || ^5.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- phpstan/extension-installer: ^1.0
- phpstan/phpstan: ^0.12.27
- phpstan/phpstan-doctrine: ^0.12.14
- phpstan/phpstan-strict-rules: ^0.12.2
- phpstan/phpstan-symfony: ^0.12.6
- phpunit/phpunit: ^7.3
- roave/security-advisories: dev-master
- thecodingmachine/phpstan-strict-rules: ^0.12.0
- dev-master
- v2020.10.03
- v2020.10.02
- v2020.10.01
- 2020.09.02
- 2020.09.01
- 2020.08.01
- 2020.07.02
- 2020.07.01
- 2020.06.09
- 2020.06.08
- 2020.06.07
- 2020.06.06
- 2020.06.05
- 2020.06.04
- 2020.06.03
- 2020.06.02
- 2020.06.01
- 2020.05.02
- 2020.05.01
- 2020.03.01
- 2020.02.01
- 2019.10.2
- 2019.10.1
- 2019.9.1
- v2019.7.5
- v2019.7.4
- v2019.7.3
- v2019.7.2
- v2019.7.1
- v2019.5.1
- 2019.4.3
- 2019.4.2
- 2019.4.1
- 2019.2.1
- 2019.1.1
- 2018.12.2
- 2018.12.1
- 2018.10.2
- 2018.10.1
- 2018.8.1
- 2018.8.1-rc2
- 2018.8.1-rc1
- 2018.7.2
- 2018.7.1
- 2018.6.3
- 2018.6.2
- 2018.6.1
- 2018.5.2
- 2018.5.1
- 2018.4.2
- 2018.4.1
- 2018.3.4
- 2018.3.3
- 2018.3.2
- 2018.3.1
- 2018.1.1
- 2017.12.7
- 2017.12.6
- 2017.12.5
- 2017.12.4
- 2017.11.1
- 2017.10.2
- 2017.10.1
- 2017.9.2
- 2017.9.1
- 2017.7.2
- 2017.7.1
- 2017.6.3
- 2017.6.2
- 2017.6.1
- 2017.5.3
- 2017.5.2
- 2017.5.1
- 2017.4.2
- 2017.4.1
- 2017.3.12
- 2017.3.11
- 2017.3.10
- 2017.3.9
- 2017.3.8
- 2017.3.7
- 2017.3.6
- v2017.3.5
- 2017.3.4
- 2017.3.3
- 2017.3.2
- 2017.3.1
- 2017.1
- 0.1.0
- dev-yandex-direct-api-122
- dev-pay-for-conversion
- dev-yandex-direct-api-98
- dev-dependabot/composer/phpstan/phpstan-doctrine-0.12.19
- dev-dependabot/composer/phpstan/phpstan-strict-rules-0.12.4
- dev-dependabot/composer/phpstan/phpstan-symfony-0.12.7
- dev-test-ci
- dev-update-deps
- dev-#32_add_service_keywordBids
- dev-+32_add_service_keywordBids
- dev-json-report
This package is auto-updated.
Last update: 2024-11-10 21:31:39 UTC
README
Набор классов для удобной работы с API Яндекс.Директ.
Установка
composer require nameewgeniy/yandex-direct-api
Использование
Подготовка
Необходимо инициировать аннотации. Замените
require __DIR__ . '/vendor/autoload.php';
На
$loader = require __DIR__ . '/vendor/autoload.php'; AnnotationRegistry::registerLoader([$loader, 'loadClass']);
Первый вызов
Для примера, получим список активных кампаний аккаунта
$directApiService = new DirectApiService("ваш токен", "ваш логин"); $criteria = new CampaignsSelectionCriteria(); $criteria->States = [CampaignStateEnum::ON]; $campaigns = $directApiService->getCampaignsService()->get($criteria, CampaignFieldEnum::getValues());