E-Paper-Calendar/Calendar/CryptoInterface.py

17 lines
443 B
Python
Raw Normal View History

2019-05-18 09:28:29 +02:00
from DataSourceInterface import DataSourceInterface
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