transip-client 0.1.1-alpha

This is a prerelease version of transip-client.
dotnet add package transip-client --version 0.1.1-alpha
NuGet\Install-Package transip-client -Version 0.1.1-alpha
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="transip-client" Version="0.1.1-alpha" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add transip-client --version 0.1.1-alpha
#r "nuget: transip-client, 0.1.1-alpha"
#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 transip-client as a Cake Addin
#addin nuget:?package=transip-client&version=0.1.1-alpha&prerelease

// Install transip-client as a Cake Tool
#tool nuget:?package=transip-client&version=0.1.1-alpha&prerelease

TransIP.Client

TransIP API v6 client for C#

.NET Standard 2.1 GitHub issues license NuGet

Do you like that i take the effort to make a public client API in C# for the TransIP Rest API?

Buy me a coffee or contribute to this project.

"Buy Me A Coffee"

[!WARNING]
This repository is still in development. I am not responsible for any errors in this code. Use at your own risk.

Get all owned domains

TransIpApi transIp = new TransIpApi("username", "private_key", ClientMode.ReadWrite); // ClientMode.ReadOnly also available.

try
{
    var domains = await transIp.domainService().GetAllDomainsAsync(AdditionalData.Nameservers | AdditionalData.Contacts);

    foreach (var domain in domains)
    {
        Console.WriteLine(domain.Name);
    }
}
catch ( Exception ex )
{
    Console.WriteLine (ex.Message);
}

Get nameservers

TransIpApi transIp = new TransIpApi("username", "private_key", ClientMode.ReadWrite); // ClientMode.ReadOnly also available.

try
{
    var domainService = transIp.domainService("domain.nl");
    var nameservers = await domainService.GetNameserversAsync();

    foreach (Nameserver ns in nameservers)
    {
        Console.WriteLine(ns.Hostname);
    }
}
catch ( Exception ex )
{
    Console.WriteLine (ex.Message);
}

Set nameservers

TransIpApi transIp = new TransIpApi("username", "private_key", ClientMode.ReadWrite); // ClientMode.ReadOnly also available.

var nameservers = new List<Nameserver>
{
    new Nameserver { Hostname = "ns0.transip.net" }, // Optional: Ipv4 and Ipv6 properties
    new Nameserver { Hostname = "ns1.transip.nl" },
    new Nameserver { Hostname = "ns2.transip.eu" }
};

try
{
    var domainService = transIp.domainService("domain.nl");
    
    if (await domainService.SetNameserversAsync(nameservers))
    {
        Console.WriteLine("Nameservers successfully updated");
    }
}
catch ( Exception ex )
{
    Console.WriteLine (ex.Message);
}
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
0.1.1-alpha 57 2/12/2024
0.1.0-alpha 65 2/9/2024

Retrieve list of owned domains
Retrieve domain information
Get nameservers for domain
Set nameservers for domain