pullcaps 0.2.0

An asynchronous client for the PushShift API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use futures::StreamExt;
use pullcaps::{Client, Filter};

#[tokio::main]
async fn main() {
    let client = Client::new();

    let mut comments = client
        .get_comments(Filter::new().author("reddit"))
        .await
        .take(5);
    while let Some(comment) = comments.next().await {
        println!("text: {}", comment.body);
    }
}