Add alt_text field for Media
authorHarmon <Harmon758@gmail.com>
Mon, 20 Sep 2021 23:13:14 +0000 (18:13 -0500)
committerHarmon <Harmon758@gmail.com>
Mon, 20 Sep 2021 23:13:14 +0000 (18:13 -0500)
tweepy/media.py

index 6021e70fdceb95eef97bc105d7819f94987afd50..4920b2ed23d32e426c485316572351d077cc6e85 100644 (file)
@@ -10,7 +10,7 @@ class Media(DataMapping):
     __slots__ = (
         "data", "media_key", "type", "duration_ms", "height",
         "non_public_metrics", "organic_metrics", "preview_image_url",
-        "promoted_metrics", "public_metrics", "width"
+        "promoted_metrics", "public_metrics", "width", "alt_text"
     )
 
     def __init__(self, data):
@@ -26,6 +26,7 @@ class Media(DataMapping):
         self.promoted_metrics = data.get("promoted_metrics")
         self.public_metrics = data.get("public_metrics")
         self.width = data.get("width")
+        self.alt_text = data.get("alt_text")
 
     def __eq__(self, other):
         if isinstance(other, self.__class__):