From 77531a4f3ebfe5e2f760da156f88377462dab67d Mon Sep 17 00:00:00 2001 From: Harmon Date: Fri, 7 Jan 2022 08:14:36 -0600 Subject: [PATCH] Improve order of OAuth1UserHandler methods --- tweepy/auth.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tweepy/auth.py b/tweepy/auth.py index 120e28f..970c32c 100644 --- a/tweepy/auth.py +++ b/tweepy/auth.py @@ -44,9 +44,6 @@ class OAuth1UserHandler: client_secret=consumer_secret, callback_uri=self.callback) - def _get_oauth_url(self, endpoint): - return 'https://api.twitter.com/oauth/' + endpoint - def apply_auth(self): return OAuth1(self.consumer_key, client_secret=self.consumer_secret, @@ -54,6 +51,9 @@ class OAuth1UserHandler: resource_owner_secret=self.access_token_secret, decoding=None) + def _get_oauth_url(self, endpoint): + return 'https://api.twitter.com/oauth/' + endpoint + def _get_request_token(self, access_type=None): try: url = self._get_oauth_url('request_token') @@ -63,10 +63,6 @@ class OAuth1UserHandler: except Exception as e: raise TweepyException(e) - def set_access_token(self, key, secret): - self.access_token = key - self.access_token_secret = secret - def get_authorization_url(self, signin_with_twitter=False, access_type=None): @@ -102,6 +98,10 @@ class OAuth1UserHandler: except Exception as e: raise TweepyException(e) + def set_access_token(self, key, secret): + self.access_token = key + self.access_token_secret = secret + class OAuthHandler(OAuth1UserHandler): """Alias for :class:`OAuth1UserHandler` -- 2.25.1