Permalink
Browse files

include resource path in signature base string

  • Loading branch information...
1 parent 4235930 commit 2476fed01bdf720536a8ecdf3e7ad84d80d21b67 @n8han n8han committed Nov 18, 2009
Showing with 6 additions and 5 deletions.
  1. +6 −5 meetup_api_client.py
View
@@ -196,12 +196,13 @@ def _fetch(self, uri, oauthreq=None, signature_method=signature_method_plaintext
url_args['format'] = 'json'
oauth_access = oauth.OAuthRequest.from_consumer_and_token(self.consumer,
token = temp_access_token,
- http_url="http://api" + DEV + ".meetup.com/",
+ http_url="http://api" + DEV + ".meetup.com/" + uri + "/",
parameters=url_args)
oauth_access.sign_request(signature_method, self.consumer, temp_access_token)
- url_args.update(oauth_access.get_oauth_parameters());
- args = urllib.urlencode(url_args)
- url = API_BASE_URL + uri + '/' + "?" + args
+ url = oauth_access.to_url()
+ else:
+ args = urllib.urlencode(url_args)
+ url = API_BASE_URL + uri + '/' + "?" + args
print "requesting %s" % (url)
try:
request = urllib2.Request(url)
@@ -389,4 +390,4 @@ class BadRequestError(ClientException):
url = oauth_session.get_authorize_url()
print "Opening a browser on the authorization page: %s" % url
webbrowser.open(url)
-
+

0 comments on commit 2476fed

Please sign in to comment.