Skip to content

Commit

Permalink
add: validate query listing
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholsn committed Aug 26, 2014
1 parent da09dfd commit d8211de
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions niquery/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
from flask import Flask, jsonify, make_response
from flask.ext.restful import Api, Resource, reqparse

from niquery.query import AskQuery


def create_app(environment=None):
"""
Expand Down Expand Up @@ -95,13 +97,8 @@ def bet(in_file_uri):

class Validate(Resource):
def get(self):
x = 5
y = 10
res = add.apply_async([x, y])
context = {"id": res.task_id, "x": x, "y": y}
result = "add((x){}, (y){})".format(context['x'], context['y'])
goto = "{}".format(context['id'])
return jsonify(result=result, goto=goto)
ask = AskQuery()
return ask.sparql_meta.to_dict(outtype='records')


class ValidateResult(Resource):
Expand Down

0 comments on commit d8211de

Please sign in to comment.