Exemple #1
0
def loadData(apiConfig, journeyConfig):
    departures = loadDeparturesForStation(
        journeyConfig, apiConfig["appId"], apiConfig["apiKey"])
    firstDepartureDestinations = loadDestinationsForDeparture(
        departures[0]["service_timetable"]["id"])

    return departures, firstDepartureDestinations
Exemple #2
0
def loadStation(apiConfig, journeyConfig):
    departures, stationName = loadDeparturesForStation(journeyConfig,
                                                       apiConfig["appId"],
                                                       apiConfig["apiKey"])

    if len(departures) == 0:
        return False, False, stationName

    return departures, stationName
def loadData(apiConfig, journeyConfig):
    departures, stationName = loadDeparturesForStation(journeyConfig,
                                                       apiConfig["appId"],
                                                       apiConfig["apiKey"])

    if len(departures) == 0:
        return False, False, stationName

    firstDepartureDestinations = loadDestinationsForDeparture(
        departures[0]["service_timetable"]["id"])

    return departures, firstDepartureDestinations, stationName
def loadData(apiConfig, journeyConfig):
    runHours = [int(x) for x in apiConfig['operatingHours'].split('-')]
    if isRun(runHours[0], runHours[1]) == False:
        return False, False, journeyConfig['outOfHoursName']

    departures, stationName = loadDeparturesForStation(
        journeyConfig, apiConfig["apiKey"])

    if (departures == None):
        return False, False, stationName

    firstDepartureDestinations = departures[0]["calling_at_list"]
    return departures, firstDepartureDestinations, stationName
Exemple #5
0
def loadData(apiConfig, journeyConfig):
    runHours = [int(x) for x in apiConfig['operatingHours'].split('-')]
    if isRun(runHours[0], runHours[1]) == False:
        return False, False, journeyConfig['outOfHoursName']

    departures, stationName = loadDeparturesForStation(
        journeyConfig, apiConfig["appId"], apiConfig["apiKey"])

    if len(departures) == 0:
        return False, False, stationName

    firstDepartureDestinations = loadDestinationsForDeparture(
        journeyConfig, departures[0]["service_timetable"]["id"])

    return departures, firstDepartureDestinations, stationName