dustinblackman / Championify

Import recent item sets from popular aggregators like Champion.gg in to League of Legends to use within game! No hassle.
MIT License
890 stars 157 forks source link

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

Open oddeirik opened 6 years ago

oddeirik commented 6 years ago

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.

dustinblackman commented 6 years ago

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.

oddeirik commented 6 years ago

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 😃