listenbrainz-rs/src/raw
Dom Rodriguez e0d25815f0
Add support for alternative Listenbrainz hosts
This commit adds support for alternative Listenbrainz hosts.

L10 defines the most used official host for Listenbrainz.

I have refactored the Client struct to have the `api_root_url` field.
This is automatically set to the value L10 defines, when a Client is
instantiated with `new()`. On the invocation of `client_with_url(url:
&str)`, the `api_root_url` field is set to the Listenbrainz instance
API root URL passed to the function.

The 1:1 functions <-> API methods have been modified to use
`self.api_root_url` as the base of the `format!()` macro invoked, rather
than the global constant of `API_ROOT_URL`.

This commit has been tested with the examples, and appears to be
functional.

Fixes #2.

Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
2021-08-30 16:26:39 +01:00
..
client.rs Add support for alternative Listenbrainz hosts 2021-08-30 16:26:39 +01:00
endpoint.rs Move Endpoint to raw module 2021-01-20 00:23:35 +01:00
mod.rs Move Endpoint to raw module 2021-01-20 00:23:35 +01:00
request.rs Move Client to raw module 2021-01-19 23:51:17 +01:00
response.rs Add rate limiting information to response types 2021-01-30 03:06:02 +01:00