package main

import (
	"fmt"
	"github.com/ovh/go-ovh/ovh"
)

func main() {
	client, err := ovh.NewEndpointClient("ovh-eu")
	if err != nil {
		fmt.Printf("Error: %q\n", err)
		return
	}

	// Get all actual VPS
	allVPS := []string{}
	if err := client.Get("/vps/", &allVPS); err != nil {
		fmt.Printf("Error: %q\n", err)
		return
	}

	// Get the details of each VPS
	for i, vpsName := range allVPS {
		fmt.Printf("#%d : %+v\n", i+1, vpsName)
	}
}
