Example #1
0
 def format(cls, user):
     return {
         'id': user['id'],
         'avatar': secure_avatar(user['avatar']['cache']),
         'name': user['username'],
         'hash': avatar_hash(user)
     }
Example #2
0
 def format(cls, user):
     return {
         'id': user['id'],
         'avatar': secure_avatar(user['avatar']['cache']),
         'name': user['username'],
         'hash': avatar_hash(user)
     }
Example #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'])
        }
Example #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'])
        }