1

I am thinking about making an application that is run on a remote device (for example a phone), to gather and display data like: Summoner Name, Health, Kill/Death statistics, how long am I playing this current game etc.

Is it possible to use Riot Api to get this data and display it while playing a match?

Gzyniu
  • 71
  • 1
  • 1
  • 7

2 Answers2

5

Yes, you can request data for current matches by using the endpoint /lol/spectator/v4/active-games/by-summoner/{encryptedSummonerId}. For this you need the encrypted summoner id, which you can get with the endpoint /lol/summoner/v4/summoners/by-name/{summonerName}.

The only real-time return value in this endpoint however is the elapsed time since the match started (gameLength). There is no other dynamic information.

d4rwel
  • 715
  • 5
  • 8
  • And will it work in real-time? I mean using this endpoint will I be able to run match and fetch data like gameId mapID etc. during the play? – Gzyniu Feb 19 '19 at 20:57
  • Yes, this endpoint is for active games, more precisely games that have started but not yet ended. Note, however that this endpoint is just a small subset of the much richer endpoint for finished matches. So you will be missing statistics like kills, deaths and similar. – d4rwel Feb 20 '19 at 10:26
3

The Live Client Data API is a local API (https://127.0.0.1:2999/liveclientdata) that works with the game in progress, you can acquire the metadata of what appears on the game screen via this API.

There is also a Tournament API to acquire info from all players in real time, but it needs to be a customized match, according to documentation with a code provided by Riot.

droposhado
  • 31
  • 1
  • 2