Skip to content

Latest commit

 

History

History
32 lines (28 loc) · 534 Bytes

readme.md

File metadata and controls

32 lines (28 loc) · 534 Bytes

Simple ovh domain api

Get the api:

go get github.com/alexisvisco/ovh-domain-api

Thenn just use it:

import (
	"fmt"
	"github.com/alexisvisco/ovh-domain-api/domain"
	"github.com/alexisvisco/ovh-domain-api/domain/subsidiary"
)

func main() {
	client, e := domain.NewClient(subsidiary.FR)
	if e != nil {
		panic(e)
	}
	results, e := client.DomainInfo("google.fr")
	if e != nil {
		if e == domain.UnknownExtension {
			fmt.Println("UnknownExtension")
		} else {
			panic(e)
		}
	}
	fmt.Println(results.IsTaken())
}