Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ahwm/GodaddyWrapper.Net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

276 Commits

Repository files navigation

GodaddyWrapper.Net

nuget build

A Brief Intro

GodaddyWrapper.NET is a .NET Wrapper for calling GoDaddy REST API.

Visit GoDaddy Rest API Docs

Usage

.NET Framework

var options = new GoDaddyClientOptions 
{
 AccessKey = "{key}",
 SecretKey = "{secret}",
 IsTesting = true /* false to use production */
};
var client = new GoDaddyClient(options);
try
{
 var response = await client.CheckDomainAvailable(new DomainAvailable
 {
 domain = "google.com"
 });
}
catch (GodaddyException ex) 
{
  //Godaddy Error Message from the Godaddy API
 Console.WriteLine(ex.ErrorResponse.Message);
 //Error Code
 Console.WriteLine(ex.StatusCode);
}

.NET Core/.NET 5+

Program.cs / Startup.cs

builder.Services.AddGoDaddy(
 configuration.GoDaddyAccessKey,
 configuration.GoDaddySecretKey,
 configuration.Sandbox);

Service Class (or controller)

public class GoDaddyDomainService(GoDaddyClient goDaddyClient)
try
{
 var response = await goDaddyClient.CheckDomainAvailable(new DomainAvailable
 {
 domain = "google.com"
 });
}
catch (GodaddyException ex) 
{
  //Godaddy Error Message from the Godaddy API
 Console.WriteLine(ex.ErrorResponse.Message);
 //Error Code
 Console.WriteLine(ex.StatusCode);
}

Version History

3.3.0

  • Fixed NameServers property on DomainUpdate request

3.2.0

  • Dependency updates

3.1.0

3.0.0

  • Various dependency updates
  • Eliminated new HttpClient instantiation for every API call

⚠️Breaking Changes

  • Renamed Client to GoDaddyClient
  • Constructor now takes GoDaddyClientOptions object (.NET Framework 4.6.2+ only)
  • Dependency injection pattern with builder.Services.AddGoDaddy() registration

2.0.0

  • Dropped explicit support for .NET Core 2.1
  • Updated support to .NET Standard 2.0
  • Added support for .NET 6

Remark

As I have only used the domain features (Suggested Domain, Buy Domain, CheckAvailable, etc.), I haven't tested the other parts of it so feel free to leave an issue if you find something wrong (also welcome to make a pull request). Please provide as much info as you can.

About

.Net GoDaddy API Wrapper in C#

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

Contributors 7

Languages

AltStyle によって変換されたページ (->オリジナル) /