aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index d87e6d0..84c1340 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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
}