A PHP SDK for the Hetzner Cloud API: https://docs.hetzner.cloud/
You can install the package via composer:
composer require lkdevelopment/hetzner-cloud-php-sdk
$hetznerClient = new \LKDev\HetznerCloud\HetznerAPIClient($apiKey);
foreach ($hetznerClient->servers()->all() as $server) {
echo 'ID: '.$server->id.' Name:'.$server->name.' Status: '.$server->status.PHP_EOL;
}
We use the Hetzner Cloud API Mock Server for testing against the API. For testing run the commands:
docker run -d -p 127.0.0.1:4000:8080 lkdevelopment/hetzner-cloud-api-mock
phpunit
Please see CHANGELOG for more information what has changed recently.
If you discover any security related issues, please email kontakt@lukas-kaemmerling.de instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.