OpenRarity / open-rarity

Reference implementation of the OpenRarity protocol with Python.
Apache License 2.0
218 stars 47 forks source link

Testnet support for OpenSea API Helper #112

Open au2001 opened 1 year ago

au2001 commented 1 year ago

I am currently using OpenRarity, fetching collection metadata from OpenSea's API.\ The project I'm working on has an instance on the ethereum chain as well as a testnet instance.

It would be nice to be able to pass in a parameter to activate the testnets API from OpenSea instead of the main API.

For example, fetch_opensea_collection_data can use the following API call: https://testnets-api.opensea.io/api/v1/collection/{collection_slug} (docs)

impreso commented 1 year ago

This is pretty cool idea , thanks for reporting. Perhaps to unblock you you can swap URL directly in the code while we work on 1.0 release?

au2001 commented 1 year ago

In order not to depend on a vendored version of this library, what I did for now is fetch all required metadata manually from another source (i.e. Alchemy in another JS microservice) instead of using opensea_api_helpers.

I had already set up and needed the other SDK for different parts of the project, so it was easier for me in the mean time. But, on the long run, I would probably still prefer using opensea_api_helpers with the testnet option once available in release 1.0.