-
Notifications
You must be signed in to change notification settings - Fork 396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement live games page (with pro players) #1148
Comments
My main concern is that circumventing Valve's "Expose Public Match Data" setting (which many pros disable) will lead to complaints and therefore Valve shutting down the APIs/access to replays. Does your script just use the Steam web API? If so, it will not show players who have the setting disabled. |
I thought about that concern as well, I guess it's another discussion whether Valve could or should do this. But yes, my script is using the steam web API (https://api.steampowered.com/) and identifying pros who don't expose their match data currently works with a look-up table (pairs of pro names and account ids) that I extracted from a web-archive view of dota2tvpro.com (currently only ~60 names though). Shutting down the API would be awful for the whole community, I personally don't think Valve would ever do this. However, I'm in no place to judge about this, so if you want to keep distance to this kind of feature that circumvents the "Expose Public Match Data" setting I can absolutely understand it and I will keep working on it independently of opendota. |
Doesn't the web API hide IDs of players who have the setting disabled by setting it to |
No, it still provides account ids. You just can't use the player API to receive match history etc. |
Can you link an example match ID where this is the case? |
I checked and you're partially right - GetMatchDetails does "hide" the real account id the way you explained it. GetTopLiveGame (the function that I use to retreive the games) however shows the real account id, example: https://api.steampowered.com/IDOTA2Match_570/GetTopLiveGame/v1/?key=API_KEY&partner=0 (please provide your own API Key here). |
Interesting. Well, since that's an official endpoint and it's not hiding the IDs I assume Valve is OK with it. I'd be open to accepting features utilizing that endpoint. How complete is the coverage? Are there are some pros whose games don't get picked up by that endpoint? |
I hope I understand your question correctly: yes, basically all players who are considered to be pros but are not part of my current look-up table are missing. As mentioned, I only included ~60 players so far which means that a lot of players - including the whole chinese scene and most of SEA - is still missing. However, I guess that's mostly a question of parsing different dota information sites for account ids of pro players, shouldn't be so hard to "complete" this. |
You can use this list that has about 1000 pro players and their IDs: https://api.opendota.com/api/proPlayers GetTopLiveGame doesn't appear to have the match ID as one of the fields. How are you planning to map the listed matches to the match ID? |
Oh very convenient, thanks for this list! GetTopLiveGame doesn't provide a match ID, but a steam_server_id. The steam_server_id is the parameter you can use for GetRealtimeStats (https://api.steampowered.com/IDOTA2MatchStats_570/GetRealtimeStats/v1) which provides you a match ID. Took me some time to find that out... |
Sounds good. Did you want to port your existing code to JavaScript and run it as a new service? You can store the resulting data in Redis since it doesn't need to be persisted forever (presumably you just need to list a pro player's recent matches, with links to the match summary page when it's done?) |
I got contacted by someone who wants to help me with the project and the hosting. My short term goal is to get it up & running so everyone can use this kind of site again. It's currently written in Python and Flask/SQLAlchemy. My long term goal is working towards an integration into opendota - however, I have no clue yet how the opendota system is working and what time and effort it will take to port this (especially considering that I haven't written any Javascript in ~5 years). |
There'd be three main steps:
I don't think it would take that much time especially if you've got the logic worked out already. I can help with the porting as well |
Implemented the data endpoint in: That's basically steps 1 and 2 listed above. Once it's deployed anyone who's interested can start working on the UI |
How do I add more pro players to this list? |
The list is based on: http://www.dota2.com/webapi/IDOTA2Fantasy/GetProPlayerList/v001 You can mutate it by modifying: However if we want to add additional custom data we should find a better long term solution. |
@howardchung are you still interested in the feature? I have a demo web app written in Angular + Node.js, and I'd like to share my codes with you. If possible, I want to integrate it to OpenDota. |
Sure! I did some work on this before but haven't shipped it. I wanted to have links open directly to that game in the Dota client, but it didn't work at the time. |
see #1517 |
Cool! |
I am not clear about this API |
It doesn't work, but the idea is to have that link launch the Dota client and immediately start spectating that game. |
How about we try this (https://api.steampowered.com/IDOTA2MatchStats_570/GetRealtimeStats/v1)? From this API, I got some data about the characters' position on minimap, networth, abilities, items, and etc. here is a sample: https://github.com/HouPoc/DOTA2_VisLive/blob/master/data.json |
What I did was using minimap_icon to represent heroes and putting them on a div whose background is mini_map. Then, I updated those minimap_cion's positions in real-time to visualize the movements. |
It works like trackdota.com. |
Yeah, that data currently isn't being sent down, but it could be (see the commented out code): |
|
I did enjoy doing it.. |
Sure, feel free to make a PR there as well if you want to add the additional data |
Hello, I'm the author of this thread: https://www.reddit.com/r/DotA2/comments/6xmvfq/i_built_my_own_version_of_dota2tvprocom_because/
tl;dr: dota2tvpro.com tracks high MMR games and games of dota 2 personalities, but the site is always down. I built my own logger using python (dota2api lib and Flask) but I don't know where to host it.
I just thought about collaborating with opendota. Do you think this could be a possible feature for opendota?
The text was updated successfully, but these errors were encountered: