Closed lyricnz closed 2 years ago
Thoughts:
The config is a little codey. Might be easier to explain with simple tokens.
(copying my comment from discord):
This format makes it very specific to Go but the config file should be generalized. I think something like alt_link_code = "https://www.tradingview.com/chart/?symbol=:SYMBOL:"
would be better and we can offer :SYMBOL:
, :NAME
, :ID:
, etc as variables
Merging this with some changes
I updated it to use template tags and simplified the link generation by not passing the alt coin link code to each coin api class
Example link
alt_coin_link = "https://www.tradingview.com/symbols/{{SYMBOL}}USD/"
Available tags:
{{ID}}
{{NAME}}
{{RANK}}
{{SLUG}}
{{SYMBOL}}
Thanks @lyricnz!
Add support for an "alternate link" for a coin, to a user-defined target. This is expressed in a code snippet, defined in the config.toml file. The code has access to
sprintf
and acoin
object with [ID, Name, Symbol, Rank, Slug] available.Per #283