Skip to content

Latest commit

 

History

History
43 lines (26 loc) · 1.42 KB

README.md

File metadata and controls

43 lines (26 loc) · 1.42 KB

Steam Gameserver REST API

A REST API for pulling Steam Gameserver Tokens through Steamworks Web API.

Its wraps the IGameServersService Interface, and the code has been built on knowledge from two sources.
A community made API reference.
And the Steamworks Documentation Website.

Getting started

The application need a STEAM_WEB_API_KEY environment variable, which can be generated / found here.

It will listen on 0.0.0.0:8000, unless you override with the STEAM_WEB_API_BIND_ADDRESS environment variable.

It returns tokens as text/plain on the following URL:

[GET] /token/{appID}/{memo}

  • appID is the Steam Application ID (e.g. 740 for CSGO dedicated server)
  • memo is a note that uniquely identifies a gameserver

The library it uses to communicate with Steamworks Web API is nested in this project.

Errors

Errors from the Steamworks Web API will be forwarded as JSON objects.

{ "error": "some error happened" }

Build

# Windows
GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o steam-api.exe main.go app.go

# Linux
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o steam-api main.go app.go

# OSX
GOOS=darwin go build -ldflags="-s -w" -o steam-api main.go app.go

Optionally, you can cut down binary size with upx --brute.