|
|
|
@ -4,7 +4,7 @@ from urllib.request import urlopen |
|
|
|
|
|
|
|
from ctabus.internal.exceptions import CTABusError, NoArrivalTimesError |
|
|
|
from ctabus.internal.config import API_KEY as api |
|
|
|
from ctabus.internal.disk_cache import disk_cache |
|
|
|
from ctabus.internal.disk_cache import disk_cache, disk_cache_with_setup |
|
|
|
|
|
|
|
|
|
|
|
def get_data(type, api_key=api, timeout=None, **args): |
|
|
|
@ -56,7 +56,7 @@ def get_name_from_direction(route, direction, api_key=api, timeout=None): |
|
|
|
return get_times(test_stop, api_key=api, timeout=timeout)["prd"][0]["des"] |
|
|
|
|
|
|
|
|
|
|
|
@disk_cache(uses_setup=True) |
|
|
|
@disk_cache_with_setup |
|
|
|
def get_data_from_stop_id(stop_id, __setup__=None): |
|
|
|
if __setup__ is None: |
|
|
|
info = get_times(stop_id)["prd"][0] |
|
|
|
|