Exemple #1
0
def addMessage(user_id, message):
    records = Consulta().addMessage(user_id, message)
    return str(records)
Exemple #2
0
def getMessageByUserID(user_id):
    data = {user_id: Consulta().getMessageByUserID(user_id)}
    js = json.dumps(data)
    response = Response(response=js, status=200, mimetype='application/json')
    #return render_template('msgByUserID.html', msg=response)
    return response
Exemple #3
0
def followed(follower):
    data = {follower: Consulta().getFollowed(follower)}
    js = json.dumps(data)
    response = Response(response=js, status=200, mimetype='application/json')
    return response
Exemple #4
0
def messages():
    records = Consulta().messages()
    return str(records)
Exemple #5
0
def users():
    records = Consulta().users()
    return records
Exemple #6
0
def follows():
    records = Consulta().follows()
    return str(records)
Exemple #7
0
def unfollow(follower, followed):
    Consulta().unfollow(follower, followed)
    return ""
Exemple #8
0
def follow(follower, followed):
    Consulta().follow(follower, followed)
    return ""
Exemple #9
0
def remover(identificador):
    Consulta().remover(identificador)
    return ""
Exemple #10
0
def cadastrar(login, name, bio):
    Consulta().cadastrar(login, name, bio)
    return "{0}".format(Consulta().getId(login, name, bio)[0])
Exemple #11
0
def getuser(identificador):
    data = {identificador: Consulta().getUser(identificador)}
    js = json.dumps(data)
    response = Response(response=js, status=200, mimetype='application/json')
    return response