DNSimple 0.10.0
See the version list below for details.
dotnet add package DNSimple --version 0.10.0
NuGet\Install-Package DNSimple -Version 0.10.0
<PackageReference Include="DNSimple" Version="0.10.0" />
paket add DNSimple --version 0.10.0
#r "nuget: DNSimple, 0.10.0"
// Install DNSimple as a Cake Addin #addin nuget:?package=DNSimple&version=0.10.0 // Install DNSimple as a Cake Tool #tool nuget:?package=DNSimple&version=0.10.0
DNSimple C# Client
A C# client for the DNSimple API v2.
Installation
Where <version>
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
Note: Replace X.Y.Z
with the actual version.
<PackageReference Include="DNSimple" Version="X.Y.Z" />
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().Data;
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;
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) 2021 DNSimple Corporation. This is Free Software distributed under the MIT license.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Newtonsoft.Json (>= 13.0.1)
- RestSharp (>= 106.11.7)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.18.1 | 2,560 | 3/12/2024 |
0.18.0 | 515 | 1/16/2024 |
0.17.0 | 223 | 12/12/2023 |
0.16.0 | 154 | 12/7/2023 |
0.15.0 | 970 | 8/10/2023 |
0.14.0 | 62,034 | 3/3/2023 |
0.13.6 | 3,606 | 9/20/2022 |
0.13.5 | 27,363 | 2/15/2022 |
0.13.4 | 593 | 2/10/2022 |
0.13.0 | 1,714 | 11/9/2021 |
0.12.0 | 6,479 | 5/19/2021 |
0.11.0 | 457 | 4/22/2021 |
0.10.0 | 413 | 4/1/2021 |
0.9.0 | 1,108 | 6/18/2020 |
0.8.3-alpha | 795 | 4/29/2020 |
0.8.0-alpha-27042020 | 508 | 4/27/2020 |
0.6.1 | 18,023 | 2/18/2016 |
0.6.0 | 2,067 | 11/7/2014 |
0.5.2 | 1,405 | 11/6/2014 |
0.5.1 | 1,445 | 11/6/2014 |
0.5.0 | 1,234 | 10/23/2014 |
0.4.2 | 1,833 | 7/17/2012 |
0.4.1 | 1,549 | 3/9/2012 |
0.4.0 | 1,410 | 3/9/2012 |
0.3.1 | 1,503 | 2/24/2012 |
0.2.0 | 1,484 | 2/9/2012 |
0.1.4 | 1,433 | 2/9/2012 |
FIXED: Adds missing CDNSKEY & CDS record types (#32). (dnsimple/dnsimple-csharp#32)
FIXED: Avoids setting UserAgent on ChangeBaseUrlTo if Client is provided. (dnsimple/dnsimple-csharp#22)
CHANGED: Moves / Migrates project to .NET standard (dnsimple/dnsimple-csharp#23)
CHANGED: Contact.Fax is not required anymore. (dnsimple/dnsimple-csharp#16)
CHANGED: Certificate.ExpiresOn has been replaced by Certificate.ExpiresAt. (dnsimple/dnsimple-csharp#14)
CHANGED: Domain.ExpiresOn has been replaced by Domain.ExpiresAt. (dnsimple/dnsimple-csharp#11)