From b2654cc8babd9d8b90d1b04190f44a4a2ee4116c Mon Sep 17 00:00:00 2001 From: Kyle Hardgrave Date: Fri, 9 Oct 2015 14:59:09 -0700 Subject: [PATCH] Pass PEP8 --- medium/__init__.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/medium/__init__.py b/medium/__init__.py index 0dba1bc..1449ac8 100644 --- a/medium/__init__.py +++ b/medium/__init__.py @@ -18,7 +18,6 @@ def __init__(self, application_id=None, application_secret=None, self.application_secret = application_secret self.access_token = access_token - def get_authorization_url(self, state, redirect_url, scopes): """Get a URL for users to authorize the application. @@ -37,7 +36,6 @@ def get_authorization_url(self, state, redirect_url, scopes): return "https://medium.com/m/oauth/authorize?" + urlencode(qs) - def exchange_authorization_code(self, code, redirect_url): """Exchange the authorization code for a long-lived access token, and set the token on the current Client. @@ -64,7 +62,6 @@ def exchange_authorization_code(self, code, redirect_url): } return self._request_and_set_auth_code(data) - def exchange_refresh_token(self, refresh_token): """Exchange the supplied refresh token for a new access token, and set the token on the current Client. @@ -88,7 +85,6 @@ def exchange_refresh_token(self, refresh_token): } return self._request_and_set_auth_code(data) - def get_current_user(self): """Fetch the data for the currently authenticated user. @@ -104,7 +100,6 @@ def get_current_user(self): """ return self._request("GET", "/v1/me") - def create_post(self, user_id, title, content, content_format, tags=None, canonical_url=None, publish_status=None, license=None): """Create a post for the current user. @@ -161,14 +156,12 @@ def create_post(self, user_id, title, content, content_format, tags=None, path = "/v1/users/%s/posts" % user_id return self._request("POST", path, json=data) - def _request_and_set_auth_code(self, data): """Request an access token and set it on the current client.""" result = self._request("POST", "/v1/tokens", form_data=data) self.access_token = result["access_token"] return result - def _request(self, method, path, json=None, form_data=None, files=None): """Make a signed request to the given route.""" url = BASE_PATH + path