audiens / doubleclick-ddp-client
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 17 498
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 7
Forks: 1
Open Issues: 0
Requires
- php: >=7.1
- doctrine/annotations: ^1.6
- doctrine/cache: ^1.6.0
- guzzlehttp/guzzle: ^6.2.0
- lcobucci/jwt: ^3.1.1
- twig/twig: ~1.0
- vlucas/phpdotenv: ^2.2.0
- zendframework/zend-hydrator: ^2.2.1
Requires (Dev)
- facile-it/paraunit: ^0.12.3
- phing/phing: ^2
- php-coveralls/php-coveralls: ^2.1
- phpunit/phpunit: ^7.5
- squizlabs/php_codesniffer: ^2
- symfony/var-dumper: ^3.1.6
README
An OOP implementation af the Doubleclick DDP Soap API.
Installation
To use this package, use composer:
- from CLI:
composer require Audiens/doubleclick-client
- or, directly in your
composer.json
:
{
"require": {
"Audiens/doubleclick-client": "dev-master"
}
}
Usage
require 'vendor/autoload.php'; $privateKey = getenv('SA_PRIVATE_KEY'); $email = getenv('SA_CLIENT_EMAIL'); $subject = getenv('SA_SUBJECT'); $reportBuilder = new ReportBuilder(); $reportService = $reportBuilder->getReportService($privateKey, $email, $subject) // Report Fetch Example $from = new \DateTime('-10 days'); $to = new \DateTime('now'); $reportConfig = ReportConfig( 'your_customer_id', 'company_name', 'company_user_agent', $from, $to ); $revenueList = $reportService->getRevenue($reportConfig); foreach ($revenueList as $revenueItem) { echo "BUYER NAME: " $revenueItem->getClientName(). "\n" echo "REVENUE ($): " $revenueItem->getSegmentRevenue(). "\n" echo "IMPRESSION : " $revenueItem->getSegmentImpression(). "\n" }