Esempio n. 1
0
 def format(cls, user):
     return {
         'id': user['id'],
         'avatar': secure_avatar(user['avatar']['cache']),
         'name': user['username'],
         'hash': avatar_hash(user)
     }
Esempio n. 2
0
 def format(cls, user):
     return {
         'id': user['id'],
         'avatar': secure_avatar(user['avatar']['cache']),
         'name': user['username'],
         'hash': avatar_hash(user)
     }
Esempio n. 3
0
    def format(cls, post):
        avatar = secure_avatar(post['author']['avatar']['cache'])

        return {
            'id': post['id'],
            'avatar': avatar,
            'name': post['author']['username'],
            'createdAtISO': post['createdAt'].isoformat(),
            'message': post['message'],
            'hash': avatar_hash(post['author'])
        }
Esempio n. 4
0
    def format(cls, post):
        avatar = secure_avatar(post['author']['avatar']['cache'])

        return {
            'id': post['id'],
            'avatar': avatar,
            'name': post['author']['username'],
            'createdAtISO': post['createdAt'].isoformat(),
            'message': post['message'],
            'hash': avatar_hash(post['author'])
        }