diff --git a/instapi/models/user.py b/instapi/models/user.py index 8a41fc7..6a9c5b7 100644 --- a/instapi/models/user.py +++ b/instapi/models/user.py @@ -88,6 +88,18 @@ def media_count(self) -> int: """ return cast(int, self.user_detail()["media_count"]) + @property + def get_phone_number(self) -> str: + """ + Return user's phone number + + :return: str + """ + detail = self.user_detail() + phone_number = detail["public_phone_country_code"] + detail["public_phone_number"] + + return "+{}".format(phone_number) if phone_number else "" + @property def follower_count(self) -> int: """