Harems-io / Rarity-tools-clone

We can build our own.
6 stars 9 forks source link

Integration with opensea api for home page #4

Closed nresh closed 3 years ago

nresh commented 3 years ago

this PR implements integration with Open Sea api using the /collections endpoint (https://docs.opensea.io/reference/api-overview#retrieving-collections).

all the data for the page is now pulled from this api.

this is not a complete solution because Open Sea only returns a max of 300 collection records at a time and throttles the number of api requests you can make. at the moment, because of the api request throttling, it looks like pulling all or nearly all the records would take about 1.5 minutes.

a subsequent PR will use a caching system (likely Redis) for the api responses that would allow us to pull it once and reuse that cached data intelligently