use futures::{pin_mut, StreamExt};
use skystreamer::{stream::EventStream, RepoSubscription};
#[tokio::main]
pub async fn main() -> Result<(), Box<dyn std::error::Error>> {
let subscription = RepoSubscription::new("bsky.network").await.unwrap();
let mut binding = EventStream::new(subscription);
let event_stream = binding.stream().await?;
pin_mut!(event_stream);
while let Some(record) = event_stream.next().await {
if let skystreamer::types::commit::Record::Other(val) = record {
println!("{:?}", val);
}
}
Ok(())
}