Skip to content

Latest commit

 

History

History
58 lines (41 loc) · 1.56 KB

File metadata and controls

58 lines (41 loc) · 1.56 KB

steamweb

GitHub Build Go Coverage Go Report Card GoDoc

Steam Web API Implementation in Golang.

API Specifications

Steam API described in the valve documentation.

Install

go get github.com/gorcon/steamweb

See Changelog for release details.

Usage

package main

import (
	"encoding/json"
	"fmt"
	"log"

	steamweb "github.com/gorcon/steamweb/steamwebdraft"
)

func main() {
	client := steamweb.NewClient(&steamweb.Config{Key: "{Steam API Key}"})

	servers, err := client.GetServerList(&steamweb.GetServerListFilter{}) // Set filters here
	if err != nil {
		log.Fatal(err)
	}

	js, _ := json.Marshal(servers)

	fmt.Println(string(js))
}

Requirements

Go 1.23 or higher

Contribute

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.

License

MIT License, see LICENSE