Skip to content

LukasCRMarketing/Namecheap-dot-net

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Namecheap-dot-net

A .NET wrapper for the Namecheap API, with support for the NameCheap Sandbox.

NuGet version (NameCheapDotNet)

Sample Code

Check the availability of several domain names

var api = new NameCheapApi("{username}", "{apiUser}", "{apiKey}", "{clientIp}", isSandbox: false);

var domains = api.Domains.AreAvailable("google.com", "ANewDomainName");

foreach (var domain in domains)
    Console.WriteLine(domain.DomainName + ": " + domain.IsAvailable);

Set DNS host records for a given domain in the Sandbox

var api = new NameCheapApi("{username}", "{apiUser}", "{apiKey}", "{clientIp}", isSandbox: true);
 
api.Dns.SetHosts(
    new DnsHostsRequest
    {
        SLD = "YourDomainName",
        TLD = "com",
        HostEntries = new HostEntry[] { new HostEntry() { 
            Address = "192.168.1.1",
            HostName = "@",
            RecordType =  RecordType.A
        } }
    });

About

A .NET wrapper for the Namecheap API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%