示例#1
0
文件: entity.py 项目: rlanger/Rondo
 def to_json(self):
     return json_attributes(self,
         'name',
         'profiles',
         'followers',
         'followings',
         'notifications')
示例#2
0
文件: profiles.py 项目: rlanger/Rondo
 def to_json(self):
     return json_attributes(self,
         'avatar_url',
         'name',
         'location',
         'gender',
         'birthdate',
         'bio'
     )
示例#3
0
 def to_json(self):
     return json_attributes(self,
        ('id', str),
         'identity',
        ('created_at', time_to_string),
         'notification_path',
         'permissions',
         'types',
         'licenses')
示例#4
0
 def to_json(self):
     return json_attributes(self,
        ('id', str),
         'identity',
        ('created_at', time_to_string),
         'notification_path',
         'permissions',
         'types',
         'licenses')
示例#5
0
文件: post.py 项目: rlanger/Rondo
 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)
示例#6
0
 def to_json(self):
     # TODO: test this
     return json_attributes(self, *self._dynamic_fields)
示例#7
0
文件: entity.py 项目: pytent/pytentd
 def to_json(self):
     return json_attributes(self, 'name', ('profiles', iterable_to_json),
                            ('followers', iterable_to_json),
                            ('followings', iterable_to_json))
示例#8
0
文件: profiles.py 项目: rlanger/Rondo
 def to_json(self):
     # TODO: test this
     return json_attributes(self, *self._dynamic_fields)
示例#9
0
 def to_json(self):
     return json_attributes(self,
         'name',
         ('profiles', iterable_to_json),
         ('followers', iterable_to_json),
         ('followings', iterable_to_json))