OceanKit

OceanKit is DigitalOcean V2 API client. It support almost everethyng the API can do.

Docs

docrystal.org

Installation

Add this to your application's shard.yml:

dependencies:
  ocean_kit:
    github: osfx/ocean_kit

Usage

This client based on official API client droplet_kit writen in Ruby. So this means almost all methods work the same.

require "ocean_kit"

ocean_kit = OceanKit::Client.new("API-KEY")

# Single droplet
droplet = {
  "name": "example.com",
  "region": "nyc3",
  "size": "512mb",
  "image": "ubuntu-14-04-x64",
  "tags": [
    "web"
  ]
}

ocean_kit.droplets.create(droplet)

# Multiple droplets
droplets = {
  "names": [
    "sub-01.example.com",
    "sub-02.example.com"
  ],
  "region": "nyc3",
  "size": "512mb",
  "image": "ubuntu-14-04-x64",
  "ipv6": true,
  "tags": [
    "xxx"
  ]
}

ocean_kit.droplets.create(droplets)

Available methods

ocean_kit = OceanKit::Client.new("API-KEY")

Account

Certificates

Domain Records

Domains

Droplet Actions

Droplets

Floating Ip

Image Actions

Images

Load Balancer

Regions

Images

Snapshots

SSH Key

Volume Action

Volume


Contributing

  1. Fork it ( https://github.com/osfx/ocean_kit/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors