Official Content > News

Unleashing a HTTP-based API for the Soldat Lobby

(1/8) > >>

jrgp:
Update docs here: https://wiki.soldat.pl/index.php/Lobby_HTTP_API

For almost a decade, the only way of querying the Soldat Lobby to see what servers are online has been to use an aging, proprietary, protocol over sockets which is inconvenient if you want to build an app to make use of lobby data.

To make building 3rd party apps or other tools for Soldat easier, I just implemented support for getting and filtering the currently online Soldat servers over JSON+HTTP, slightly similar to the API for KAG.

List of all servers: http://api.soldat.pl/v0/servers

Example of some queries with the currently-supported filters:

http://api.soldat.pl/v0/servers?empty=no&bots=no&full=no&version=1.7.1
http://api.soldat.pl/v0/servers?empty=yes

Info on one specific server: http://api.soldat.pl/v0/server/88.198.8.206/23020
Players for that one server: http://api.soldat.pl/v0/server/88.198.8.206/23020/players

Note: the json returned is compacted for speed reasons. To view it easier, install a browser extension for pretty printing json (there are many) or from the command line, run a command like this:

curl -s 'http://api.soldat.pl/v0/servers' | python -m json.tool

I look forward to seeing people build cool things using this new API. Please provide any suggestions or feature requests in this thread.  :D

Shoozza:
Sounds like the soldat.pl lobby website could possibly use this with clientside javascript.

Great job  8)

SyavX:
GJ

I suggest to rename some fields:
"OsType"    "OSType"
"Ip"        "IP"
"Wm"        "WM"
"Be"        "AC" (as it's called Anti-Cheat in Soldat client)

Furai:
Nice. thanks for working on this! :)

machina:
Cool! :D

How about serving in-game players' nicknames? It was possible over TCPbut it worked pretty randomly (what actually discouraged me to implement anything with this thing).

Navigation

[0] Message Index

[#] Next page

Go to full version