From fc244cb011945e922304ac3b9572b2de811585ef Mon Sep 17 00:00:00 2001 From: Jonathan Ronen Date: Fri, 4 Apr 2014 18:10:59 -0400 Subject: [PATCH] Add _json field to user and status models, including entire twitter json object --- tweepy/models.py | 2 ++ 1 file changed, 2 insertions(+) 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)) -- 2.25.1