All Projects → jeevatkm → Digitalocean Api Java

jeevatkm / Digitalocean Api Java

Licence: mit
DigitalOcean API Client in Java

Programming Languages

java
68154 projects - #9 most used programming language
scala
5932 projects
groovy
2714 projects

Projects that are alternatives of or similar to Digitalocean Api Java

Hacktoberfest2020
Make your first Pull Request and earn a free tee from GitHub!
Stars: ✭ 1,141 (+604.32%)
Mutual labels:  digitalocean
Competitive Programming
Hello Programmers 💻 , A one-stop Destination✏️✏️ for all your Competitive Programming Resources.📗📕 Refer CONTRIBUTING.md for contributions
Stars: ✭ 113 (-30.25%)
Mutual labels:  digitalocean
Learn Devops
🚧 Learn the craft of "DevOps" (Developer Operations) to Deploy your App and Monitor it so it stays "Up"!
Stars: ✭ 139 (-14.2%)
Mutual labels:  digitalocean
Shadowsocks Tutorial
🐱给小白的Shadowsocks和V2ray翻墙教程
Stars: ✭ 1,273 (+685.8%)
Mutual labels:  digitalocean
Typhoon
Minimal and free Kubernetes distribution with Terraform
Stars: ✭ 1,397 (+762.35%)
Mutual labels:  digitalocean
Cluster.dev
Kubernetes-based Dev Environments with GitOps
Stars: ✭ 122 (-24.69%)
Mutual labels:  digitalocean
Python Digitalocean
🐍🐳 Python module to manage Digital Ocean droplets
Stars: ✭ 1,082 (+567.9%)
Mutual labels:  digitalocean
Nginxconfig.io
⚙️ NGINX config generator on steroids 💉
Stars: ✭ 14,983 (+9148.77%)
Mutual labels:  digitalocean
Do Latency
🐳 Digital Ocean regions latency checker
Stars: ✭ 109 (-32.72%)
Mutual labels:  digitalocean
Generate Ssh Configs
Automatically generate ssh config files for your cloud servers
Stars: ✭ 136 (-16.05%)
Mutual labels:  digitalocean
Digitalocean Js
JavaScript library for the DigitalOcean API
Stars: ✭ 90 (-44.44%)
Mutual labels:  digitalocean
S3 Beam
🚀 direct-to-S3 uploading using ClojureScript
Stars: ✭ 91 (-43.83%)
Mutual labels:  digitalocean
Awesome Travel
Do you want to build a travel app?
Stars: ✭ 133 (-17.9%)
Mutual labels:  digitalocean
Shark
A CLI to Interact with DigitalOcean
Stars: ✭ 74 (-54.32%)
Mutual labels:  digitalocean
Marketplace Partners
Image validation, automation, and other tools for DigitalOcean Marketplace partners and Custom Image users
Stars: ✭ 139 (-14.2%)
Mutual labels:  digitalocean
Godo
DigitalOcean Go API client
Stars: ✭ 1,097 (+577.16%)
Mutual labels:  digitalocean
Tugboat
A command line tool for interacting with your DigitalOcean droplets.
Stars: ✭ 1,465 (+804.32%)
Mutual labels:  digitalocean
Hacktoberfest 2k18 Katas
Game has ended :: Little challenges to up your Hacktoberfest game!
Stars: ✭ 160 (-1.23%)
Mutual labels:  digitalocean
Hacktoberfest2018
A repository for HacktoberFest 2018.
Stars: ✭ 139 (-14.2%)
Mutual labels:  digitalocean
Getaredis
A one click, docker based, auto scaling, Redis host implemented in Go and hosted on Digitalocean.
Stars: ✭ 135 (-16.67%)
Mutual labels:  digitalocean

DigitalOcean API Client for Java

Build Status Version Javadoc License

Simple & Lightweight API client library for Enterprise Application or Utilities Integration around DigitalOcean RESTful APIs. You can use this library with project based (JVM hosted languages) on Java, Groovy, Scala, Clojure, etc.

Give your support by clicking Hearts on DigitalOcean Developers Community.

News

  • v2.17 released and tagged on Feb 03, 2019
  • v2.16 released and tagged on Sep 03, 2018
  • v2.15 released and tagged on May 5, 2018
  • v2.14 released and tagged on Mar 6, 2018
  • v2.13 eleased and tagged on Nov 18, 2017

Getting Started

For handy use, DigitalOcean API Client library project dependency definition provided below or you wanna jar Download it from Maven central repo.

Note: master branch maps to v2 APIs and digitalocean turned off v1 APIs as on Nov 9, 2015 .

Maven dependency

<dependency>
    <groupId>com.myjeeva.digitalocean</groupId>
    <artifactId>digitalocean-api-client</artifactId>
    <version>2.17</version>
</dependency>

Gradle/Grails dependency

compile 'com.myjeeva.digitalocean:digitalocean-api-client:2.17'

Groovy Grape

@Grapes(
@Grab(group='com.myjeeva.digitalocean', module='digitalocean-api-client', version='2.17')
)

Scala SBT

libraryDependencies += "com.myjeeva.digitalocean" % "digitalocean-api-client" % "2.17"

Note:

  • For Android projects, kindly include the httpclient-android library explicitly in your project dependencies.
  • Library vx.x-SNAPSHOT is available between the release version. Snapshot is update to with master branch.

Getting Help

For API documentation see:

For Example usage see:

Samples

Creating a DigitalOcean Client in three simple ways!

// Way one, just pass on authToken
DigitalOcean apiClient = new DigitalOceanClient(authToken);

// Way two, pass on version number & authToken
DigitalOcean apiClient = new DigitalOceanClient("v2", authToken);

// Way three, pass on version number, authToken & httpClient
// Go ahead and customize httpClient attributes for requirements
CloseableHttpClient httpClient = HttpClients.createDefault();
DigitalOcean apiClient = new DigitalOceanClient("v2", authToken, httpClient);

Let's invoke the method(s) as per need via apiClient

// Fetching all the available droplets from control panel
Droplets droplets = apiClient.getAvailableDroplets(pageNo, perPage);

// Fetching all the available kernels for droplet
Kernels kernels = apiClient.getAvailableKernels(dropletId, pageNo, perPage);

// Create a new droplet
Droplet newDroplet = new Droplet();
newDroplet.setName("api-client-test-host");
newDroplet.setSize(new Size("512mb")); // setting size by slug value
newDroplet.setRegion(new Region("sgp1")); // setting region by slug value; sgp1 => Singapore 1 Data center
newDroplet.setImage(new Image(1601)); // setting by Image Id 1601 => centos-5-8-x64 also available in image slug value
newDroplet.setEnableBackup(Boolean.TRUE);
newDroplet.setEnableIpv6(Boolean.TRUE);
newDroplet.setEnablePrivateNetworking(Boolean.TRUE);

// Adding SSH key info
List<Key> keys = new ArrayList<Key>();
keys.add(new Key(6536653));
keys.add(new Key(6536654));
newDroplet.setKeys(keys);

// Adding Metadata API - User Data
newDroplet.setUserData(" < YAML Content > "); // Follow DigitalOcean documentation to prepare user_data value
Droplet droplet = apiClient.createDroplet(newDroplet);


// Creating multiple droplets
Droplet droplet = new Droplet();
droplet.setNames(Arrays.asList("sub-01.example.com", "sub-02.example.com"));
droplet.setSize("512mb");
droplet.setImage(new Image("ubuntu-14-04-x64"));
droplet.setRegion(new Region("nyc1"));
Droplets droplets = apiClient.createDroplets(droplet);

// Fetch droplet information
Droplet droplet = apiClient.getDropletInfo(dropletId);

// Fetch Available Plans/Sizes supported by DigitalOcean
Sizes sizes = apiClient.getAvailableSizes(pageNo);

// Fetch Available Regions supported by DigitalOcean
Regions regions = apiClient.getAvailableRegions(pageNo);

Accessing RateLimit header values from return object. This is applicable for all requests.

Droplets droplets = getAvailableDroplets(1, 20);
RateLimit rateLimit = droplets.getRateLimit();

Actions actions = getAvailableActions(2, 40);
RateLimit rateLimit = actions.getRateLimit();

Domain domain = getDomainInfo("myjeeva.com");
RateLimit rateLimit = domain.getRateLimit();

Droplet droplet = getDropletInfo(10000001);
RateLimit rateLimit = droplet.getRateLimit();

Reporting Issues

DigitalOcean API Client uses GitHub’s integrated issue tracking system to record bugs and feature requests. If you want to raise an issue, please follow the recommendations bellow:

  • Before you log a bug, please search the issue tracker to see if someone has already reported the problem. If the issue doesn’t already exist, create a new issue.
  • Please provide as much information as possible with the issue report, we like to know the version of DigitalOcean API Client that you are using.
  • If you need to paste code, or include a stack trace use Markdown ``` escapes before and after your text.

Supported API's and Changelogs

Refer to CHANGELOG.md

Author

Jeevanandam M. - [email protected]

Contributors

Please refer to https://github.com/jeevatkm/digitalocean-api-java/graphs/contributors

Contributing

  1. Fork it
  2. Create your feature branch - git checkout -b my-new-feature
  3. Implement your changes
  4. Format your code with ./mvnw com.coveo:fmt-maven-plugin:format
  5. Check tests passig with ./mvnw verify
  6. Commit your changes - git commit -am 'Added feature'
  7. Push to the branch - git push origin my-new-feature
  8. Create new Pull Request

License

DigitalOcean API Client - MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].