Steam Web API Implementation in Golang.
Steam API described in the valve documentation.
go get github.com/gorcon/steamweb
See Changelog for release details.
package main
import (
"encoding/json""fmt""log"
steamweb "github.com/gorcon/steamweb/steamwebdraft"
)
funcmain() {
client:=steamweb.NewClient(&steamweb.Config{Key: "{Steam API Key}"})
servers, err:=client.GetServerList(&steamweb.GetServerListFilter{}) // Set filters hereiferr!=nil {
log.Fatal(err)
}
js, _:=json.Marshal(servers)
fmt.Println(string(js))
}Go 1.23 or higher
Contributions are more than welcome!
If you think that you have found a bug, create an issue and publish the minimum amount of code triggering the bug, so it can be reproduced.
If you want to fix the bug then you can create a pull request. If possible, write a test that will cover this bug.
MIT License, see LICENSE