Skip to content

Commit b012d78

Browse files
committed
add getter for base_url and make get_json public
1 parent d25664a commit b012d78

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/client.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ pub struct Client {
2727
}
2828

2929
impl Client {
30+
pub fn base_url(&self) -> &str {
31+
&self.base_url
32+
}
3033
/// Creates a new client with the specified base URL.
3134
///
3235
/// # Arguments
@@ -167,7 +170,7 @@ impl Client {
167170
Ok(CampusQuery::new(self, campus_id))
168171
}
169172

170-
pub(crate) async fn get_json<T>(&self, path: &str) -> Result<T>
173+
pub async fn get_json<T>(&self, path: &str) -> Result<T>
171174
where
172175
T: serde::de::DeserializeOwned,
173176
{

0 commit comments

Comments
 (0)