rssnyder / discord-stock-ticker

Add live stock & crypto prices to your discord sidebar.
https://rssnyder.github.io/discord-stock-ticker/
MIT License
293 stars 113 forks source link

[BUG] curl localhost:9090/tickerboard is providing empty page #73

Closed Treawlony closed 3 years ago

Treawlony commented 3 years ago

Describe the bug When running curl localhost:9090/tickerboard you get only " { } " as result

To Reproduce Steps to reproduce the behavior:

  1. launch a bot ticker using Docker
  2. Bot is running on Discord
  3. Above command gives that result

Expected behaviour a list of tickers running

Treawlony commented 3 years ago

Extra info: that is the correct port, 8080 is already busy with something else. Containter internal port is 8080

rssnyder commented 3 years ago

@Treawlony that call you making is a GET request, which lists the current boards, so the response is showing you have no loaded bots. To add some, make a POST call with the necessary payload to create them. Then the GET call will show you what you have loaded.

Are you sure you loaded a tickerboard and not a ticker or another one of the 4 bots the service offers?

Treawlony commented 3 years ago

I'm currently testing running this:

curl -X POST -H "Content-Type: application/json" --data '{ "name": "bitcoin", "crypto": true, "ticker": "btc", "set_color": true, "currency": "USD", "decimals": 3, "set_nickname": true, "frequency": 10, "discord_bot_token": "addkeyhere" }' localhost:9090/ticker

also, apparently has some issues with colors:

image

rssnyder commented 3 years ago

@Treawlony yeah so you need to do curl localhost:9090/ticker instead, that will give you a list.

For the color changing, see https://github.com/rssnyder/discord-stock-ticker#roles-for-colors

Treawlony commented 3 years ago

Got it! I had the page with instruciton opened twice and I mixed ticker with tickerboard. Solved! Thanks!