diff --git a/src/raw/client.rs b/src/raw/client.rs index b12720d..74161c5 100644 --- a/src/raw/client.rs +++ b/src/raw/client.rs @@ -38,6 +38,11 @@ impl Client { } } + /// Get the API URL of this client. + pub fn api_url(&self) -> &str { + &self.api_root_url + } + /// Helper method to perform a GET request against an endpoint /// without any query parameters. fn get(&self, endpoint: Endpoint) -> Result { diff --git a/src/wrapper.rs b/src/wrapper.rs index f51e8bc..5d0cb6a 100644 --- a/src/wrapper.rs +++ b/src/wrapper.rs @@ -40,6 +40,11 @@ impl ListenBrainz { } } + /// Get the API URL of this client. + pub fn api_url(&self) -> &str { + self.client.api_url() + } + /// Check if this client is authenticated. pub fn is_authenticated(&self) -> bool { self.auth.is_some()