2017 © Pedro Peláez
 

library combell-api

Wrapper libraries for Combell public API on their shared hosting environment.

image

tomcan/combell-api

Wrapper libraries for Combell public API on their shared hosting environment.

  • Wednesday, March 21, 2018
  • by TomCan
  • Repository
  • 2 Watchers
  • 3 Stars
  • 21 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 10 Versions
  • 17 % Grown

The README.md

tomcan\combell-api

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

Run tests, (*2)

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 ;), (*3)

Usage

You can install the library through composer:, (*4)

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

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

If you need information about the HTTP call, you can ask the api object about it:, (*7)

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

$cmd->getPagingSkipped();
$cmd->getPagingTake();
$cmd->getPagingTotalResults();

The Versions

21/03 2018

dev-master

9999999-dev

Wrapper libraries for Combell public API on their shared hosting environment.

  Sources   Download

MIT

The Requires

 

api combell

21/03 2018

v2.0.4

2.0.4.0

Wrapper libraries for Combell public API on their shared hosting environment.

  Sources   Download

MIT

The Requires

 

api combell

20/03 2018

v2.0.3

2.0.3.0

Wrapper libraries for Combell public API on their shared hosting environment.

  Sources   Download

MIT

The Requires

 

api combell

20/03 2018

v2.0.2

2.0.2.0

Wrapper libraries for Combell public API on their shared hosting environment.

  Sources   Download

MIT

The Requires

 

api combell

20/03 2018

v2.0.1

2.0.1.0

Wrapper libraries for Combell public API on their shared hosting environment.

  Sources   Download

MIT

The Requires

 

api combell

20/03 2018

v2.0.0

2.0.0.0

Wrapper libraries for Combell public API on their shared hosting environment.

  Sources   Download

MIT

The Requires

 

api combell

25/01 2018

v1.1.0

1.1.0.0

Wrapper libraries for Combell public API on their shared hosting environment.

  Sources   Download

MIT

The Requires

 

api combell

23/11 2017

v1.0.2

1.0.2.0

Wrapper libraries for Combell public API on their shared hosting environment.

  Sources   Download

MIT

The Requires

 

api combell

23/11 2017

v1.0.1

1.0.1.0

Wrapper libraries for Combell public API on their shared hosting environment.

  Sources   Download

MIT

The Requires

 

api combell

22/11 2017

v1.0.0

1.0.0.0

Wrapper libraries for Combell public API on their shared hosting environment.

  Sources   Download

MIT

The Requires

 

api combell