kevinrue / lolgenie

Client for the RIOT Games API
1 stars 1 forks source link

Get official LoL assets (images, ...) and understand regulations #17

Closed cyrlop closed 3 years ago

cyrlop commented 3 years ago
kevinrue commented 3 years ago

Thanks for spending the time to spell things out. You read my mind.

One option - once we host it on a server - would be to use a CRON job to fetch this kind of static assets. Ideally, we'd only fetch resources if they have changed e.g. rsync for folders.

For database tables that do not depend on queries, e.g. table of champions, we probably want to simply run a query when the app launches, store that as a python dictionary for the session, and simply use that dictionary instead of querying the table again and again. Though... maybe not... as that would cross-reference champion ID from recent query with those of that initial 'static' query. If a new champion is added, then the cached table wouldn't know about it. Maybe we just want to run APi queries every time, and only bother caching real static resources, like champion and item icons.

Just to be clear, I'm talking about using images like in this app, for example: https://www.leagueofgraphs.com/champions/items

kevinrue commented 3 years ago

I got a bit mixed up between assets (images, ...) and queries, which you mention in #16.

I'll focus on assets in this issue, from now on.

kevinrue commented 3 years ago

Nevermind, assets can be accessed from a CDN, see section 'Champion Splash Assets', e.g. http://ddragon.leagueoflegends.com/cdn/img/champion/splash/Aatrox_0.jpg on page https://developer.riotgames.com/docs/lol#data-dragon_champions

kevinrue commented 3 years ago

In addition to #20, I guess this answers our concerns: image