From: Harmon Date: Fri, 7 Jan 2022 11:36:55 +0000 (-0600) Subject: Simplify OAuthHandler X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f4d15edc50b999dd338d2af0eeea7dcf3ce0e457;p=tweepy.git Simplify OAuthHandler --- diff --git a/tweepy/auth.py b/tweepy/auth.py index c6b798e..d2c8726 100644 --- a/tweepy/auth.py +++ b/tweepy/auth.py @@ -29,9 +29,6 @@ class AuthHandler: class OAuthHandler(AuthHandler): - """OAuth authentication handler""" - OAUTH_HOST = 'api.twitter.com' - OAUTH_ROOT = '/oauth/' def __init__(self, consumer_key, consumer_secret, callback=None): if not isinstance(consumer_key, (str, bytes)): @@ -53,7 +50,7 @@ class OAuthHandler(AuthHandler): callback_uri=self.callback) def _get_oauth_url(self, endpoint): - return 'https://' + self.OAUTH_HOST + self.OAUTH_ROOT + endpoint + return 'https://api.twitter.com/oauth/' + endpoint def apply_auth(self): return OAuth1(self.consumer_key,