Skip to content
This repository has been archived by the owner on Feb 21, 2019. It is now read-only.

Commit

Permalink
use self.opener instead of Meetup
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Leon Grinshpun authored and Nathan Hamblen committed Jan 20, 2010
1 parent bfecd0f commit de79e20
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions meetup_api_client.py
Expand Up @@ -91,13 +91,13 @@ def _fetch(self, uri, **url_args):
args = self.args_str(url_args)
url = API_BASE_URL + uri + '/' + "?" + args
print "requesting %s" % (url)
return parse_json(Meetup.opener.open(url).read())
return parse_json(self.opener.open(url).read())

def _post(self, uri, **params):
args = self.args_str(params)
url = API_BASE_URL + uri + '/'
print "posting %s to %s" % (args, url)
return Meetup.opener.open(url, data=args).read()
return self.opener.open(url, data=args).read()

def _post_multipart(self, uri, **params):
params['key'] = self.api_key
Expand Down Expand Up @@ -196,14 +196,14 @@ def _fetch(self, uri, sess=None, oauthreq=None, signature_method=signature_metho
url = oauth_access.to_url()

print "requesting %s" % (url)
return parse_json(Meetup.opener.open(url).read())
return parse_json(self.opener.open(url).read())

def _post(self, uri, sess=None, oauthreq=None, signature_method=signature_method_hmac, **params):
oauth_access = self._sign(uri, sess, oauthreq, signature_method, http_method='POST', **params)
url, data = oauth_access.get_normalized_http_url(), oauth_access.to_postdata()

print "posting %s to %s" % (data, url)
return Meetup.opener.open(url, data=data).read()
return self.opener.open(url, data=data).read()

def _post_multipart(self, uri, sess=None, oauthreq=None, signature_method=signature_method_hmac, **params):
oauth_access = self._sign(uri, sess, oauthreq, signature_method, http_method='POST')
Expand Down

0 comments on commit de79e20

Please sign in to comment.