|
|
|
@ -149,11 +149,7 @@ class Statement(StatementMixin):
|
|
|
|
|
:returns: A dictionary representation of the statement object.
|
|
|
|
|
:rtype: dict
|
|
|
|
|
"""
|
|
|
|
|
data = {}
|
|
|
|
|
|
|
|
|
|
data['text'] = self.text
|
|
|
|
|
data['in_response_to'] = []
|
|
|
|
|
data['extra_data'] = self.extra_data
|
|
|
|
|
data = {'text': self.text, 'in_response_to': [], 'extra_data': self.extra_data}
|
|
|
|
|
|
|
|
|
|
for response in self.in_response_to:
|
|
|
|
|
data['in_response_to'].append(response.serialize())
|
|
|
|
@ -212,11 +208,6 @@ class Response(object):
|
|
|
|
|
return self.text == other
|
|
|
|
|
|
|
|
|
|
def serialize(self):
|
|
|
|
|
data = {}
|
|
|
|
|
|
|
|
|
|
data['text'] = self.text
|
|
|
|
|
data['created_at'] = self.created_at.isoformat()
|
|
|
|
|
|
|
|
|
|
data['occurrence'] = self.occurrence
|
|
|
|
|
data = {'text': self.text, 'created_at': self.created_at.isoformat(), 'occurrence': self.occurrence}
|
|
|
|
|
|
|
|
|
|
return data
|
|
|
|
|