Skip to content

Commit

Permalink
Add alt_text field for Media
Browse files Browse the repository at this point in the history
  • Loading branch information
Harmon758 committed Sep 20, 2021
1 parent faec7b1 commit 379e99a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tweepy/media.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -26,6 +26,7 @@ def __init__(self, data):
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__):
Expand Down

0 comments on commit 379e99a

Please sign in to comment.