rumd3x/cloudcone-sdk

Unofficial Cloudcone PHP SDK

0.1.0 2019-10-23 02:12 UTC

This package is auto-updated.

Last update: 2024-04-23 12:59:29 UTC


README

Unofficial Cloudcone PHP SDK

Install

composer require rumd3x/cloudcone-sdk

Examples

Listing my instances

require 'vendor/autoload.php';
use Rumd3x\CloudCone\Api\V1\Compute;

$compute = new Compute('Api-Key-Here', 'App-Hash-Here');

$instances = $compute->getInstances(); // Returns an iterable collection with your instances

echo $instances->count(); // Display number of instances
$firstInstance = $instances->first(); // Retrieves first instance on collection

$allInstances = $instances->all(); // Retrieves all instances
$instancesOnH15 = $instances->where('nomename', '=', 'H15')->all(); // Retrieves all instances on Node H15

$instancesArray = $instances->toArray(); // Converts the collection to array

Todo

  • Dedicated Servers API
  • Docs
  • Unit Tests
  • CI