Beispiel #1
0
def alexa_search():

    data = request.get_json()
    intent = data["intent"]
    intent_variable = data["intentVariable"]
    intent_variable_value = data[data["intentVariable"]][data["intentVariable"]
                                                         + "Value"]
    #TODO: boolean method for intentVariable
    #TODO: delete intentVariable with its Value
    data = Backend_Helper.clean_for_alexa(data)
    allDocs = service.get_all_documents()

    outputProducts = service.do_query(data)

    return jsonify(outputProducts[0])
Beispiel #2
0
def alexa_search():

    print('Entered end point..')
    data = request.get_json()
    print(data)
    intent = data["intent"]
    intent_variable = data["intentVariable"]
    intent_variable_value = data[data["intentVariable"]][data["intentVariable"]
                                                         + "Value"]
    #TODO: boolean method for intentVariable
    #TODO: delete intentVariable with its Value
    data = Backend_Helper.clean_for_alexa(data)
    print('Cleaned Date..')
    allDocs = service.get_all_documents()
    print('Got all docs')

    outputProducts = service.do_query(data)

    print('Query done')

    return jsonify(outputProducts[0])