symmetry-digitalocean-api 0.0.1

D Language implementation of Digital Ocean API.


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

import symmetry.api.digitalocean; import symmetry.helper.prettyjson; import std.json; import std.stdio;

void main(string[] args) {

import std.process : environment;
auto ocean=OceanAPI(environment.get("DIGITALOCEAN_API_KEY",""));
auto result=Droplet.create( ocean,
                            "newemail.symmetryinvestments.com",
                            OceanRegion.lon1,
                            "1Gb",
                            OceanImageId("debian-8-x64"),
                            ["ab:21:7e:22:e5:4c:95:23:e9:aa:f8:59:be:5f:96:24"]);
writefln(result.prettyPrint);
auto actions=ocean.listDroplets;
writefln(actions.prettyPrint);

/* auto droplet=ocean.findDroplet("hoelderlin.symmetry.com").result.retrieve;

writefln(droplet.prettyPrint);
auto keys=ocean.listKeys;
writefln(keys.prettyPrint);*/

}

/**

really not tested
so far: reasonable results for
listDomains
listDroplets
listSizes
listKeys
listImages
findDroplet
Droplet.retrieve

*/

Authors:
  • Laeeth Isharc
Dependencies:
none
Versions:
0.0.1 2021-Feb-21
~master 2021-Feb-21
Show all 2 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 6 downloads total

Score:
1.0
Short URL:
symmetry-digitalocean-api.dub.pm