This will return ONLY the champion data who's id was passed. 99% of the time, we do not really want to fetch the entire champions list. Its resource intensive and not efficient. Instead, I believe a good idea would be to add the following:
A method to rebuild the champions cache manually (when its called)
Automate cache rebuild on a timeline (every week?) when the opgg object is initially created (so at runtime)
Could add the date the cache was built to the filename, and parse that when the object is created to get a diff from then vs date.now()
Once the cache has been built, we do not need to ping out to opgg everytime, we can just rebuild our objects from cache. (Less strain on opgg servers)
In those edge cases where perhaps within that week, there was a new champion or something, add a failsafe in to rebuild the cache for example when a champion_id comes in that is NOT found in the cache. In this case, there was likely a big patch, so rebuild everything then, reset the last built date on db filename, etc.
Found a new endpoint structure while just guessing around for parameters: https://op.gg/api/v1.0/internal/bypass/meta/champions/?hl=
This will return ONLY the champion data who's id was passed. 99% of the time, we do not really want to fetch the entire champions list. Its resource intensive and not efficient. Instead, I believe a good idea would be to add the following: