From 9a995b524eab52e49428b26aca51b51a04a84278 Mon Sep 17 00:00:00 2001 From: Harmon Date: Sun, 27 Feb 2022 14:43:15 -0600 Subject: [PATCH] Add documentation for ReferencedTweet --- docs/v2_models.rst | 4 +--- tweepy/tweet.py | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/docs/v2_models.rst b/docs/v2_models.rst index 3b2ebd9..0aec9f7 100644 --- a/docs/v2_models.rst +++ b/docs/v2_models.rst @@ -38,9 +38,7 @@ Models .. autoclass:: Tweet() -.. class:: tweepy.ReferencedTweet - - :reference: https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/tweet +.. autoclass:: ReferencedTweet() .. class:: tweepy.User diff --git a/tweepy/tweet.py b/tweepy/tweet.py index c92de22..694191c 100644 --- a/tweepy/tweet.py +++ b/tweepy/tweet.py @@ -165,6 +165,20 @@ class Tweet(HashableID, DataMapping): class ReferencedTweet(HashableID, DataMapping): + """.. versionadded:: 4.0 + + Attributes + ---------- + data : dict + The JSON data representing the referenced Tweet. + id : int + The unique identifier of the referenced Tweet. + type : str + + References + ---------- + https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/tweet + """ __slots__ = ("data", "id", "type") -- 2.25.1