Skip to content

wandelbotsgmbh/nova-api-client-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

nova-api-client-go

A simple client for the Wandelbots Nova API.

basic usage

go get github.com/wandelbotsgmbh/nova-api-client-go/v25

Example:

func ListControllers(host string, cell string) ([]v25.ControllerInstance, error) {
	client, err := v25.NewClientWithResponses(host)
	if err != nil {
		return nil, err
	}

	resp, err := client.ListControllersWithResponse(context.TODO(), cell)
	if err != nil {
		return []v25.ControllerInstance{}, err
	}

	if !StatusSuccessfull(resp.StatusCode()) {
		return []v25.ControllerInstance{}, fmt.Errorf("failed to list controllers %s", resp.Status())
	}

	return resp.JSON200.Instances, nil
}

About

Autogenerated Golang client API for Wandelbots Nova

Resources

License

Stars

Watchers

Forks