1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
mod rapr; pub use crate::rapr::RaprClient; #[cfg(test)] mod tests { #[tokio::test] async fn subreddit() { use crate::rapr::RaprClient; let client = RaprClient::new(); let mut sub = RaprClient::subreddit("rust"); client.fetch(10, &mut sub).await.unwrap(); println!("{:#?}", sub.posts.len()); client.fetch(5, &mut sub).await.unwrap(); println!("{:#?}", sub.posts.len()); println!("{:#?}", sub.pinned_posts()); } }