def getAllSpecificResources(rtype): if request.method == 'GET': if request.args: return ResourceHandler().searchResource(request.args) else: return ResourceHandler().getAllSpecificResources(rtype) elif request.method == 'POST': return ResourceHandler().insertResource(request.form) else: return jsonify(Error="Method not allowed"), 405
def insertResource(rtype): if request.method == 'POST': return ResourceHandler().insertResourceJson(request.json, rtype) else: return jsonify(Error="Method not allowed"), 405
def getResourceByKeyword(keyword): if request.method == 'GET': return ResourceHandler().getResourceByKeyword(keyword) else: return jsonify(Error="Method not allowed"), 405
def getResourceBySupplierId(sid): if request.method == 'GET': return ResourceHandler().getResourceBySupplierId(sid) else: return jsonify(Error="Method not allowed"), 405
def getSpecificResourceById(rid, rtype): if request.method == 'GET': return ResourceHandler().getSpecificResourceById(rid, rtype) else: return jsonify(Error="Method not allowed"), 405