Official Content > News

Unleashing a HTTP-based API for the Soldat Lobby

<< < (2/8) > >>

jrgp:

--- Quote from: Shoozza on April 10, 2017, 11:09:45 am ---Sounds like the soldat.pl lobby website could possibly use this with clientside javascript.

--- End quote ---

Definitely could.


--- Quote from: SyavX on April 10, 2017, 11:56:35 am ---GJ

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

--- End quote ---

That makes sense.


--- Quote from: machina on April 10, 2017, 02:28:00 pm ---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).

--- End quote ---

The soldat servers themselves don't provide the lobby with this information. You can reliabily get this information using REFRESH(X) over rcon, but that of course requires logging into each server.

Alternatively, I think it might be possible to use the tcp asset download port to grab logs/gamestat.txt without needing to authenticate. If this works then it would be possible to make this API interface provide players; however, this would only be on the individual server endpoints rather than the full list.

jrgp:

--- Quote from: jrgp on April 10, 2017, 07:37:17 pm ---Alternatively, I think it might be possible to use the tcp asset download port to grab logs/gamestat.txt without needing to authenticate. If this works then it would be possible to make this API interface provide players; however, this would only be on the individual server endpoints rather than the full list.

--- End quote ---

Yep, this works for grabbing gamestat.txt: https://wiki.soldat.pl/index.php/Download_thread

I'll see if I can implement support for that into this API on the server endpoints.

jrgp:

--- Quote from: jrgp on April 10, 2017, 07:51:01 pm ---I'll see if I can implement support for that into this API on the server endpoints.

--- End quote ---

Just did it. If you tack on /players to the end of an individual server URL, it will attempt to download gamestat.txt from that server and show the parsed out players.



(From http://api.soldat.pl/v0/server/108.61.204.90/23075/players )

machina:

--- Quote from: jrgp on April 10, 2017, 07:51:01 pm ---
--- Quote from: jrgp on April 10, 2017, 07:37:17 pm ---Alternatively, I think it might be possible to use the tcp asset download port to grab logs/gamestat.txt without needing to authenticate. If this works then it would be possible to make this API interface provide players; however, this would only be on the individual server endpoints rather than the full list.

--- End quote ---

Yep, this works for grabbing gamestat.txt: https://wiki.soldat.pl/index.php/Download_thread

I'll see if I can implement support for that into this API on the server endpoints.

--- End quote ---
Yea, I meant precisely this thing.


--- Quote from: jrgp on April 11, 2017, 05:13:48 am ---Just did it. If you tack on /players to the end of an individual server URL, it will attempt to download gamestat.txt from that server and show the parsed out players.

--- End quote ---
Great work, man! Now I have to think what to do with this API :D Most desirably a mobile app.

jrgp:

--- Quote from: machina on April 11, 2017, 03:51:34 pm ---Great work, man! Now I have to think what to do with this API :D Most desirably a mobile app.

--- End quote ---

Thanks! I really would love to see you build something with this API, even if it's something small.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version