blesta/reseller-api 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

blesta/reseller-api

Composer 安装命令:

composer require blesta/reseller-api

包简介

The official implementation of the Blesta Reseller API

README 文档

README

Build Status Coverage Status

The Blesta Reseller API library.

This library implements the Reseller API.

Installation

Install via composer:

composer require blesta/reseller-api:~1.0

Basic Usage

Initialize your connection. You'll need to inject this connection into any command type you wish to initialize.

use Blesta\ResellerApi\Connection;

$connection = new Connection();
$connection->setBasicAuth($username, $password);

Credits

Allows fetching available credit on your account.

use Blesta\ResellerApi\Command\Credits;

$credits = new Credits($connection);

Get Credits

$result = $credits->get();
echo $result->response();

Packages

Allows fetching information on available packages.

use Blesta\ResellerApi\Command\Packages;

$packages = new Packages($connection);

Get Packages

$result = $packages->get();
print_r($result->response());

Get Pricing

$result = $packages->getPricing($package_id);
print_r($result->response());

Licenses

Allows you to add, update, suspend, unsuspend, and cancel a license.

use Blesta\ResellerApi\Command\Licenses;

$licenses = new Licenses($connection);

Add License

$data = array(
    'pricing_id' => 1,
    'test_mode' => 'true'
);
$result = $licenses->add($data);
$licenseKey = $result->response();

Update License

$data = array(
    'license' => 'abcdef0123456789',
    'reissue_status' => 'reissue',
    'test_mode' => 'true'
);
$licenses->update($data);

Cancel License

$data = array(
    'license' => 'abcdef0123456789',
    'test_mode' => 'true'
);
$licenses->cancel($data);

Suspend License

$data = array(
    'license' => 'abcdef0123456789',
    'test_mode' => 'true'
);
$licenses->suspend($data);

Unuspend License

$data = array(
    'license' => 'abcdef0123456789',
    'test_mode' => 'true'
);
$licenses->unsuspend($data);

Search

Search for a particular license. Searches over license key, domain, IP address and installation path.

use Blesta\ResellerApi\Command\Search;

$search = new Search($connection);
$result = $search->data('search string')
    ->page(1)
    ->get();
print_r($result->response());

Command Factory

The examples shown in the Basic Usage section demonstrate direct usage of command objects. You may find the built-in command factory more user friendly.

$commandFactory = new \Blesta\ResellerApi\Command\CommandFactory();
$credits = $commandFactory->create('Credits', $connection);
$packages = $commandFactory->create('Packages', $connection);
$licenses = $commandFactory->create('Licenses', $connection);
$search = $commandFactory->create('Search', $connection);

blesta/reseller-api 适用场景与选型建议

blesta/reseller-api 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 881 次下载、GitHub Stars 达 6, 最近一次更新时间为 2015 年 06 月 26 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 blesta/reseller-api 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 blesta/reseller-api 我们能提供哪些服务?
定制开发 / 二次开发

基于 blesta/reseller-api 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 881
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 11
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 6
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-06-26