QW Hub API
Web API serving QuakeWorld info
Usage
- Rename/edit
config.sample.json
to config.json
.
- Rename/edit
.env.example
to .env
.
- Build
./qw-hub-api
Config
See config.sample.json
Example
{
"port": 3000,
"servers": {
"active_server_interval": 4,
"server_interval": 30,
"master_interval": 14400,
"master_servers": [
"master.quakeworld.nu:27000",
"master.quakeservers.net:27000",
"qwmaster.ocrana.de:27000",
"qwmaster.fodquake.net:27000"
]
},
"qtv_demo_sources": [
{"address": "qw.irc.ax:28000", "demo_date_format": "ymd"},
{"address": "troopers.fi:28000", "demo_date_format": "ymd"},
{"address": "quake.se:28000", "demo_date_format": "Ymd"}
],
"streamers": {
"annihilazor": "anni",
"quakeworld": "[streambot]",
"suddendeathTV": "suddendeathTV",
"vikpe": "XantoM"
}
}
API endpoints
URL |
description |
/v2/servers |
All servers |
/v2/servers/mvdsv |
MVDSV servers |
/v2/servers/qwfwd |
QWFWD servers (proxies) |
/v2/servers/qtv |
QTV servers |
|
|
/v2/servers/<address> |
Server details |
/v2/servers/<address>/lastscores |
Server lastscores |
/v2/servers/<address>/laststats |
Server laststats |
|
|
/v2/masters/<address> |
List of servers on master |
|
|
/v2/demos |
Demos from popular servers |
/v2/streams |
Twitch streams casting Quake |
/v2/events |
Events (from Wiki) |
/v2/news |
News (from QuakeWorld.nu) |
/v2/forum_posts |
Forum posts (from QuakeWorld.nu Forum) |
Endpoint details
MVDSV servers
/v2/servers/mvdsv
Param |
Type |
Example |
Description |
has_player |
string |
has_player=xantom |
Servers where xantom is connected as player |
has_client |
string |
has_client=xantom |
Servers where xantom is connected |
Demos
/v2/demos
Param |
Type |
Default |
Example |
Description |
q |
string |
|
q=2on2 xantom dm3 |
Demos where filename matches 2on2 , xantom and dm3 |
mode |
string |
|
mode=2on2 |
Demos with mode 2on2 |
qtv_address |
string |
|
qtv_address=quake.se |
Demos from quake.se qtv server |
limit |
int [1-500] |
100 |
limit=10 |
Limit to 10 demos |
Build
go build
Development
Run locally.
./qw-hub-api
Now you try an endpoint, e.g. http://localhost:3000/v2/servers
Credits