def get_characters(): args = request.args res = C.get_characters_by_query(args) rsp = Response(process_got_json.dumps(res), status=200, content_type="application/json") return rsp
def get_related_characters(ch_id, r_kind): res = C.get_related_characters(ch_id, r_kind) rsp = Response(json.dumps(res), status=200, content_type="application/json") return rsp
def get_character_by_id(ch_id): res = C.get_character_by_id(ch_id) rsp = Response(json.dumps(res), status=200, content_type="application/json") return rsp
def get_characters(): args = dict(request.args) args = _de_array_args(args) res = C.get_characters_by_query(args) rsp = Response(json.dumps(res), status=200, content_type="application/json") return rsp
def t0(): res = C.get_character_by_id("CH_283") print("Res = ", json.dumps(res, indent=3))
def t2(): ch_id = 'CH_15' r_type = "killed" res = C.get_related_characters(ch_id, r_type) print("Res = ", json.dumps(res, indent=3))
def t1(): q1 = {"characterName": "Rickard Karstark"} res = C.get_characters_by_query(q1) print("Res = ", json.dumps(res, indent=3))
def t2(): ch_id = 'CH_15' r_type = "KILLED" res = C.get_related_characters(ch_id, r_type) print("Res = ", res)