Kla35 / lis-generator

A small Javascript software who retrieve data from Riot API to generate pictures : One picture about pregame (as perkz/runes, players...) and one picture about postgame (stats, gold graph, damage graph...). Automatic download of new pictures on new patch.
GNU General Public License v3.0
4 stars 2 forks source link

[Question] How get easily the match id ? #14

Closed cruxm4n closed 3 years ago

cruxm4n commented 3 years ago

After watching a game, how can you easily get the match id by saying that you don't have access to the link: visit the web?

Kla35 commented 3 years ago

Hey @cruxm4n, If u can't access to the link by using the match history, u can use website like LeagueOfGraphs, who display the match id in the url. Search your username in game, and clic on a game on the profile For example, for my last draft game : exampleLeague

cruxm4n commented 3 years ago

And for the custom game is it impossible to have it?

Kla35 commented 3 years ago

While it's very hard to get the match id of a custom game, the issue isn't here. To be clear : Riot API doesn't allow to access to data on a custom game. The only solution I found is to connect my program to League of Legends client. At the end of the game, u have a endpoint to fetch some stats on the game. Unfortunately, these data aren't complete. U can't know how many drakes has been killed in the game, u can't know how many barons has been killed in the game, u don't have the gold diff per minute. I tried in the past to make a version of this program for custom game, and I success but... It's not very stable unless u know exactly how it works. U have to enter the drake kill by urself etc... I send a message to Riot Devs, but I still don't have a answer rn

Kla35 commented 3 years ago

There is the v2.0 of my program, who include the endpoint to get the postgame image of a custom game image As u can see, it's not really intuitive If u want to fork my repo to try to make it better, I used 2 libraries to get the data : lcu-connector and rift-explorer, who is the API doc of lcu-connector U can find this updated code in /dev branch But, even if u can't get the postgame image, u can still generate the pre game image by using the username of someone in the custom game (while players are in game).