go-namecheap-sdk

module
v2.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2022 License: Apache-2.0

README

Go Namecheap SDK

Go Reference

Getting
$ go get github.com/imokyou/go-namecheap-sdk/v2
Usage
import (
    "github.com/imokyou/go-namecheap-sdk/v2"
)

client := NewClient(&ClientOptions{
    UserName:   "UserName",
    ApiUser:    "ApiUser",
    ApiKey:     "ApiKey",
    ClientIp:   "10.10.10.10",
    UseSandbox: false,
})

setHostsResp, err := client.DomainsDNS.SetHosts(&namecheap.DomainsDNSSetHostsArgs{
    Domain: namecheap.String("domain.com"),
    Records: &[]namecheap.DomainsDNSHostRecord{
        {
            HostName:   namecheap.String("blog"),
            RecordType: namecheap.String("A"),
            Address:    namecheap.String("11.12.13.14"),
        },
    },
})

// ...

response, err := client.DomainsDNS.GetHosts("domain.com")

// ...
Sandbox

Before you start using our API, we advise you to try it in our Sandbox environment. The sandbox environment was created explicitly for testing purposes. All purchases processed through the sandbox API are simulated.

To start testing API in Sandbox, you will need to sign up for an account here (this account will not be associated with the one you have at http://www.namecheap.com).

Contributing

To contribute, please read our contributing docs.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL