audiens / appnexus-client
An OOP PHP implementation of appnexus API client
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 21 846
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 5
Forks: 5
Open Issues: 1
Requires
- php: >=7.1
- ext-json: *
- doctrine/cache: ^1.6.0
- guzzlehttp/guzzle: ^6.2.0
- vlucas/phpdotenv: ^2.2.0
- zendframework/zend-hydrator: ^2.2.1
Requires (Dev)
- facile-it/paraunit: ^0.12
- jangregor/phpstan-prophecy: ^0.2.0
- phing/phing: ^2
- phpstan/phpstan: ^0.10
- phpstan/phpstan-deprecation-rules: ^0.10
- phpstan/phpstan-phpunit: ^0.10
- phpstan/phpstan-symfony: ^0.10
- phpunit/phpunit: ^7.3
- satooshi/php-coveralls: ^1
- squizlabs/php_codesniffer: ^3.3
- symfony/var-dumper: ^4.1
README
An OOP implementation af the Appnexus API.
Installation
To use this package, use composer:
- from CLI:
composer require Audiens/appnexus-client
- or, directly in your
composer.json
:
{
"require": {
"Audiens/appnexus-client": "dev-master"
}
}
Usage
require 'vendor/autoload.php'; $username = '{yourUsername}'; $password = '{yourPassword}'; $memberId = '{yourPassword}'; $appnexus = new AppnexusFacade($username, $password, $memberId); // Segment creation example $segment = new Segment(); $segment->setName('Male'); $segment->setMemberId($memberId); $segment->setActive(true); $repositoryResponse = $appnexus->add($segment); if ($repositoryResponse->isSuccessful()){ echo "Success!"; }
Cache
The client implement a simple cache service using doctrine/cache.By default is enabled but you can disabled it with:
require 'vendor/autoload.php'; $username = '{yourUsername}'; $password = '{yourPassword}'; $memberId = '{yourPassword}'; $appnexus = new AppnexusFacade($username, $password, $memberId); $appnexus->disableCache();