fedemotta / yii2-appnexusapiclient
AppNexus API client for yii2
Installs: 66
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 1
Open Issues: 0
Type:yii2-extension
Requires
This package is not auto-updated.
Last update: 2024-12-21 18:04:14 UTC
README
This extension provides the AppNexus API client integration for the Yii2 framework.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist fedemotta/yii2-appnexusapiclient "*"
or add
"fedemotta/yii2-appnexusapiclient": "*"
to the require section of your composer.json
file.
Usage
To use this extension, simply add the following code in your application configuration:
return [ //.... 'components' => [ 'appnexusapiclient' => [ 'class' => 'fedemotta/appnexusapiclient/AppNexusApiClient', 'username' => 'yourusername', 'password' => 'yourpassword', 'host' => 'http://api-console.client-testing.adnxs.net/', //or http:://api.appnexus.com 'storage_type' => 'Apc', //available token storage are Array, Apc and Memcached 'storage_type_settings' => ['prefix_',0], //specifies the storage type settings ], ], ];
Getting users from AppNexus:
$users = Yii::$app->appnexusapiclient->get('/user');
Modifying a publisher name in AppNexus:
Yii::$app->appnexusapiclient->put('/publisher?id=1',["publisher"=>["name"=>"The new name"]]);