Open mstefarov opened 11 years ago
Out of curiosity, @fragmer, how come you guys don't have a JSON API for ClassiCube login? Parsing HTML with regexes is messy and prone to breaking. It'd make integration a lot easier too.
Sure, the Minecraft login might be HTML, but you guys are better than that! You're extending functionality, so why not make logging in just as easy? :shipit:
I have to agree with this, this is a poor web API for ClassiCube. If you want more support for ClassiCube seen in more software, you're gonna have to do better.
The reason HTML scrapping was done in minecraft classic was simple, it _had_ to be done. Mojang did not and was not planning on giving us an easy API to work with. This is different with ClassiCube and should be. If you want software developers to support ClassiCube, you have to make it easy for them, otherwise they just won't bother.
Good points! I have plans to add an API page for login, which is currently the only thing the client needs that isn't available via the API.
The serverlist (complete, with mppasses and uptimes and everything) is available via /api/serverlist
.
If you fellas want to hang out on our irc - #classicube on irc.esper.net - you can suggest other things that ClassiCube should have.
Instead of attempting to make changes to Charged-Miners (which is effectively a dead project), I created a new launcher instead, that handles classicube support.
Project page: https://github.com/Charged/CCChargedMinersLauncher
Download (Win): http://cm-cdn.fcraft.net/launcher/ChargedMiners01.exe Download (Linux): http://cm-cdn.fcraft.net/launcher/ChargedMiners01.jar
Sign-in procedure:
http://www.classicube.net/acc/login
csrf_token
hidden input field.http://www.classicube.net/acc/login
.csrf_token=STORED_TOKEN&username=USERNAME&password=PASSWORD
&remember_me=y
Login failed
.<a href="/acc" class="button">USERNAME</a>
Server list URL:
http://www.classicube.net/server/list
Server list format (excerpt):
Play page URL:
http://www.classicube.net/server/play/SERVER_HASH
Play page format (excerpt):