<< Back to Programming Forum   Search

Posts 1 - 5 of 5   
How to get one's past game IDs in 2023: 1/29/2023 10:00:56


FiveSmith 
Level 60
Report
TLDR: Same old question about how to get one's past game IDs, because old ways are not working.

I am bored again and thinking about to do some research and may be even make some community-available tooling:
- What are my most popular QM/Ladder/CW templates and my winrates on them? (or not only mine)
- What are the best openings or some strategic insights from the games played?
- What is the dynamic of my QM ratings? (or not only mine)
- What is the QM template popularity dynamic?
- What are the actual winrates for duel lotto template based on initial distribution? (that's for my planned Duel Lotto strategy guide)
- etc...

So I am looking for a way to get the game IDs from Warzone API based on any avaialble arbitrary criteria.

For some of my previous works, to minimize the wastefull API usage I had some heuristic algorithms (like trying to shoot for CW game ids based on game creation times, etc ), but they have their limits.

So I am looking for ways to do one of the following (in order from highest to lowest priority):
- Get my own past game IDs
- Get someone else's past game IDs
-- either myself from name/profile ID
-- or with some input by that player (for example, player may get a list of his games himself from the site and then input it into a community site tool for analysis)
- Get all (or just many) games IDs for specific template or condition, etc

The previous ways to tackle the problem seem to not be available now:
- Most often cited https://www.warlight.net/ProfileEditFavoriteGames no longer works
- The corresponding "Favourite games" trick in profile not acceptable, because it in UJS now and the game list may not be accessed easily
- https://www.warzone.com/MultiPlayer/PastGames - in UJS, so the game list may not be accessed easily

So is there a way to get this data conveniently?

PS. Also, after thinking about all that, I got to 2 interesting conclusions:
- Not having a "search" function in API might straight lead to more wastefull usage, because there is always an option to "bombard" (even slowly) the game query API in search of the specific data that you need, but you also get lots of wastefull data. So having a search function might result in less Warzone API raw usage, thus helping to cut costs, if the wasteful usage is significat.
- Maybe it is possible even to construct a "community addon API", that would one time scan all of the possible game IDs and then allow for searching for IDs based on criteria, so that official API would have some relief. Though it would bring effiency for the all involved sides combined, I dont know the costs to run that, and now sure about whether it is within ToS


Edited 1/29/2023 10:47:16
How to get one's past game IDs in 2023: 1/29/2023 12:30:12


DanWL 
Level 63
Report
See http://warzone.com/api. Have look at query game API (to get Settings, history etc). Works for all games you’ve played in, all tournament and ladder games. Unsure about QM/clan wars. Not sure if query game API can get all your games or all QM/Clan Wars games.

It’s still possible to get past games but it’ll be fiddly (waiting for certain elements to exist and have certain attributes).

You can go through https://www.warzone.com/ProfileEdit and click Change favourite games then wait until the games list load. You could do a similar thing for clan wars.
How to get one's past game IDs in 2023: 1/29/2023 12:47:12


FiveSmith 
Level 60
Report
@DanWL, thanks! But it is either I was not clear with I wanted, or I am just missing something.

Lets say, that I want to analyze all my CW games.

I know that I can get single game data from the query game API by the game IDs (CW games are present in the API). So in order to get all my games without just randomly bombarding this API, I first need to know the list of game IDs.

When I do this
You can go through https://www.warzone.com/ProfileEdit and click Change favourite games then wait until the games list load. You could do a similar thing for clan wars.
-> It opens a UJS page with pagination of all games. Currently I have 32 pages of games.
-> Let's say I can narrow it and want just the data on my Clan War games from all the seasons. With that, I now have 8 pages of games.
Tried inspecting the source code, but the page is dynamic and it shows only the games from the single page, which I am viewing right now.

So the question is: Is there a way to get the IDs of these games, without manually clicking through all the 8 or 32 pages, copying each page separately and then parsing/regexing it? That even may be okay for a single research for me, but if I want to make smth for other players, it is kinda cumbersome.

Edited 1/29/2023 12:57:33
How to get one's past game IDs in 2023: 1/29/2023 13:10:22


DanWL 
Level 63
Report
I automatically clicked the pages for clan members list for get clan member idle time using the wait for elements to exist approach.

Edited 1/29/2023 17:47:29
How to get one's past game IDs in 2023: 1/29/2023 17:58:50


DanWL 
Level 63
Report
I don’t mind writing a non-official API but it’ll have to take a Window as a parameter as scripts aren’t allowed to make network requests unless it’s to an official API.
It would be able to do the following-
Get player profile information (encase that changes to UJS)
Get all clan members from a clan

Edit: it would only be able to run from https://www.warzone.com pages due to CORS https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSAllowOriginNotMatchingOrigin

Edited 1/31/2023 08:21:21
Posts 1 - 5 of 5