diff options
| author | 2018-09-27 11:46:10 +0100 | |
|---|---|---|
| committer | 2018-09-27 11:46:10 +0100 | |
| commit | 8b0314b190b02f7e83fe0dae3c349ce4dffdcb4f (patch) | |
| tree | 2481de34452598ff3d3ca579612a0fdc0dc0edc5 /modules/tfl.py | |
| parent | Implement @Utils.export, to denote an export on a module (diff) | |
| signature | ||
Use ModuleManager.BaseModule in more modules
Diffstat (limited to 'modules/tfl.py')
| -rw-r--r-- | modules/tfl.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/tfl.py b/modules/tfl.py index ef7d2b08..a1bdab4a 100644 --- a/modules/tfl.py +++ b/modules/tfl.py @@ -1,5 +1,5 @@ import collections, datetime, re -from src import Utils +from src import ModuleManager, Utils URL_BUS = "https://api.tfl.gov.uk/StopPoint/%s/Arrivals" URL_BUS_SEARCH = "https://api.tfl.gov.uk/StopPoint/Search/%s" @@ -18,11 +18,9 @@ URL_ROUTE = "https://api.tfl.gov.uk/Line/%s/Route/Sequence/all?excludeCrowding=T PLATFORM_TYPES = ["Northbound", "Southbound", "Eastbound", "Westbound", "Inner Rail", "Outer Rail"] -class Module(object): +class Module(ModuleManager.BaseModule): _name = "TFL" - def __init__(self, bot, events, exports): - self.bot = bot - self.result_map = {} + result_map = {} def vehicle_span(self, arrival_time, human=True): vehicle_due_iso8601 = arrival_time |
