def __init__(self, response): self._stops = None self._routes = None self._outlets = None self._status = pyptv3.StatusResponse(response["status"]) if response["stops"] is not None: self._stops = pyptv3.StopsByDistanceResponse(response) if response["routes"] is not None: self._routes = pyptv3.RoutesResponse(response) if response["outlets"] is not None: self._outlets = pyptv3.OutletsGeolocationResponse(response)
def __init__(self, response): self._disruptions = {} self._disruptions["general"] = [] self._disruptions["metro_train"] = [] self._disruptions["metro_tram"] = [] self._disruptions["metro_bus"] = [] self._disruptions["regional_train"] = [] self._disruptions["regional_coach"] = [] self._disruptions["regional_bus"] = [] if response["disruptions"]["general"] is not None: self._disruptions["general"] = list( map(lambda t: pyptv3.DisruptionResponse(t), response["disruptions"]["general"])) if response["disruptions"]["metro_train"] is not None: self._disruptions["metro_train"] = list( map(lambda t: pyptv3.DisruptionResponse(t), response["disruptions"]["metro_train"])) if response["disruptions"]["metro_tram"] is not None: self._disruptions["metro_tram"] = list( map(lambda t: pyptv3.DisruptionResponse(t), response["disruptions"]["metro_tram"])) if response["disruptions"]["metro_bus"] is not None: self._disruptions["metro_bus"] = list( map(lambda t: pyptv3.DisruptionResponse(t), response["disruptions"]["metro_bus"])) if response["disruptions"]["regional_train"] is not None: self._disruptions["regional_train"] = list( map(lambda t: pyptv3.DisruptionResponse(t), response["disruptions"]["regional_train"])) if response["disruptions"]["regional_coach"] is not None: self._disruptions["regional_coach"] = list( map(lambda t: pyptv3.DisruptionResponse(t), response["disruptions"]["regional_coach"])) if response["disruptions"]["regional_bus"] is not None: self._disruptions["regional_bus"] = list( map(lambda t: pyptv3.DisruptionResponse(t), response["disruptions"]["regional_bus"])) self._status = pyptv3.StatusResponse(response["status"])
def __init__(self, response): self._departures = list( map(lambda t: pyptv3.DepartureResponse(t), response["departures"])) self._stops = dict( map(lambda kv: (kv[0], pyptv3.StopByDistanceResponse(kv[1])), response["stops"].items())) self._routes = dict( map(lambda kv: (kv[0], pyptv3.RouteResponse(kv[1])), response["routes"].items())) self._runs = dict( map(lambda kv: (kv[0], pyptv3.RunResponse(kv[1])), response["runs"].items())) self._directions = dict( map(lambda kv: (kv[0], pyptv3.DirectionResponse(kv[1])), response["directions"].items())) self._disruptions = dict( map(lambda kv: (kv[0], pyptv3.DisruptionResponse(kv[1])), response["disruptions"].items())) self._status = pyptv3.StatusResponse(response["status"])
def __init__(self, response): self._routes = list(map(lambda t: pyptv3.RouteResponse(t), response["routes"])) self._status = pyptv3.StatusResponse(response["status"])
def __init__(self, response): super().__init__(response) self._outlets = list( map(lambda t: pyptv3.OutletGeolocationResponse(t), response["outlets"])) self._status = pyptv3.StatusResponse(response["status"])
def __init__(self, response): self._disruption = pyptv3.DisruptionResponse(response["disruption"]) self._status = pyptv3.StatusResponse(response["status"])
def __init__(self, response): self._directions = list( map(lambda t: pyptv3.DirectionResponse(t), response["directions"])) self._status = pyptv3.StatusResponse(response["status"])
def __init__(self, response): self._details = pyptv3.StopDetailsResponse(response["stop"]) self._status = pyptv3.StatusResponse(response["status"])
def __init__(self, response): self._outlets = list( map(lambda t: pyptv3.OutletResponse(t), response["outlets"])) self._status = pyptv3.StatusResponse(response["status"])
def __init__(self, response): self._stops = list( map(lambda t: pyptv3.StopByDistanceResponse(t), response["stops"])) self._status = pyptv3.StatusResponse(response["status"])