use githubapi::GitHubApi; use std::env; /// To run this example, you must first set two environment variables. /// ```bash /// export GH_USER="SandyClaws" /// export GH_PASS="ThisIsHalloween" /// /// cargo run --example get_rate_limit /// ``` fn main() { let username = env::var("GH_USER").expect("GH_USER not defined."); let password = env::var("GH_PASS").expect("GH_PASS not defined."); let gh = GitHubApi::new(&username, &password); let result = gh.get_rate_limit(); println!("{:#?}", result); }