diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -8,6 +8,7 @@ use reqwest::{ use std::io::Read; const ZOTAPI_CHANNEL_STREAM_PATH : &str = "/api/z/1.0/channel/stream"; +const ZOTAPI_NETWORK_STREAM_PATH : &str = "/api/z/1.0/network/stream"; #[derive(Debug)] pub enum Error { @@ -41,6 +42,10 @@ impl Client { self.fetch_stream(ZOTAPI_CHANNEL_STREAM_PATH) } + pub fn network_stream(&self) -> Result<String, Error> { + self.fetch_stream(ZOTAPI_NETWORK_STREAM_PATH) + } + fn url(&self, path: &str) -> String { self.base_url.clone() + path } |