DNSimple 0.9.0

The DNSimple API client for the .NET platform.

Install-Package DNSimple -Version 0.9.0
dotnet add package DNSimple --version 0.9.0
<PackageReference Include="DNSimple" Version="0.9.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DNSimple --version 0.9.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

:warning: Development Warning

This project targets the development of the API client for the DNSimple API v2.

This version is currently under development, therefore the methods and the implementation should he considered a work-in-progress. Changes in the method naming, method signatures, public or internal APIs may happen at any time.

The code is tested with an automated test suite connected to a continuous integration tool, therefore you should not expect bugs to be merged into master. Regardless, use this library at your own risk.

DNSimple C# Client

A C# client for the DNSimple API v2.

Build Status

Installation

Where &lt;version&gt; denotes the version of the client you want to install.

Package Manager

PM> Install-Package DNSimple -Version <version>

.NET CLI

>  dotnet add package DNSimple --version <version>

.NET CLI

<PackageReference Include="DNSimple" Version="0.8.3-alpha" />

Usage

This library is a C# client you can use to interact with the DNSimple API v2. Here are some examples.

using dnsimple;

var client = new Client();
var credentials = new OAuth2Credentials("...");
client.AddCredentials(credentials);

# Fetch your details
var response = client.Identity.Whoami();   // execute the call
var account = response.Data.Account;       // extract the relevant data from the response or
client.Identity.Whoami().Data.Account;     // execute the call and get the data in one line

# You can also fetch it from the whoami response
# as long as you authenticate with an Account access token
var whoami = client.Identity.Whoami();
var accountId = whoami.Account.Id;

List your domains

using dnsimple;

var client = new Client();
client.AddCredentials(new OAuth2Credentials("..."));

var accountId = client.Identity.Whoami().Data.Account.Id;
var domains = client.Domains.ListDomains(accountId).Data.Domains;

Create a domain

using dnsimple;

var client = new Client();
client.AddCredentials(new OAuth2Credentials("..."));

var accountId = client.Identity.Whoami().Data.Account.Id;
var domain = client.Domains.CreateDomain(accountId, new Domain{ Name = "example.com" }).Data;

Retrieve a domain

using dnsimple;

var client = new Client();
client.AddCredentials(new OAuth2Credentials("..."));

var accountId = client.Identity.Whoami().Data.Account.Id;
var domainId = client.Domains.ListDomains(accountId).Data.First().Id;
var domain = client.Domains.GetDomain(accountId, domainId).Data;

Sandbox Environment

We highly recommend testing against our sandbox environment before using our production environment.
This will allow you to avoid real purchases, live charges on your credit card, and reduce the chance of your running up against rate limits.

The client supports both the production and sandbox environment.
To switch to sandbox pass the sandbox API host using the ChangeBaseUrlTo(...) method when you construct the client:

var client = new Client();
client.ChangeBaseUrlTo("https://api.sandbox.dnsimple.com");

var credentials = new OAuth2Credentials("...");
client.AddCredentials(credentials);

You will need to ensure that you are using an access token created in the sandbox environment. Production tokens will not work in the sandbox environment.

Setting a custom User-Agent header

You can customize the User-Agent header for the calls made to the DNSimple API:

var client = new Client();
client.SetUserAgent("my-app/1.0");

The value you provide will be prepended to the default User-Agent the client uses. For example, if you use my-app/1.0, the final header value will be my-app/1.0 dnsimple-csharp/0.14.0 (note that it will vary depending on the client version).

We recommend to customize the user agent. If you are building a library or integration on top of the official client, customizing the client will help us to understand what is this client used for, and allow to contribute back or get in touch.

License

Copyright (c) 2020 DNSimple Corporation. This is Free Software distributed under the MIT license.

:warning: Development Warning

This project targets the development of the API client for the DNSimple API v2.

This version is currently under development, therefore the methods and the implementation should he considered a work-in-progress. Changes in the method naming, method signatures, public or internal APIs may happen at any time.

The code is tested with an automated test suite connected to a continuous integration tool, therefore you should not expect bugs to be merged into master. Regardless, use this library at your own risk.

DNSimple C# Client

A C# client for the DNSimple API v2.

Build Status

Installation

Where &lt;version&gt; denotes the version of the client you want to install.

Package Manager

PM> Install-Package DNSimple -Version <version>

.NET CLI

>  dotnet add package DNSimple --version <version>

.NET CLI

<PackageReference Include="DNSimple" Version="0.8.3-alpha" />

Usage

This library is a C# client you can use to interact with the DNSimple API v2. Here are some examples.

using dnsimple;

var client = new Client();
var credentials = new OAuth2Credentials("...");
client.AddCredentials(credentials);

# Fetch your details
var response = client.Identity.Whoami();   // execute the call
var account = response.Data.Account;       // extract the relevant data from the response or
client.Identity.Whoami().Data.Account;     // execute the call and get the data in one line

# You can also fetch it from the whoami response
# as long as you authenticate with an Account access token
var whoami = client.Identity.Whoami();
var accountId = whoami.Account.Id;

List your domains

using dnsimple;

var client = new Client();
client.AddCredentials(new OAuth2Credentials("..."));

var accountId = client.Identity.Whoami().Data.Account.Id;
var domains = client.Domains.ListDomains(accountId).Data.Domains;

Create a domain

using dnsimple;

var client = new Client();
client.AddCredentials(new OAuth2Credentials("..."));

var accountId = client.Identity.Whoami().Data.Account.Id;
var domain = client.Domains.CreateDomain(accountId, new Domain{ Name = "example.com" }).Data;

Retrieve a domain

using dnsimple;

var client = new Client();
client.AddCredentials(new OAuth2Credentials("..."));

var accountId = client.Identity.Whoami().Data.Account.Id;
var domainId = client.Domains.ListDomains(accountId).Data.First().Id;
var domain = client.Domains.GetDomain(accountId, domainId).Data;

Sandbox Environment

We highly recommend testing against our sandbox environment before using our production environment.
This will allow you to avoid real purchases, live charges on your credit card, and reduce the chance of your running up against rate limits.

The client supports both the production and sandbox environment.
To switch to sandbox pass the sandbox API host using the ChangeBaseUrlTo(...) method when you construct the client:

var client = new Client();
client.ChangeBaseUrlTo("https://api.sandbox.dnsimple.com");

var credentials = new OAuth2Credentials("...");
client.AddCredentials(credentials);

You will need to ensure that you are using an access token created in the sandbox environment. Production tokens will not work in the sandbox environment.

Setting a custom User-Agent header

You can customize the User-Agent header for the calls made to the DNSimple API:

var client = new Client();
client.SetUserAgent("my-app/1.0");

The value you provide will be prepended to the default User-Agent the client uses. For example, if you use my-app/1.0, the final header value will be my-app/1.0 dnsimple-csharp/0.14.0 (note that it will vary depending on the client version).

We recommend to customize the user agent. If you are building a library or integration on top of the official client, customizing the client will help us to understand what is this client used for, and allow to contribute back or get in touch.

License

Copyright (c) 2020 DNSimple Corporation. This is Free Software distributed under the MIT license.

Release Notes

Currently the following APIs are available on this client:
     Accounts, Identity, Certificates, Contacts, Domains (Collaborators,
     DNSSEC, Email Forwards, Pushes), Registration (Delegation, Auto Renewal,
     Whois Privacy), Services (Domain Services), Templates, Tlds,
     Vanity Name Servers, Webhooks and Zones (Records).

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
0.9.0 79 6/18/2020
0.8.3-alpha 468 4/29/2020
0.8.0-alpha-27042020 181 4/27/2020
0.6.1 16,207 2/18/2016
0.6.0 1,305 11/7/2014
0.5.2 727 11/6/2014
0.5.1 719 11/6/2014
0.5.0 517 10/23/2014
0.4.2 1,089 7/17/2012
0.4.1 792 3/9/2012
0.4.0 672 3/9/2012
0.3.1 709 2/24/2012
0.2.0 724 2/9/2012
0.1.4 661 2/9/2012