Example #1
0
 def __dict__(self):
     return {
         'id': str(self.id),
         'title': self.title,
         'author': self.author.__repr__(),
         'timestamp': to_timestamp(self.timestamp),
         'items': map(lambda x:x.__dict__(), self.items)
     }
Example #2
0
 def __dict__(self):
     return {
         'user' :self.user.__repr__(),
         'balance': self.balance,
         'message': self.message,
         'pending': self.pending,
         'secret': self.secret,
         'timestamp': to_timestamp(self.timestamp)
     }