diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/xchan.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/xchan.rs b/src/xchan.rs index 564531a..88b3cb1 100644 --- a/src/xchan.rs +++ b/src/xchan.rs @@ -36,6 +36,16 @@ impl<'a> XChanFetcher<'a> { self } + pub fn by_hash(&mut self, hash: &'a str) -> &mut XChanFetcher<'a> { + self.data.insert("hash", hash); + self + } + + pub fn by_guid(&mut self, guid: &'a str) -> &mut XChanFetcher<'a> { + self.data.insert("guid", guid); + self + } + pub fn fetch(&self) -> Result<String, Error> { self.client.fetch_stream(client::ZOTAPI_XCHAN_PATH, &self.data) } |