2performant/2performant-php
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
2performant/2performant-php 适用场景与选型建议
2performant/2performant-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 46.46k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2016 年 07 月 22 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「http」 「rest」 「api」 「2Performant」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 2performant/2performant-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 2performant/2performant-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 2performant/2performant-php 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
repository php library
A PSR-7 compatible library for making CRUD API endpoints
Api bundle
http客户端
Easily add Excepct-CT header to your project
Build mini web servers in PHP for testing
统计信息
- 总下载量: 46.46k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-07-22