2017 © Pedro Peláez
 

library reseller-api

The official implementation of the Blesta Reseller API

image

blesta/reseller-api

The official implementation of the Blesta Reseller API

  • Friday, February 26, 2016
  • by clphillips
  • Repository
  • 2 Watchers
  • 3 Stars
  • 216 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 11 % Grown

The README.md

blesta/reseller-api

Build Status Coverage Status, (*1)

The Blesta Reseller API library., (*2)

This library implements the Reseller API., (*3)

Installation

Install via composer:, (*4)

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., (*5)

use Blesta\ResellerApi\Connection;

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

Credits

Allows fetching available credit on your account., (*6)

use Blesta\ResellerApi\Command\Credits;

$credits = new Credits($connection);

Get Credits

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

Packages

Allows fetching information on available packages., (*7)

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., (*8)

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 for a particular license. Searches over license key, domain, IP address and installation path., (*9)

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., (*10)

$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);

The Versions

26/02 2016

dev-master

9999999-dev http://github.com/blesta/reseller-api

The official implementation of the Blesta Reseller API

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

by Cody Phillips

26/02 2016

1.1.0

1.1.0.0 http://github.com/blesta/reseller-api

The official implementation of the Blesta Reseller API

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

by Cody Phillips

26/02 2016

dev-rename-namespace

dev-rename-namespace http://github.com/blesta/reseller-api

The official implementation of the Blesta Reseller API

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

by Cody Phillips

21/07 2015

1.0.3

1.0.3.0 http://github.com/blesta/reseller-api

The official implementation of the Blesta Reseller API

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

by Cody Phillips

21/07 2015

1.0.2

1.0.2.0 http://github.com/blesta/reseller-api

The official implementation of the Blesta Reseller API

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

by Cody Phillips

30/06 2015

1.0.1

1.0.1.0 http://github.com/blesta/reseller-api

The official implementation of the Blesta Reseller API

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

by Cody Phillips

30/06 2015

dev-fix-unused-use

dev-fix-unused-use http://github.com/blesta/reseller-api

The official implementation of the Blesta Reseller API

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

by Cody Phillips

27/06 2015

1.0.0

1.0.0.0 http://github.com/blesta/reseller-api

The official implementation of the Blesta Reseller API

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

by Cody Phillips