Esempio n. 1
0
 def to_json(self):
     return json_attributes(self,
         'name',
         'profiles',
         'followers',
         'followings',
         'notifications')
Esempio n. 2
0
 def to_json(self):
     return json_attributes(self,
         'avatar_url',
         'name',
         'location',
         'gender',
         'birthdate',
         'bio'
     )
Esempio n. 3
0
 def to_json(self):
     return json_attributes(self,
        ('id', str),
         'identity',
        ('created_at', time_to_string),
         'notification_path',
         'permissions',
         'types',
         'licenses')
Esempio n. 4
0
 def to_json(self):
     return json_attributes(self,
        ('id', str),
         'identity',
        ('created_at', time_to_string),
         'notification_path',
         'permissions',
         'types',
         'licenses')
Esempio n. 5
0
 def to_json(self):
     """Returns the post as a python dictonary
 
     TODO: 'mentions'
     TODO: 'licenses'
     TODO: 'attachments'
     TODO: 'app'
     TODO: 'views'
     TODO: 'permissions'
     """
     return json_attributes(self, ('id', str),
                            'content', ('published_at', time_to_string),
                            ('received_at', time_to_string),
                            entity=self.entity.core.identity,
                            type=self.schema)
Esempio n. 6
0
 def to_json(self):
     # TODO: test this
     return json_attributes(self, *self._dynamic_fields)
Esempio n. 7
0
 def to_json(self):
     return json_attributes(self, 'name', ('profiles', iterable_to_json),
                            ('followers', iterable_to_json),
                            ('followings', iterable_to_json))
Esempio n. 8
0
 def to_json(self):
     # TODO: test this
     return json_attributes(self, *self._dynamic_fields)
Esempio n. 9
0
 def to_json(self):
     return json_attributes(self,
         'name',
         ('profiles', iterable_to_json),
         ('followers', iterable_to_json),
         ('followings', iterable_to_json))