Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

slashless request, authorize, and access urls (for testing)

  • Loading branch information...
commit e9b0065d2281a0cd583b58f183922b70e8c0d096 1 parent 51a27e7
@n8han n8han authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 meetup_api_client.py
View
6 meetup_api_client.py
@@ -135,7 +135,7 @@ def __init__(self, consumer, request_token, access_token):
def fetch_request_token(self, callback="oob", signature_method=signature_method_hmac):
oauth_req = oauth.OAuthRequest.from_consumer_and_token(
- self.consumer, http_url=(OAUTH_BASE_URL + 'oauth/request/'), callback=callback)
+ self.consumer, http_url=(OAUTH_BASE_URL + 'oauth/request'), callback=callback)
oauth_req.sign_request(signature_method, self.consumer, None)
token_string = urlopen(Request(oauth_req.http_url, headers=oauth_req.to_header())).read()
self.request_token = oauth.OAuthToken.from_string(token_string)
@@ -145,14 +145,14 @@ def get_authorize_url(self, oauth_callback=None):
callbackUrl = "&" + urlencode({"oauth_callback":oauth_callback})
else:
callbackUrl = ""
- return OAUTH_BASE_URL + "authorize/?oauth_token=%s%s" % (self.request_token.key, callbackUrl)
+ return OAUTH_BASE_URL + "authorize?oauth_token=%s%s" % (self.request_token.key, callbackUrl)
def fetch_access_token(self, oauth_verifier, signature_method=signature_method_hmac, request_token=None):
temp_request_token = request_token or self.request_token
if not temp_request_token:
raise NoToken("You must provide a request token to exchange for an access token")
oauth_req = oauth.OAuthRequest.from_consumer_and_token(self.consumer, token=temp_request_token,
- http_url=OAUTH_BASE_URL + 'oauth/access/', verifier=oauth_verifier)
+ http_url=OAUTH_BASE_URL + 'oauth/access', verifier=oauth_verifier)
oauth_req.sign_request(signature_method, self.consumer, temp_request_token)
token_string = urlopen(Request(oauth_req.http_url, headers=oauth_req.to_header())).read()
self.access_token = oauth.OAuthToken.from_string(token_string)
Please sign in to comment.
Something went wrong with that request. Please try again.