aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib.rs b/src/lib.rs
index c2d77ee..e02f38a 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -17,7 +17,8 @@ pub struct Client {
impl Client {
pub fn channel_stream(&self) -> String {
- let mut res = self.inner.get(&self.channel_stream_url())
+ let url = self.url(ZOTAPI_CHANNEL_STREAM_PATH);
+ let mut res = self.inner.get(&url)
.header(Accept(vec![qitem(mime::APPLICATION_JSON)]))
.basic_auth(self.user.clone(), Some(self.pw.clone()))
.send()
@@ -28,8 +29,8 @@ impl Client {
body
}
- fn channel_stream_url(&self) -> String {
- self.base_url.clone() + ZOTAPI_CHANNEL_STREAM_PATH
+ fn url(&self, path: &str) -> String {
+ self.base_url.clone() + path
}
}