Created more abstract level for data sources
This commit is contained in:
parent
1b9ed82b40
commit
d102c7c639
2 changed files with 7 additions and 4 deletions
4
Calendar/DataSourceInterface.py
Normal file
4
Calendar/DataSourceInterface.py
Normal file
|
@ -0,0 +1,4 @@
|
|||
class DataSourceInterface (object):
|
||||
"""Interface for child interfaces that fetch data."""
|
||||
def is_available (self):
|
||||
raise NotImplementedError("Functions needs to be implemented")
|
|
@ -1,8 +1,7 @@
|
|||
class WeatherInterface (object):
|
||||
"""Interface for fetching and processing weather forecast information."""
|
||||
def is_available (self):
|
||||
raise NotImplementedError("Functions needs to be implemented")
|
||||
from DataSourceInterface import DataSourceInterface
|
||||
|
||||
class WeatherInterface (DataSourceInterface):
|
||||
"""Interface for fetching and processing weather forecast information."""
|
||||
def get_forecast_in_days (self, offset_by_days, location):
|
||||
raise NotImplementedError("Functions needs to be implemented")
|
||||
|
||||
|
|
Loading…
Reference in a new issue