コード例 #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
ファイル: followers.py プロジェクト: SoftlySplinter/pytentd
 def to_json(self):
     return json_attributes(self,
        ('id', str),
         'identity',
        ('created_at', time_to_string),
         'notification_path',
         'permissions',
         'types',
         'licenses')
コード例 #4
0
ファイル: followers.py プロジェクト: rlanger/Rondo
 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
ファイル: profiles.py プロジェクト: pytent/pytentd
 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
ファイル: entity.py プロジェクト: SoftlySplinter/pytentd
 def to_json(self):
     return json_attributes(self,
         'name',
         ('profiles', iterable_to_json),
         ('followers', iterable_to_json),
         ('followings', iterable_to_json))