Game Data API

Suggestions will be moved here once processed.

Moderator: Oversight Staff

Anders458
Donator
Posts: 19
Joined: Sat Aug 29, 2015 6:23 pm
Been thanked: 3 times

Game Data API

Postby Anders458 » Sat Apr 21, 2018 2:21 am

Hello,

I have mentioned it a few times but thought I would try to formalize a discussion:

Presumably ENT collects quite a bit of pretty interesting game data by hosting loads of games. I was wondering to what extent others too would find it interesting to have some kind of public data api available so that developers could make things like Discord bots with more advanced stat features, or analyse large volumes of replays.

Just an example of what I mean (I am assuming a database schema somewhat similar to default GHost++):

https://api.entgaming.net/player/anders?limit=30
Get the last hundred games played with W3MMD data (if applicable), stay time, timestamps, gameids etc.

https://api.entgaming.net/game/2219
Get an overview of game 2219 statistics including the replay link, duration, timestamp, players and their ids etc.

https://api.entgaming.net/bots
Get a list of all of the running bots

https://api.entgaming.net/bots/5
Get a list of all of the games currently being hosted by the botid=5 and players playing

https://api.entgaming.net/bots/5/lobby
Get the players in the lobby with botid=5

etc.etc. obviously just RESTish but with a bit of spice :)

--

Now ideally this would be, in the spirit of GHost++, some kind of open source project which would really be more of a community project which ENT happens to run on their platform. That way other wc3 communities would also be able to use it provided they use a GHost-esq db schema (*cough* MMH *cough* hehe :D ).

Personally I think one of the most interesting features of hosting using bots instead of by player (apart obviously from stuff like cross-realm, latency etc) is that there is LoAdS of data that is being collected but from what I see not so much being done with it.

If I don't get completely shot down (which I am okay with its just an idea :) ) I would be more than happy to start the project, I actually already have a lot of this kind of stuff written from when I was hosting myself.

I'm eager to hear thoughts!

Cheers,

Anders

Unitil
Oversight Staff
Posts: 5180
Joined: Mon Mar 20, 2017 5:56 am
Location: Canada
Been thanked: 114 times

Re: Game Data API

Postby Unitil » Sat Apr 21, 2018 2:42 am

I believe this is already covered by our Open Stats page, and also our Games List page. In addition to this, you can see the current status of our bots on all realms if you visit our Bot Status page.

Open Stats:
Allows searching specific usernames, and this provides a recently played games list. The recently played games can be selected to review the games information, and to download the replay should you so desire. In addition to this, if they've played any rank games, you can select the game type in the top bar, and then search for the username to retrieve their ELO on that account (splits it based on realm).

Games List:
This provides a list of available lobbies, and below is a checkbox for "Include games in progress", to see games currently on-going as well. You can click said games to view who is in the lobby, what map is being hosted, and the duration of the lobby/game currently.

Bot Status:
Provides a detailed list of all our bots, the games they are currently hosting (lobby), and what realms they are currently logged onto.

So, what additional information are you hoping to be made public?

@Anders458

Anders458
Donator
Posts: 19
Joined: Sat Aug 29, 2015 6:23 pm
Been thanked: 3 times

Re: Game Data API

Postby Anders458 » Sat Apr 21, 2018 3:26 am

That is true indeed, but I was talking about something more programmatically-friendly. It is certainly possible to extract the information from each of the pages you mentioned, but obviously working with an html response is a lot more cumbersome than a json response particularly when you need to dig through several different documents to get all of the relevant info. Really the point would be to encourage someone who is interested to make something cool.

Lame Anecdote:

Spoiler!
I can tell you, since I admit I have already done it for the ENT gamelist, that there is a fair amount more work involved in producing the response for any of the example requests I mentioned above. For example, a few folks asked for a Discord bot to notify them when their game name showed up on the ENT list, but there is an important distinction between privately hosted games, autohosted games and the games in progress when notifying people. But with a bit of digging its pretty easy to see how it was setup.

After that you would have to do another request to get the list of players which are in the lobby, but this is actually also an html response so you have to parse through that one too, let alone the fact that there are different response formats depending on whether or not the game supports elo stats etc.

That whole process would be as simple as: https://api.entgaming.net/bots/5/lobby


The point is that the spirit of the idea is to provide a friendly programmatic interface by which the interested folks could access the data.

To answer your question of what more information: a lot of maps support w3mmd (which I believe seems to have been more or less fried via the latest patch, not sure if it has been fixed). A lot of times I would think that data is actually a lot more useful than the generic gameplayer stats the bot collects which would really be quite an attraction for map developers interested in supporting custom stats for their map. I could be blind but I don't think that all of that is available in open stats but more importantly even if it is, it would probably be about as much of a pain to fetch as that gamelist stuff :).

@Unitil

jcpolo96
Basic Tree
Posts: 5
Joined: Mon Mar 20, 2017 11:42 am

Re: Game Data API

Postby jcpolo96 » Sat Apr 21, 2018 6:38 pm

ITS A great idea!! Would love to see it work!
Would improve our wc3 community!
Cheers!
-Polo

hunrito
Basic Tree
Posts: 8
Joined: Thu Dec 04, 2014 5:48 pm

Re: Game Data API

Postby hunrito » Sat Apr 21, 2018 6:40 pm

Easier programming means better discord bots or virtual lobbies. more bots = more games played. lets save the community together.

User avatar
HazarDous
Staff Department
Posts: 9051
Joined: Mon Jan 12, 2015 9:36 pm
Has thanked: 70 times
Been thanked: 227 times

Re: Game Data API

Postby HazarDous » Mon Apr 23, 2018 2:37 am

@Anders458

Contact me on discord.


Return to “Suggestion Archive”

Who is online

Users browsing this forum: No registered users and 22 guests