trmcnvn / DigitalOcean.API

:whale2: .NET implementation of the DigitalOcean API
MIT License
126 stars 49 forks source link
digitalocean digitalocean-api dotnet

DigitalOcean API

GitHub Actions status

Implementation of the DigitalOcean API (v2) for .NET Standard 2+

Install

DigitalOcean.API is available for install from NuGet and the GitHub Package Registry.

dotnet add package DigitalOcean.API

Example

var client = new DigitalOceanClient("api_token");

var request = new Droplet {
  Name = "example.com",
  Region = "nyc3",
  Size = "s-1vcpu-1gb",
  Image = "ubuntu-16-04-x64",
  SshKeys = new List<object> { 107149 },
  Backups = false,
  Ipv6 = true,
  Tags = new List<string> { "web" }
};

var droplet = await client.Droplets.Create(request);

Documentation

Check out DigitalOcean's documentation of their API to see all possible interactions.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.