def evil(): query = {} depth = int(request.args.get('depth', 2)) if depth > 2: depth = 2 for key in request.args: if key not in ['depth']: query[key] = request.args.getlist(key) data = Model.multi_graph_find(query, {'key':'tags', 'value': 'evil'}) return (dumps(data), 200, {'Content-Type': 'application/json'})
def evil(): query = {} depth = int(request.args.get('depth', 2)) if depth > 2: depth = 2 for key in request.args: if key not in ['depth']: query[key] = request.args.getlist(key) data = Model.multi_graph_find(query, {'key': 'tags', 'value': 'evil'}) return (dumps(data), 200, {'Content-Type': 'application/json'})
def get(self): args = Evil.parser.parse_args() query = {} depth = args['depth'] if depth > 2: depth = 2 for key in args: if key not in ['depth']: query[key] = request.args.getlist(key) data = Model.multi_graph_find(query, {'key':'tags', 'value': 'evil'}, depth=depth) return data
def get(self): args = Evil.parser.parse_args() query = {} depth = args['depth'] if depth > 2: depth = 2 for key in args: if key not in ['depth']: query[key] = request.args.getlist(key) data = Model.multi_graph_find(query, { 'key': 'tags', 'value': 'evil' }, depth=depth) return data