From 2476fed01bdf720536a8ecdf3e7ad84d80d21b67 Mon Sep 17 00:00:00 2001 From: Nathan Hamblen Date: Wed, 18 Nov 2009 13:27:09 -0500 Subject: [PATCH] include resource path in signature base string --- meetup_api_client.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/meetup_api_client.py b/meetup_api_client.py index 2656ca1..37dfa27 100755 --- a/meetup_api_client.py +++ b/meetup_api_client.py @@ -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) - \ No newline at end of file +