diff --git a/src/api/history_stream.rs b/src/api/history_stream.rs index 0cfbe8f..2154773 100644 --- a/src/api/history_stream.rs +++ b/src/api/history_stream.rs @@ -5,7 +5,7 @@ //! - [`Sbot::create_history_stream`] use async_std::stream::Stream; -use kuska_ssb::api::dto::CreateHistoryStreamIn; +pub use kuska_ssb::api::dto::CreateHistoryStreamIn as CreateHistoryStream; use crate::{error::GolgiError, messages::SsbMessageKVT, sbot::Sbot, utils}; @@ -17,14 +17,20 @@ impl Sbot { /// /// ```rust /// use async_std::stream::StreamExt; - /// use golgi::{Sbot, GolgiError, sbot::Keystore}; + /// use golgi::{ + /// Sbot, + /// GolgiError, + /// sbot::Keystore, + /// api::history_stream::CreateHistoryStream + /// }; /// /// async fn history() -> Result<(), GolgiError> { /// let mut sbot_client = Sbot::init(Keystore::Patchwork, None, None).await?; /// /// let ssb_id = "@zqshk7o2Rpd/OaZ/MxH6xXONgonP1jH+edK9+GZb/NY=.ed25519".to_string(); /// - /// let history_stream = sbot_client.create_history_stream(ssb_id).await?; + /// let args = CreateHistoryStream::new(ssb_id); + /// let history_stream = sbot_client.create_history_stream(args).await?; /// /// history_stream.for_each(|msg| { /// match msg { @@ -38,10 +44,9 @@ impl Sbot { /// ``` pub async fn create_history_stream( &mut self, - id: String, + args: CreateHistoryStream, ) -> Result>, GolgiError> { let mut sbot_connection = self.get_sbot_connection().await?; - let args = CreateHistoryStreamIn::new(id).keys_values(true, true); let req_id = sbot_connection .client .create_history_stream_req_send(&args)