Skip to content

OpenSourceZombie/lwapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)
	}
}

Releases

No releases published

Packages

No packages published