-
Notifications
You must be signed in to change notification settings - Fork 46
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
Per-call credentials #31
base: master
Are you sure you want to change the base?
Conversation
- Added an 'auth:' named local for MindBody::Client#call that allows custom per-call credentials. If no parameter is passed, falls back to the standard behavior of using MindBody::configuration for client details. - Fixed broken tests (missing mocks) - Added tests for 'auth:' cases.
Overall this looks ok. I'll need a README update. Is this strategy of per-call overrides preferable over multiple instances? I'd actually considered removing the singleton-style of configuration and having the user create different instances instead (ala faraday). |
I would totally love to do it via a configuration thing, but that was a way bigger change and I'm not super comfortable with the object model in here right now--figuring out where everything would need to be touched is a pretty big step. |
I'm building something that requires access to multiple MindBody customers at a time. To that end I've extended
MindBody::Client
to support this by passing in anauth:
parameter alongsidemessage:
and written tests to cover the major cases for it (noauth:
,auth:
with source credentials,auth:
with both source and user credentials).Also, some tests were broken in
master
and I've fixed those as part of this branch.