/ltdsdk

LegionTD 2 SDK for Go

Primary LanguageGo

LegionTD 2 SDK for Go

Coverage ghactions

Dev/API Discord

This is an experimental SDK that I am writting in Go, contributions are welcome.

Getting started

$ go get github.com/syrull/ltdsdk

Example of getting an example unit

package main

import (
	"fmt"

	"github.com/syrull/ltdsdk"
)

func main() {
	api := ltdsdk.NewLTDSDK("API_KEY", "https://apiv2.legiontd2.com/")
	unit, _ := api.GetUnit("Pollywog")
	fmt.Println(unit.Name)
	fmt.Println(unit.DamagePerSecond)
}

Runing the tests

$ go test

Examples