tcindex/tcindex.go
func New(credentials *tcclient.Credentials, rootURL string) *Index {
	return &Index{
		Credentials:  credentials,
		BaseURL:      tcclient.BaseURL(rootURL, "index", "v1"),
		Authenticate: credentials != nil,
	}
}
func New(credentials *tcclient.Credentials, rootURL string) *Index {
	return &Index{
		Credentials:  credentials,
		BaseURL:      tcclient.BaseURL(rootURL, "index", "v1"),
		Authenticate: credentials != nil,
	}
}
// New returns an Index client, configured to run against production. Pass in
// nil credentials to create a client without authentication. The
// returned client is mutable, so returned settings can be altered.
//
//  index := tcindex.New(
//      nil,                                      // client without authentication
//      "http://localhost:1234/my/taskcluster",   // taskcluster hosted at this root URL on local machine
//  )
//  err := index.Ping(.....)                      // for example, call the Ping(.....) API endpoint (described further down)...
//  if err != nil {
//  	// handle errors...
//  }