projects
/
tweepy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d599e4c
)
Add _json field to user and status models, including entire twitter json object
author
Jonathan Ronen
<yablee@gmail.com>
Fri, 4 Apr 2014 22:10:59 +0000
(18:10 -0400)
committer
Jonathan Ronen
<yablee@gmail.com>
Fri, 4 Apr 2014 22:10:59 +0000
(18:10 -0400)
tweepy/models.py
patch
|
blob
|
blame
|
history
diff --git
a/tweepy/models.py
b/tweepy/models.py
index 1338ab456b37227d895f2128af9942e79417edd0..263b8b402fb14f59cd7159f9302f1eb1ed97fa6d 100644
(file)
--- a/
tweepy/models.py
+++ b/
tweepy/models.py
@@
-68,6
+68,7
@@
class Status(Model):
@classmethod
def parse(cls, api, json):
status = cls(api)
+ setattr(status, '_json', json)
for k, v in json.items():
if k == 'user':
user_model = getattr(api.parser.model_factory, 'user') if api else User
@@
-112,6
+113,7
@@
class User(Model):
@classmethod
def parse(cls, api, json):
user = cls(api)
+ setattr(user, '_json', json)
for k, v in json.items():
if k == 'created_at':
setattr(user, k, parse_datetime(v))