Exemple #1
0
def monktest():
    monkapi.init_monk()

    monkapi.init_database()

    title = request.form['title']
    entity_id = request.form['entity_id']
    value = request.form['value']

    entity_id = "56ba83ba768b7d425adc9969"
    monkapi.add_label("56ba83ba768b7d425adc9969", "likeTravel", "Y")
    newlist = monkapi.update_recommended_place(title, entity_id, value)
    for i in newlist:
        print newlist

    # monkapi.add_label(monkapi.get_entity_id("newyorks","Seattle_00000002"), "likeTravel", "Y")
    # monkapi.add_label(monkapi.get_entity_id("newyorks","Seattle_00000003"), "likeTravel", "Y")

    return
def add_sample_label():
    monkapi.init_monk()
    monkapi.init_database()
    monkapi.add_label(monkapi.get_entity_id("Seattle","Seattle_00000001"), "likeTravel", "Y")
    monkapi.add_label(monkapi.get_entity_id("Seattle","Seattle_00000002"), "likeTravel", "Y")
    monkapi.add_label(monkapi.get_entity_id("Seattle","Seattle_00000003"), "likeTravel", "Y")