From: Harmon Date: Wed, 1 Mar 2023 01:13:05 +0000 (-0600) Subject: Add verified_type field for User X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9f7afaefa680da6a4f7864db99e12dd72a51cafa;p=tweepy.git Add verified_type field for User --- diff --git a/tweepy/user.py b/tweepy/user.py index f5a52a5..2ebceca 100644 --- a/tweepy/user.py +++ b/tweepy/user.py @@ -21,6 +21,9 @@ class User(HashableID, DataMapping): .. versionadded:: 4.0 + .. versionchanged:: 4.13 + Added ``verified_type`` field + Attributes ---------- data : dict @@ -63,6 +66,9 @@ class User(HashableID, DataMapping): The URL specified in the user's profile, if present. verified : bool | None Indicates if this user is a verified Twitter User. + verified_type : str | None + Indicates the type of verification a user account has (blue, business, + government or none). withheld : dict | None Contains withholding details for `withheld content`_, if applicable. @@ -77,7 +83,8 @@ class User(HashableID, DataMapping): __slots__ = ( "data", "id", "name", "username", "created_at", "description", "entities", "location", "pinned_tweet_id", "profile_image_url", - "protected", "public_metrics", "url", "verified", "withheld" + "protected", "public_metrics", "url", "verified", "verified_type", + "withheld" ) def __init__(self, data): @@ -103,6 +110,7 @@ class User(HashableID, DataMapping): self.public_metrics = data.get("public_metrics") self.url = data.get("url") self.verified = data.get("verified") + self.verified_type = data.get("verified_type") self.withheld = data.get("withheld") def __repr__(self):