Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 1.54 KB

README.md

File metadata and controls

34 lines (24 loc) · 1.54 KB

Hetzner Cloud API Client

Sonarcloud Coverage Reliability Rating Maintainability Rating

This is client library for Hetzner cloud, based on Retrofit HTTP client.

Usage

Declare dependency in pom.xml

<dependency>
    <groupId>cloud.dnation.integration</groupId>
    <artifactId>hetzner-cloud-client-java</artifactId>
    <version>1.3.0</version>
</dependency>

Instantiate client and make an API call

import cloud.dnation.hetznerclient.*;

HetznerApi api = ClientFactory.create("my-token-123456");
Response<GetServerByIdResponse> response = api.getServer(123456).execute();

if (response.isSuccessful()) {
    System.out.println(response.body());
}