[−][src]Crate roux
roux.rs
This crate provides simple access to he Reddit API.
Using OAuth
To create an OAuth client with the reddit API, use the Reddit
class.
use roux::Reddit; let client = Reddit::new("USER_AGENT", "CLIENT_ID", "CLIENT_SECRET") .username("USERNAME") .password("PASSWORD") .login(); let me = client.unwrap();
It is important that you pick a good user agent. The ideal format is
platform:program:version (by /u/yourname)
, e.g. linux:rawr:v0.0.1 (by /u/Aurora0001)
.
This will authticate you as the user given in the username function.
Re-exports
pub use subreddit::Subreddit; |
pub use user::User; |
Modules
subreddit | Subreddit module. |
user | User module. |
Structs
Client to use OAuth with Reddit. |