Include GetOAuth* methods in Client's method set#803
Include GetOAuth* methods in Client's method set#803vibridi wants to merge 1 commit intoslack-go:masterfrom
Conversation
|
Thank you for your PR. I agree that the testability is low due to the dependency on APIURL constant value, but this function itself does not seem to be a feature that slack.Client should have 🤔 |
|
@kanata2
why not? An alternative approach is to declare a different client, let's say As a matter of fact, I'm not sure why you designed these OAuth funcs as static. |
|
I'm going to take a different approach and use variadic arguments to allow you to set the url. |
Fixes #744 .
This PR moves the previously static
GetOAuth*methods intoClient's method set. This permits to use the configurable API endpoint instead of the global constant, and the existing HTTP client that is set on theClient.This PR currently doesn't include unit tests, as no such tests existed before either. Please advise if you want me to add tests.
Note: this PR breaks backwards compatibility.
Verification please.