orca 0.7.0

A Reddit API client for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use failure::Error;
use hyper::{Body, Request};
use json::Value;

use App;

impl App {
	/// Gets information about a user that is not currently authorized
	/// # Arguments
	/// * `name` - username of the user to query
	/// # Returns
	/// A json value containing the user info
	pub fn get_user(&self, name: &str) -> Result<Value, Error> {
		let req = Request::get(format!("https://www.reddit.com/user/{}/about/.json", name)).body(Body::empty()).unwrap();

		self.conn.run_request(req)
	}
}