2017 © Pedro PelĂĄez
 

library cloud-royale-api

Unoffical API for Cloud Royale

image

s4wny/cloud-royale-api

Unoffical API for Cloud Royale

  • Sunday, September 13, 2015
  • by s4wny
  • Repository
  • 1 Watchers
  • 1 Stars
  • 92 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Cloud Royale API

Unoffical API for Cloud Royale. (They don't have any offical API at the moment.), (*1)

Installation

composer require s4wny/cloud-royale-api, (*2)

Documentation

Example usage:, (*3)

login());

// Get all your servers ( [ID => server name] )
$servers = $api->getServers();
print_r($servers);

// Get status about a specific server
$firstServer = key($servers);
print_r(json_decode($api->getStatus($firstServer)));

/* Output:

bool(true)

Array
(
    [0] => Array
        (
            [ip] => 1.2.3.4
            [id] => sadffsd34rfxd3
            [name] => http server
            [online] => false
        )

    [1] => Array
        (
            [ip] => 4.4.4.4
            [id] => asfdsadf
            [name] => vpn
            [online] => true
        )
)

stdClass Object
(
    [sadffsd34rfxd3] => stdClass Object
        (
            [status] => On
            [memory] => 8
            [cpus] => 3
            [disk_size] => 30
            [disks] => stdClass Object
                (
                    [1337] => stdClass Object
                        (
                            [size] => 30
                            [storage] => 13
                        )
                )
        )
)
*/

?>

Methods

  • __construct($username, $password)
  • login()
  • getStatus($serverID)
  • getServers()
  • startServer($serverID)
  • stopServer($serverID)
  • addSSHKeys($serverID)
  • createServer($config)

License

This library is open-sourced software licensed under the MIT license, (*4)

The Versions

13/09 2015

dev-master

9999999-dev

Unoffical API for Cloud Royale

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

13/09 2015

0.2.0

0.2.0.0

Unoffical API for Cloud Royale

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

13/09 2015

0.1.1

0.1.1.0

Unoffical API for Cloud Royale

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

12/09 2015

0.1.0

0.1.0.0

Unoffical API for Cloud Royale

  Sources   Download

MIT

The Requires

  • php >=5.4.0