terraform/vendor/gopkg.in/ns1/ns1-go.v2
Pasha Palangpour ce633f2321 provider/ns1: Add notify list resource (#12373)
* Allow for local development with ns1 provider.

* Adds first implementation of ns1 notification list resource.

* NS1 record.use_client_subnet defaults to true, and added test for field.

* Adds more test cases for monitoring jobs.

* Adds webhook/datafeed notifier types and acctests for notifylists.

* Adds docs for notifylists resource.

* Updates ns1-go rest client via govendor

* Fix typos in record docs
2017-03-05 16:21:06 +02:00
..
rest provider/ns1: Add notify list resource (#12373) 2017-03-05 16:21:06 +02:00
LICENSE.txt Ns1 provider (#10782) 2017-01-23 21:41:07 +00:00
README.md provider/ns1: Add notify list resource (#12373) 2017-03-05 16:21:06 +02:00
doc.go Ns1 provider (#10782) 2017-01-23 21:41:07 +00:00

README.md

Build Status GoDoc

NS1 Golang SDK

The golang client for the NS1 API: https://ns1.com/api/

Installing

$ go get gopkg.in/ns1/ns1-go.v2

Examples

See more

package main

import (
	"fmt"
	"log"
	"net/http"
	"os"
	"time"

	api "gopkg.in/ns1/ns1-go.v2/rest"
)

func main() {
	k := os.Getenv("NS1_APIKEY")
	if k == "" {
		fmt.Println("NS1_APIKEY environment variable is not set, giving up")
	}

	httpClient := &http.Client{Timeout: time.Second * 10}
	client := api.NewClient(httpClient, api.SetAPIKey(k))

	zones, _, err := client.Zones.List()
	if err != nil {
		log.Fatal(err)
	}

	for _, z := range zones {
		fmt.Println(z.Zone)
	}

}

Contributing

Contributions, ideas and criticisms are all welcome.

LICENSE

Apache2 - see the included LICENSE file for more information