⚠️ Work in Progress: This library is in early development. I'm starting by implementing the Classic WoW API. Contributions welcome.
A simple Go client library for interacting with the Battle.net API.
go get github.com/kjhickman/bnet-clientpackage main
import (
"fmt"
"github.com/kjhickman/bnet-client"
)
func main() {
config := client.Config{
ClientID: "your-client-id",
ClientSecret: "your-client-secret",
}
client, err := client.NewClient(config)
if err != nil {
log.Fatalf("Failed to create client: %v", err)
}
token, err := client.GetWoWToken(context.Background())
if err != nil {
log.Fatalf("Failed to get WoW token info: %v", err)
}
fmt.Printf("WoW Token Price: %d gold\n", token.Price)
}See the examples directory for usage examples.
This project is MIT Licensed.