Struct orca::net::Connection
[−]
[src]
pub struct Connection { pub auth: Option<OAuth>, pub useragent: UserAgent, pub client: Client, pub limit: Cell<LimitMethod>, // some fields omitted }
A connection holder to reddit. Holds authorization info if provided
Fields
auth: Option<OAuth>
Authorization info (optional, but required for sending authorized requests)
useragent: UserAgent
User agent for the client
client: Client
HTTP client
limit: Cell<LimitMethod>
How to ratelimit (burst or steady)
Methods
impl Connection
[src]
fn new(
appname: &str,
appversion: &str,
appauthor: &str
) -> Result<Connection, Error>
[src]
appname: &str,
appversion: &str,
appauthor: &str
) -> Result<Connection, Error>
fn run_request(&self, req: Request) -> Result<Value, RedditError>
[src]
Send a request to reddit
fn run_auth_request(&self, req: Request) -> Result<Value, RedditError>
[src]
Send a request to reddit with authorization headers