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
Collaborator

commented Jan 24, 2015

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.

@tonicbupt

This comment has been minimized.

Copy link

commented Jan 24, 2015

LGTM 🍻

@tonyseek

This comment has been minimized.

Copy link
Collaborator Author

commented Jan 24, 2015

@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

This comment has been minimized.

Copy link
@lepture

lepture Jan 25, 2015

Owner

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

This comment has been minimized.

Copy link
@tonyseek

tonyseek Jan 25, 2015

Author Collaborator

done in 1b9ea59

@tonyseek

This comment has been minimized.

Copy link
Collaborator Author

commented Jan 25, 2015

@lepture How about now?

@lepture

This comment has been minimized.

Copy link
Owner

commented Jan 25, 2015

Merged in 280661d

@lepture lepture closed this Jan 25, 2015

@tonyseek tonyseek deleted the tonyseek:feature/experiment-client-enhancement branch Jan 25, 2015

@pyup-bot pyup-bot referenced this pull request Jun 23, 2017
@pyup-bot pyup-bot referenced this pull request Dec 23, 2017
@pyup-bot pyup-bot referenced this pull request Jan 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.