Skip to content

Latest commit

 

History

History
31 lines (26 loc) · 1.02 KB

README.md

File metadata and controls

31 lines (26 loc) · 1.02 KB

lwapi

LeaseWeb Cloud API library in Golang, you can find the full API documentatoin here

Build Status GoDoc codecov

Install

go get github.com/OpenSourceZombie/lwapi

Simple Example:

package main

import (
	"fmt"
	"log"
	"github.com/OpenSourceZombie/lwapi"
)
func main() {
	    lwclient := lwapi.LW{
        AuthToken: "****-****-****-****",
    }
	vServerslList, err := lwclient.GetVirtualServersList()
	if err != nil {
		log.Println(err)
	}
	for k, vServer := range vServerslList.VirtualServers {
		fmt.Printf("%d.\t%s\t%s\n", k, vServer.Reference, vServer.Ips[0].IP)
	}
}