From f0e53c6d6a21595cefc797b66ab8bbc027a2d425 Mon Sep 17 00:00:00 2001 From: Harmon Date: Fri, 9 Apr 2021 14:01:01 -0500 Subject: [PATCH] Add API.remove_profile_banner --- docs/api.rst | 2 ++ tweepy/api.py | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/docs/api.rst b/docs/api.rst index 6faa869..852ad1e 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -154,6 +154,8 @@ Manage account settings and profile .. automethod:: API.get_profile_banner +.. automethod:: API.remove_profile_banner + Direct Message Methods ---------------------- diff --git a/tweepy/api.py b/tweepy/api.py index 3e495eb..a12c510 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -1828,6 +1828,15 @@ class API: ), **kwargs ) + def remove_profile_banner(self, **kwargs): + """remove_profile_banner() + + Removes the uploaded profile banner for the authenticating user. + + :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/manage-account-settings/api-reference/post-account-remove_profile_banner + """ + return self.request('POST', 'account/remove_profile_banner', **kwargs) + def media_upload(self, filename, *, file=None, chunked=False, media_category=None, additional_owners=None, **kwargs): """ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/media/upload-media/overview -- 2.25.1