You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
355 B

6 years ago
  1. from flask import Flask, request
  2. from flask_restful import Resource, Api, abort
  3. app = Flask(__name__)
  4. api = Api(app)
  5. buses = {}
  6. class Bus(Resource):
  7. def get(self):
  8. args = request.args
  9. if not args["line"] in buses:
  10. buses[args["line"]] = []
  11. if not args["stop"] in buses[args["line"]]:
  12. buses[args["line"]].append(args["stop"])
  13. return "OK"