一个简单的程序来访问Java中的digitalocean小滴信息 [英] simple Program to access digitalocean droplet information in java

查看:130
本文介绍了一个简单的程序来访问Java中的digitalocean小滴信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是DigitalOcean的新手。我想运行基本的Java程序来访问DigitalOcean Droplet。请让我知道逐步的过程。

I am new to DigitalOcean.I would like to run basic java program to access DigitalOcean droplet. please let me know step by step procedure.

推荐答案

您可以使用其官方API获取有关液滴的信息。这是一个简单的REST api,您可以使用Java的 URL 类进行调用。

You can get information about your droplets using their official API. It is a simple REST api which you can call using Java's URL class.

有关如何使用HTTP GET的更多信息Java:

More about howto make HTTP GET using Java:

使用java.net.URLConnection触发并处理HTTP请求

用于简单检索有关您帐户的信息,Droplet等等。您应该使用 GET 方法。您请求的信息将作为JSON对象返回给您。您可以找到许多Java JSON库(例如 json.org/java )。

For simple retrieval of information about your account, Droplets etc. you should use the GET method. The information you request will be returned to you as a JSON object. You can find numerous JSON libraries for Java (e.g. json.org/java).

DigitalOcean API的文档:

Documentation of DigitalOcean API:

https://developers.digitalocean.com/

与Droplet相关的文档部分:

Documention section related to Droplets:

https:// developers.digitalocean.com/#droplets

所有Droplet的列表:

List of all Droplets:

https://developers.digitalocean.com/#list-all-droplets

通过ID检索现有的Droplet:

Retrieve an existing Droplet by id:

https://developers.digitalocean.com/#retrieve-an-existi ng-droplet-by-id

这篇关于一个简单的程序来访问Java中的digitalocean小滴信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆