Skip to content

Latest commit

 

History

History
51 lines (35 loc) · 2.13 KB

README.md

File metadata and controls

51 lines (35 loc) · 2.13 KB

Latest Stable Version License Total Downloads Actions Status

Hetzner Cloud PHP SDK

A PHP SDK for the Hetzner Cloud API: https://docs.hetzner.cloud/

Installation

You can install the package via composer:

composer require lkdevelopment/hetzner-cloud-php-sdk

Usage

$hetznerClient = new \LKDev\HetznerCloud\HetznerAPIClient($apiKey);
foreach ($hetznerClient->servers()->all() as $server) {
    echo 'ID: '.$server->id.' Name:'.$server->name.' Status: '.$server->status.PHP_EOL;
}

Old Releases: v1.x

Version 1.x is abandoned and will not receive any new updates or features. V2 was created with Backward Compatibility in mind. So it should work as a drop-in replacement. Therefor it does not give a "Migration to v2"-Guide. It should just work!

Testing

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

Changelog

Please see CHANGELOG for more information what has changed recently.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

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