PHP code example of fedemotta / yii2-appnexusapiclient

1. Go to this page and download the library: Download fedemotta/yii2-appnexusapiclient 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/ */

    

fedemotta / yii2-appnexusapiclient example snippets


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
        ],
    ],
];

$users = Yii::$app->appnexusapiclient->get('/user');

Yii::$app->appnexusapiclient->put('/publisher?id=1',["publisher"=>["name"=>"The new name"]]);

php composer.phar