def predictionsForMultiStops(agency, stops): url = reverseProxy.createURL(config, "predictionsForMultiStops") % (agency) for stop in stops.split("&"): url = url + "&stops=%s" % stop redis.incr('predictionsForMultiStops') xml = tools.http_request(url) return Response(xml, mimetype='text/xml')
def predictByStop(agency, route, stop): url = reverseProxy.createURL(config, "predictByStop") % (agency, route, stop) redis.incr('predictByStop') xml = tools.http_request(url) return Response(xml, mimetype='text/xml')
def schedule(agency, route): url = reverseProxy.createURL(config, "schedule") % (agency, route) redis.incr('schedule') xml = tools.http_request(url) return Response(xml, mimetype='text/xml')
def messages(agency, route): url = reverseProxy.createURL(config, "messages") % (agency, route) redis.incr('messages') xml = tools.http_request(url) return Response(xml, mimetype='text/xml')
def routeConfig(agency, route): url = reverseProxy.createURL(config, "routeConfig") % (agency, route) redis.incr('routeConfig') xml = tools.http_request(url) return Response(xml, mimetype='text/xml')
def agencyList(): url = reverseProxy.createURL(config, "agencyList") redis.incr('agencyList') xml = tools.http_request(url) redis.incr(url) return Response(xml, mimetype='text/xml')
def vehicleLocations(agency, route, time): url = reverseProxy.createURL(config, "vehicleLocations") % (agency, route, time) redis.incr('vehicleLocations') xml = tools.http_request(url) return Response(xml, mimetype='text/xml')
def predictByStopIdrt(agency, stopId, routeTag=False): url = reverseProxy.createURL( config, "predictByStopIdrt") % (agency, stopId, routeTag) redis.incr('predictByStopId') xml = tools.http_request(url) return Response(xml, mimetype='text/xml')