izziaraffaele / affilinet-php
此包的最新版本(0.0.3)没有可用的许可证信息。
Affilinet API的PHP客户端
0.0.3
2016-03-07 07:30 UTC
Requires
- php: >=5.5
Requires (Dev)
- phpunit/phpunit: ^5.2
This package is not auto-updated.
Last update: 2022-11-18 10:14:40 UTC
README
一个非常友好的Affili.net(Affili.net)PHP客户端。
需求
- PHP版本必须是5.5或更高。
安装
使用Composer。
全局安装Composer(Linux / Unix / OSX)
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
运行以下Composer命令来安装客户端的最新稳定版本,在当前文件夹中
composer require izziaraffaele/affilinet-php
安装完成后,需要要求Composer的自动加载器,然后就可以使用了
<?php require 'vendor/autoload.php';
入门
// Create a client for Affilinet api $client = new Affilinet\Client( $username, $password ); // Get the resource you need ( for now just statistics is available ) $statisticResource = $client->resource('statistics'); // Call methods of the api on the resource object $response = $statisticResource->getSubIdStatistics( $parameters ); // check errors and get results if( $response->hasErrors() ) { var_dump( $response->errors() ); } else { var_dump( $response->body() ); }
文档
在编写适当的文档之前,请参考源代码。