HaJaeKyung / KittyExtension

Fan add-on for https://www.cryptokitties.co
MIT License
232 stars 88 forks source link

added method to fetch cattribute frequency from https://cryptokittyde… #11

Closed mammothb closed 6 years ago

mammothb commented 6 years ago

…x.com/cattributes

Original table of frequency tbl only gets updated if fetching was successful. Current the cattribute frequency is taken from the width of each li element.

Note Color code calculation for rarity may need to be updated.

HaJaeKyung commented 6 years ago

It looks nice. I think before it is added it should also cache the table and only check about once every 12 hours to respect the kittdex servers.

mammothb commented 6 years ago

Added caching function. The code now fetches from the site every 12 hours or if nothing has been fetched before. if we are on a Kitty page, the attribute color are updated again if we have to fetch new values

mammothb commented 6 years ago

@neuhaus I believe that was done here https://github.com/HaJaeKyung/KittyExtension/pull/11/commits/89432ebf8a67b86be3626f5df81d3dea9cbf4a02#diff-3205c0ded576131ea255ad2bd38b0fb2R82 If that wasn't the right way, could you please point me to some resources on how to do it? It's my first time writing something like this

HaJaeKyung commented 6 years ago

No longer needed with the new built in cattributes API. Thanks for your effort on this.