Add documentation for ReferencedTweet
authorHarmon <Harmon758@gmail.com>
Sun, 27 Feb 2022 20:43:15 +0000 (14:43 -0600)
committerHarmon <Harmon758@gmail.com>
Sun, 27 Feb 2022 20:45:04 +0000 (14:45 -0600)
docs/v2_models.rst
tweepy/tweet.py

index 3b2ebd9f5a007480979274d2b99bfc5697793a12..0aec9f79898e8b13d7a5955d353ce2db6e5c46a8 100644 (file)
@@ -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
 
index c92de22fcf0564e7fe4d4c1a112b0ce966a307ec..694191c4c169e608c8375b08104cb474d2b09ac8 100644 (file)
@@ -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")