文件名称:digitalocean-api-java:围绕 DigitalOcean API 的 Java 包装器
文件大小:17KB
文件格式:ZIP
更新时间:2024-07-14 09:46:10
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("Dro