Championify icon indicating copy to clipboard operation
Championify copied to clipboard

Use api/versions.json to get LoL version instead of realm file version

Open oddeirik opened this issue 6 years ago • 2 comments

Now retrieves the latest game client version from https://ddragon.leagueoflegends.com/api/versions.json instead of using "v" from https://ddragon.leagueoflegends.com/realms/na.json.

Ref #411.

oddeirik avatar Jun 20 '18 19:06 oddeirik

I appreciate this! Thanks! The only thing I'm unsure about before accepting it is if Riot publishes to versions.json before the patch actually goes live. I have some memory of that, and is the reason why I used the realms endpoint.

dustinblackman avatar Jun 20 '18 20:06 dustinblackman

Right, that could definitely become a problem at times then.

I can see that the API docs states

Data Dragon versions aren't always equivalent to the League of Legends client version. (https://developer.riotgames.com/static-data.html)

So I guess neither of those are absolutely guaranteed to follow the client version, even though they probably do most of the time (?). 🤔

I'll leave the decision up to you since you're the one who actually knows this stuff! I was just hoping this was a quick two-line fix 😃

oddeirik avatar Jun 20 '18 20:06 oddeirik