Crate rapr[][src]

Reddit api wrapper

Example program
You need tokio to use this.
Make sure to use tokio = { version = "1.3.*", features = ["full"] }

extern crate rapr;
extern crate tokio;
use crate::rapr::{RaprClient,RaSub};
#[tokio::main]
async fn main() -> Result<(), rapr::Error> {
     let client = RaprClient::default();
     let mut sub = RaSub::new("pics");
     client.fetch(10, &mut sub).await?;
     for post in sub.posts {
         println!("{}",post.title);
     }
     Ok(())
}

Structs

RaPost

Reddit post object (more like repost object).
Keeps track of post information.

RaPostItems

Items related to the post

RaSub

RaSub

RaprClient

Reddit api client.
Uses a reqwest::Client internally.
Currently no authentication

Enums

Error

Error enum