2performant/2performant-php
最新稳定版本:1.1.0
Composer 安装命令:
composer require 2performant/2performant-php
包简介
PHP wrapper for 2Performant API
关键字:
README 文档
README
The API allows you to integrate any 2Performant network in your application. It's goal is to make sure developers can implement anything that can be done via the web interface using API functions.
The API is RESTful JSON over HTTP using all four verbs (GET/POST/PUT/DELETE) using Guzzle as a HTTP client.
API documentation can be found at: http://doc.2performant.com/
The PHP wrapper uses camelCase notation rather than the underscore_notation used in the HTTP API, but changes are transparent to the user using the wrapper.
Installation
It's recommended to install the library using Composer.
curl -sS https://getcomposer.org/installer | php
Then, install the library (along with its dependencies)
php composer.phar require 2Performant/2Performant-php
After that, use the composer autoloader in your PHP script
<?php
require 'vendor/autoload.php';
All done! Now you can use the classes provided, included in the TPerformant\API namespace.
Usage Examples
Interacting with 2Performant is very easy.
First you log in
// As an advertiser
use TPerformant\API\HTTP\Advertiser;
...
$me = new Advertiser('affiliate.manager@somecompany.com', 'password'); // fill in with your own credentials
$commissions = $me->getCommissions();
// or as an affiliate
use TPerformant\API\HTTP\Affiliate;
...
$me = new Affiliate('awesome.affiliate@affiliatesite.com', 'password'); // fill in with your own credentials
$commissions = $me->getCommissions();
For details about each API function the documentation can be found at: https://github.com/2Parale/2Performant-php/wiki
Commom issues
If you encounter issues with SSL (certificate-related connection problems), please try updating your cURL CA root certificates.
Reporting Problems
If you encounters any problems don't hesitate to contact us at: support (at) 2performant.com
统计信息
- 总下载量: 46.41k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-07-22