Closed alexsherman closed 5 years ago
Added a bunch of stuff. There is now a working route which will return the highest win rates given any partial teams. e.g. can do http://localhost:8000/globalreq?opp=Sona,Taric to get the highest win rates across all games against with sona and taric. can also do http://localhost:8000/globalreq to just get the top winrates, although that takes a little while because it means importing every game in the db to rust and then crunching it. the more specific the query, the less games are pulled and thus the less time it takes to calc winrates. I also have it currently printing the winrates associated with the reqs so that you can understand where it's coming from
There's def a lot of code semi-duplication, but i just wanted it to leave your existing stuff for now and only borrow the stuff that i didnt have to change. Could probably refactor once we figure out what our model is.
this method is very basic and proof of concept, and only supports requests where neither param was empty. just lazy for demo. but should be easily modifiable to make the struct whatever you need and to include bans, allow empty vecs, etc.