samila
samila copied to clipboard
Support different IPFS gateways
Description
Support different IPFS gateways
References:
- https://ipfs.github.io/public-gateway-checker/
- https://natoboram.gitlab.io/public-gateway-cacher/
Steps/Code to Reproduce
>>> from samila import *
>>> g.nft_storage(api_key="YOUR_API_KEY", gateway=IPFSGateway.HARDBIN)
{'status': True, 'message': 'https://hardbin.com/ipfs/bafybeifx7yeb55armcsxwwitkymga5xf53dxiarykms3ygqic223w5sk3m'}
>>> g.nft_storage(api_key="YOUR_API_KEY", gateway=IPFSGateway.CID)
{'status': True, 'message': 'bafybeifx7yeb55armcsxwwitkymga5xf53dxiarykms3ygqic223w5sk3m'}