tomcan/combell-api
Composer 安装命令:
composer require tomcan/combell-api
包简介
Client libraries for the Combell shared hosting public API.
README 文档
README
This is a Combell shared-hosting API client implementation. The goal is to provide a client library that makes it easy for you to interact with the Combell shared hosting public API.
Current status
Since the Combell API is still in development and new functionality is added regularly, this library might not implement every call yet. We do try to keep it up-to-date as much as possible. We keep an eye on the Combell API changelog but if there are calls missing, do let us know by opening an issue or even better a pull request ;)
Usage
You can install the library through composer:
composer install tomcan/combell-api
Next, you need to include the composer autoloader. Instantiate the API object with your API key and secret, create the command objects and fire away!
require __DIR__ . '/vendor/autoload.php'; $key = 'YOUR-API-KEY'; $sec = 'YOUR-API-SECRET'; $api = new \TomCan\CombellApi\Common\Api( new \TomCan\CombellApi\Adapter\GuzzleAdapter(), new \TomCan\CombellApi\Common\HmacGenerator($key, $sec) ); $cmd = new \TomCan\CombellApi\Command\Accounts\ListAccounts(); var_dump($api->executeCommand($cmd));
The command will return the data of the call, in the example above that is an array with Account objects. See the test directory for extensive examples of all the calls.
If you need information about the HTTP call, you can ask the api object about it:
// return the HTTP status code. 200 -> 204 indicate success, other codes typically mean failure of some sort $api->getStatusCode(); // rate limiting headers $api->getRateLimitUsage(); $api->getRateLimitRemaining(); $api->getRateLimitReset(); $api->getRateLimitLimit();
If the command is pageable, you can get info about the paging from the command object:
$cmd->getPagingSkipped(); $cmd->getPagingTake(); $cmd->getPagingTotalResults();
tomcan/combell-api 适用场景与选型建议
tomcan/combell-api 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 932 次下载、GitHub Stars 达 6, 最近一次更新时间为 2017 年 11 月 22 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「Combell」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 tomcan/combell-api 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 tomcan/combell-api 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 tomcan/combell-api 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A PSR-7 compatible library for making CRUD API endpoints
A lightweight plain-PHP framework for database-backed CRUD APIs.
Modern, strongly-typed, PSR-compliant PHP client for the WeFact v2 API.
PHP SDK for the Enconvert file conversion API
支付宝开放平台v3协议文档,支持最新版PHP8+
Usgm PHP Library
统计信息
- 总下载量: 932
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 11
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-11-22