E-Paper-Calendar/Calendar/CryptoInterface.py

18 lines
444 B
Python
Raw Permalink Normal View History

2019-05-18 09:28:29 +02:00
from DataSourceInterface import DataSourceInterface
2019-07-13 08:05:35 +02:00
2019-05-18 09:28:29 +02:00
class CryptoInterface(DataSourceInterface):
def __init__(self):
2019-05-19 00:22:24 +02:00
self.crypto_coins = []
2019-05-18 09:28:29 +02:00
def reload(self):
if self.is_available() == False:
return
2019-05-19 00:22:24 +02:00
self.crypto_coins = self.__get_coins__()
2019-05-18 09:28:29 +02:00
2019-05-19 00:22:24 +02:00
def __get_coins__(self):
raise NotImplementedError("Function needs to be implemented")
2019-05-18 09:28:29 +02:00
2019-05-19 00:22:24 +02:00
def get_coins(self):
return self.crypto_coins