A Go library for using the Namecheap API.
package main
import (
"fmt"
namecheap "github.com/billputer/go-namecheap"
)
func main() {
apiUser := "billwiens"
apiToken := "xxxxxxx"
userName := "billwiens"
client := namecheap.NewClient(apiUser, apiToken, userName)
// Get a list of your domains
domains, _ := client.DomainsGetList()
for _, domain := range domains {
fmt.Printf("Domain: %+v\n\n", domain.Name)
}
}
For more complete documentation, load up godoc and find the package.
- Source hosted at GitHub
- Report issues and feature requests to GitHub Issues
Pull requests welcome!
Most concepts and code borrowed from the excellent go-dnsimple.