예제 #1
0
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
예제 #2
0
파일: app.py 프로젝트: ljp2161/W4111F20HW4
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
예제 #3
0
파일: app.py 프로젝트: ljp2161/W4111F20HW4
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
예제 #4
0
파일: app.py 프로젝트: ljp2161/W4111F20HW4
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
예제 #5
0
def t0():

    res = C.get_character_by_id("CH_283")
    print("Res = ", json.dumps(res, indent=3))
예제 #6
0
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))
예제 #7
0
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)