fedemotta/yii2-appnexusapiclient

为yii2框架的AppNexus API客户端

安装: 65

依赖者: 0

建议者: 0

安全性: 0

星星: 1

观察者: 3

分支: 1

公开问题: 0

类型:yii2-extension

v1.2 2015-04-25 05:58 UTC

This package is not auto-updated.

Last update: 2024-09-14 16:29:31 UTC


README

此扩展为Yii2框架提供了AppNexus API客户端集成。

Latest Stable Version Total Downloads Latest Unstable Version License

安装

安装此扩展的首选方法是通过composer

运行以下命令:

php composer.phar require --prefer-dist fedemotta/yii2-appnexusapiclient "*"

"fedemotta/yii2-appnexusapiclient": "*"

将以下内容添加到您的composer.json文件的require部分。

使用方法

要使用此扩展,只需在您的应用程序配置中添加以下代码

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

从AppNexus获取用户

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

修改AppNexus中的发布者名称

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