Crates.io | rraw |
lib.rs | rraw |
version | 1.2.1 |
source | src |
created_at | 2021-06-02 13:39:27.852719 |
updated_at | 2023-07-07 14:12:09.369607 |
description | An async Rust Reddit API Wrapper |
homepage | |
repository | https://github.com/wyatt-herkamp/rraw |
max_upload_size | |
id | 405301 |
size | 91,112 |
Rust Reddit API Wrapper is a basic Rust Wrapper for Reddit. It gives simple and easy use to common tasks done via the Reddit API. It also does very little processing of the Reddit API giving you near raw results from the Reddit API.
Due to recent changes to the Reddit API I no longer plan to be maintaining this library.
Here is a small crash course. However, please review the tests directory for more examples
#[tokio::main]
pub async fn main() -> anyhow::Result<()> {
// Create a Client passing a Authenticator into it. Also give the Client a user agent
let client =
Client::login(AnonymousAuthenticator::new(), "RRAW Test (by u/KingTuxWH)").await?;
/// Get the about page of the user
let user = client.user("KingTuxWH").await?;
/// About pages implement Display giving you their name
println!("Username: {}", user.about);
Ok(())
}