ShadowS0ng / Vagabond

This is a Hyprland + AGS Rice
MIT License
4 stars 0 forks source link

Crypto widget/service how-to? #1

Open jontstaz opened 1 month ago

jontstaz commented 1 month ago

Hi,

I'm trying to work out your crypto widget. What exactly do you set as the cryptoCurrency.url? From what I can see, it literally just tries to execute whatever string you set as the cryptoCurrency.url via bash which is confusing. Can you please explain how I can go about using your crypto widget and service? Thanks in advance,

ShadowS0ng commented 1 month ago

Hello, It should be your coinmarketcap API url. its like :

cryptoCurrency.url = `curl -H "X-CMC_PRO_API_KEY: {YOUR APIKEY}" -H "Accept: application/json" -d "start=1&limit=500&convert=USD" -G https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest`

yes , it just executes the command string (which is a curl shell command) asynchronously and gets the returned value, also caches it for when there is no connection.