def post_lookup_ir(): if not request.headers.get('Content-Type') or request.headers.get('Content-Type') != "application/json": abort(400, "Invalid Content-Type") brand = request.args['brand'] model = request.args['model'] command = request.args['command'] if not brand: abort(400, "Brand must be provided!") if not model: abort(400, "Model must be provided!") if not command: abort(400, "Command must be provided!") response = ir_service.lookup_ir(brand,model,command) return jsonify(response)
def post_lookup_ir(): if not request.headers.get('Content-Type') or request.headers.get( 'Content-Type') != "application/json": abort(400, "Invalid Content-Type") brand = request.args['brand'] model = request.args['model'] command = request.args['command'] if not brand: abort(400, "Brand must be provided!") if not model: abort(400, "Model must be provided!") if not command: abort(400, "Command must be provided!") response = ir_service.lookup_ir(brand, model, command) return jsonify(response)
def get_lookup_ir(brand, model, command): response = ir_service.lookup_ir(brand, model, command) return jsonify(response)
def get_lookup_ir(brand,model,command): response = ir_service.lookup_ir(brand,model,command) return jsonify(response)