Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mvberg/digitalocean-api-java

A Java wrapper around the DigitalOcean API
https://github.com/mvberg/digitalocean-api-java

Last synced: about 2 months ago
JSON representation

A Java wrapper around the DigitalOcean API

Awesome Lists containing this project

README

        

```java
// test getting all Droplets

String url = ENDPOINT.replace("COMMAND", "droplets");
url = url.replace("CLIENT_ID", CLIENT_ID);
url = url.replace("API_KEY", API_KEY);

final String jsonResponse = fetchString(url);

// parse JSON response

final Droplets droplets = GSON.fromJson(jsonResponse, Droplets.class);

System.out.println("Droplets: query status = " + droplets.getStatus());
System.out.println("Droplets: raw response = " + jsonResponse);

```