serverscom-go-client is a Go client library for accessing the Servers.com API
Unstable, in development
client := serverscom.NewClient("my-jwt-token")
hosts, err := client.Hosts.Collection().Collect()
if err != nil {
panic(err.Error())
}
for h, i := range hosts {
log.Println(fmt.Sprintf("Host: %s, with title: %s, private ipv4: %s, public ipv4: %s", h.ID, h.Title, h.PrivateIPv4Address, h.PublicIPv4Address))
}
The library is available as open source under the terms of the MIT License.