DynuSharp 1.0.1

dotnet add package DynuSharp --version 1.0.1                
NuGet\Install-Package DynuSharp -Version 1.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DynuSharp" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DynuSharp --version 1.0.1                
#r "nuget: DynuSharp, 1.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install DynuSharp as a Cake Addin
#addin nuget:?package=DynuSharp&version=1.0.1

// Install DynuSharp as a Cake Tool
#tool nuget:?package=DynuSharp&version=1.0.1                

DynuSharp

<img width="64" height="auto" src="https://github.com/CwistSilver/DynuSharp/blob/main/icon.png">

DynuSharp NuGet

Thanks to Dynu

A big thanks to Dynu for offering such a versatile platform that spans beyond DNS services to include email, domain registration, and more. Their provision of a free tier is a testament to their commitment to making powerful web solutions accessible to everyone. Check out Dynu's website for more information on their services.

Overview

DynuSharp is a .NET library designed to facilitate seamless integration with Dynu's API, enabling developers to manage DNS, email, domain services, and more with utmost efficiency and security. This library leverages .NET's robust features to provide an intuitive interface for Dynu services, ensuring sensitive credentials are handled securely.

Features

  • Comprehensive API Coverage: Interact with Dynu's DNS, Email, and Domain services through a single, cohesive library.
  • Secure Secret Management: Implements advanced techniques to securely store and manage runtime secrets, including secure memory storage, obfuscation, and TPM-based solutions.
  • Flexible Authentication: Out-of-the-box support for API key and OAuth2, with the ability to extend or implement custom authentication mechanisms.

Authentication

DynuSharp offers built-in support for standard Dynu authentication methods (API key and OAuth2) and extends the capability to include custom authentication strategies through the 'IAuthentication' interface.<br/> <br/> For API credentials management, visit Dynu API Credentials.

Standard Authentication Methods

API Key Authentication
var apiKey = "your_api_key_here";
var client = new DynuClient(apiKey);
OAuth2 Authentication
var clientId = "your_client_id_here";
var secret = "your_client_secret_here";
var client = new DynuClient(clientId, secret);
Custom Authentication

DynuSharp's design embraces extensibility, allowing developers to implement their own authentication mechanisms by implementing the IAuthentication interface.

public class CustomAuthentication : IAuthentication
{
    // Implementation of custom authentication logic
}

var customAuth = new CustomAuthentication();
var client = new DynuClient(customAuth);
Secure Secret Management

DynuSharp secures sensitive information such as API keys, client secrets, and client IDs using AES encryption as standard practice. Encrypted data is stored and utilized in-memory, leveraging TPM module technology when available for enhanced security. As a fallback, obfuscation techniques are employed to slightly increase security. No secrets are permanently stored, ensuring they remain accessible only for the duration of the client's lifespan. While these measures significantly enhance the protection of sensitive information, it's acknowledged that no system can guarantee 100% security.

Example

Here's a quick demonstration of DynuSharp in action:

using var client = new DynuClient("api_key");
var dnsDomains = await client.DNS.Domains.GetListAsync();
foreach (var domain in dnsDomains)
{
    var records = await client.DNS.Records.GetListAsync(domain.Id);
    foreach (var record in records)
    {
        Console.WriteLine(record);
    }
}

This code snippet highlights how DynuSharp makes it straightforward to interact with Dynu's API, streamlining the process of managing DNS records with ease and efficiency.

DynuSharp.HttpTest Example

For a practical demonstration of 'DynuSharp' in action, check out the DynuSharp.HttpTest console application. This companion project serves as both a testing framework and an example implementation, showcasing how to integrate and validate connectivity with Dynu API endpoints. Whether you're new to 'DynuSharp' or looking for advanced usage examples, 'DynuSharp.HttpTest' provides valuable insights into the library's capabilities.

Contributing

Contributions to 'DynuSharp' are welcome. Follow these steps to contribute:

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/YourFeature)
  3. Commit your Changes (git commit -m 'Add YourFeature')
  4. Push to the Branch (git push origin feature/YourFeature)
  5. Open a Pull Request

Licence

'DynuSharp' is licenced under the MIT licence.

Dependencies

'DynuSharp' utilizes the following packages, which need to be included as dependencies in your project:

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
1.0.1 160 3/4/2024
1.0.0 130 2/3/2024