Closed shymega closed 3 years ago
I think we can add an API URL field to raw::client::Client
and create a Client::with_url
(or similar) constructor function to configure it. Client::new
can then use that and pass the default API URL.
Got it working... I think. Pushing my branch for evaluation - do you want me to open a PR? Need to adjust unit tests, and add additional examples. Other than that, looks like a clean fix ...
OK, I can confirm the fix works examples
- it works either if you use Client::new()
or Client::new_with_url(url: &str)
. I'm pleased with the fix. The only things that need fixing up now are: unit tests and examples - we should include tests for both unofficial Listenbrainz hosts (if any exist?), and official hosts. The same goes with examples.
Having said that - we don't seem to have unit tests?
Perfect! Yeah, you can open a PR.
Having said that - we don't seem to have unit tests?
Correct, there are currently no unit tests. Definitely something that needs to be added. I've made an issue (#5)
Pushed to the feature/alternative-hosts
branch. Opening PR now...
Having said that - we don't seem to have unit tests?
Correct, there are currently no unit tests. Definitely something that needs to be added. I've made an issue (#5)
Noted. Looking at issue #5 now.
As the title says...