sepandhaghighi / samila

Generative Art Generator
https://www.samila.site
MIT License
1.08k stars 78 forks source link

Support different IPFS gateways #183

Closed sepandhaghighi closed 2 months ago

sepandhaghighi commented 1 year ago

Description

Support different IPFS gateways

References:

  1. https://ipfs.github.io/public-gateway-checker/
  2. 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'}