I encountered a case where I want to write unit tests with this library, but I don't want to make real HTTP calls to https://top.gg or have to manage secrets/environment variables in my tests.
Unfortunately, the library doesn't seem to expose the *http.Client (or more importantly, the http.RoundTripper) to allow me to mock out the API response.
PR https://github.com/DiscordBotList/go-dbl/pull/9 submitted to allow customizing the *http.Client (and therefore the http.RoundTripper) following a pattern already established in the library.
Hello,
I encountered a case where I want to write unit tests with this library, but I don't want to make real HTTP calls to https://top.gg or have to manage secrets/environment variables in my tests.
Unfortunately, the library doesn't seem to expose the
*http.Client
(or more importantly, thehttp.RoundTripper
) to allow me to mock out the API response.