From: Jonathan Ronen Date: Fri, 4 Apr 2014 22:10:59 +0000 (-0400) Subject: Add _json field to user and status models, including entire twitter json object X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=fc244cb011945e922304ac3b9572b2de811585ef;p=tweepy.git Add _json field to user and status models, including entire twitter json object --- diff --git a/tweepy/models.py b/tweepy/models.py index 1338ab4..263b8b4 100644 --- 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))