コード例 #1
0
ファイル: healthmonger.py プロジェクト: twonds/healthmonger
def index():
    """
    Return a list of tables and their corresponding API examples.
    """
    response = ""
    for table in config.TABLE_SCHEMA.keys():
        response = response + disco.examples(table)
    return response
コード例 #2
0
ファイル: healthmonger.py プロジェクト: twonds/healthmonger
def discovery():
    """
    Discover information about the tables on this API endpoint.
    """
    table = flask.request.args.get('table')
    response = 'Invalid table:'+str(table)
    status = 404
    response = disco.examples(table)
    if response:
        status = 200
    return flask.Response(response, status=status)