Skip to content

Latest commit

 

History

History
36 lines (25 loc) · 675 Bytes

README.md

File metadata and controls

36 lines (25 loc) · 675 Bytes

NETSKOPE-API-CLIENT-GO

The NSGO Package is an API client developed in GO for use with the Netskope v2 APIs. The client was developed for and is used by the Netskope Terraform Provider.

Requirements

  • Go >= 1.20

Usage

package main

import (
	"fmt"
	"os"

	"github.com/netskopeoss/netskope-api-client-go/nsgo"
)

func main() {
	//Init a client instance
	nsclient := nsgo.NewClient(os.Getenv("NS_BaseURL"), os.Getenv("NS_ApiToken"))

	//Get Publishers
	pubs, err := nsclient.GetPublishers()
	if err != nil {
		fmt.Println(err)
		return
	}

	fmt.Println(pubs)

}