-
Notifications
You must be signed in to change notification settings - Fork 62
Changes v0.0.12 to 1.0.0
-
Servers Class The
createmethod was split into two different methodscreateInLocationfor creating a server in a location andcreateInDatacenterfor creating a server in a datacenter -
All "action" like
Server::powerOn()methods now return an instance ofLKDev\HetznerCloud\ApiResponseinstead an instance ofLKDev\HetznerCloud\Models\Actions\Action. If you want to the the underlying action object just use the value action as parameter of thegetResponseParton theLKDev\HetznerCloud\ApiResponseobject. Of course you could use server or wss_url as parameter like in the official Hetzner Cloud documentation -
All resource object constructors now require an instance of the internal GuzzleHttpClient
LKDev\HetznerCloud\Clients\GuzzleClientif you use the shortcut methods this is done for you.
The HetznerApiClient- object has now a method for every resource, for easily accessing the underlying object.
Instead of
// < v1.0.0
$apiKey = '{InsertApiTokenHere}';
$hetznerClient = new \LKDev\HetznerCloud\HetznerAPIClient($apiKey);
$serverEndpoint = new \LKDev\HetznerCloud\Models\Servers\Servers();
$serverEndpoint->all();you could now do simply
// >= v1.0.0
$apiKey = '{InsertApiTokenHere}';
$hetznerClient = new \LKDev\HetznerCloud\HetznerAPIClient($apiKey);
$hetznerClient->servers()->all();