Skip to content

Commit

Permalink
Merge pull request #175 from easystartup-io/main
Browse files Browse the repository at this point in the history
servertype: add getServerTypes paginated
  • Loading branch information
sinuscosinustan authored Jan 19, 2024
2 parents 67b9941 + 5e09242 commit 76da58c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/main/java/me/tomsdevsn/hetznercloud/HetznerCloudAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -1263,6 +1263,20 @@ public ServerTypesResponse getServerTypes() {
ServerTypesResponse.class);
}

/**
* Get Server types Paginated.
*
* @return ServerTypesResponse object
*/
public ServerTypesResponse getServerTypes(PaginationParameters paginationParameters) {
return get(
UrlBuilder.from(API_URL + "/server_types")
.queryParamIfPresent("page", Optional.ofNullable(paginationParameters.page))
.queryParamIfPresent("per_page", Optional.ofNullable(paginationParameters.perPage))
.toUri(),
ServerTypesResponse.class);
}

/**
* Get all Load Balancer types.
*
Expand Down

0 comments on commit 76da58c

Please sign in to comment.