fdisotto/cac-api

PHP wrapper for the cloudatcost API's

1.0.4 2015-04-21 21:04 UTC

This package is not auto-updated.

Last update: 2024-04-13 14:50:29 UTC


README

PHP wrapper for the cloudatcost's API

References

https://github.com/cloudatcost/api

Install

Via Composer

$ composer require fdisotto/cac-api

Requires PHP 5.3.0 or newer and cURL lib installed.

Usage

$cac = new \fdisotto\CACApi(array(
    'key' => 'YourApiKey',
    'login' => 'YourLoginEmail'
));

Actions

List servers

print_r($cac->getServers());

List templates

print_r($cac->getTemplates());

List tasks

print_r($cac->getTasks());

Power ON server

$cac->powerOnServer($serverID);

Power OFF server

$cac->powerOffServer($serverID);

Reset server

$cac->resetServer($serverID);

Console url

$cac->getConsoleUrl($serverID);

Rename server

$cac->renameServer($serverID, $newName);

Modify reverse DNS

$cac->reverseDNS($serverID, $hostname);

Run Mode

$cac->runMode($serverID, $runmode);

Update

v1.0.4

  • Added Run mode function

v1.0.3

  • Added Rename server function
  • Added Modify reverse DNS function
  • Updated tests

v1.0.1

  • Added tests
  • Added example
  • Extends curl class, now you can use all public methods and properties of this lib (ex: http_status_code, etc.)
  • Some fixes

Credits

License

The MIT License (MIT). Please see License File for more information.