Add source description and source_url.

This commit is contained in:
Chris Berkhout 2021-04-12 17:33:12 +02:00
parent 2e6265e321
commit 2841d5b8f1
3 changed files with 22 additions and 3 deletions

View file

@ -22,8 +22,10 @@ def cmd_sources(args):
def cmd_source(args): def cmd_source(args):
source = sources.by_id[args.identifier] source = sources.by_id[args.identifier]
print(f'ID : {source.id()}') print(f'ID : {source.id()}')
print(f'Name : {source.name()}') print(f'Name : {source.name()}')
print(f'Description : {source.description()}')
print(f'URL : {source.source_url()}')
pass pass
def build_parser(): def build_parser():

View file

@ -6,4 +6,14 @@ class CoinMarketCap():
@staticmethod @staticmethod
def name(): def name():
return 'CoinMarketCap.com' return 'CoinMarketCap'
@staticmethod
def description():
return 'CoinMarketCap historical price data'
@staticmethod
def source_url():
return 'https://coinmarketcap.com/'

View file

@ -8,3 +8,10 @@ class ECB():
def name(): def name():
return 'European Central Bank' return 'European Central Bank'
@staticmethod
def description():
return 'European Central Bank Euro foreign exchange reference rates'
@staticmethod
def source_url():
return 'https://www.ecb.europa.eu/stats/exchange/eurofxref/html/index.en.html'