Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the experiment client #176

Closed

Conversation

tonyseek
Copy link
Contributor

Changes

  • Refactoring the shortcut methods (.get, .post and also)
  • Added cached feature for session clients (OAuthState)
  • Added new method make_client to eliminate repeated code
  • Fixed the specific token usage support: client.get(url, token=foo) instead of always calling tokengetter

@lepture Please review. Thanks.

@tonicmuroq
Copy link

LGTM 🍻

@tonyseek
Copy link
Contributor Author

@tonicbupt = =......

client = self._make_client_with_token(token)
url = urljoin(self.endpoint_url, url)
return getattr(client, method)(url, *args, **kwargs)

# magic: generate methods which forward to self.client
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like things without magic. I prefer a little repeating on http methods.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in 1b9ea59

@tonyseek
Copy link
Contributor Author

@lepture How about now?

@lepture
Copy link
Owner

lepture commented Jan 25, 2015

Merged in 280661d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants