Skip to content

dNationCloud/hetzner-cloud-client-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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());
}