pub async fn get_gitpoaps_for_github_user(
github_handle: &str,
status: Option<Status>,
) -> Result<GitpoapsResponse, Box<dyn Error>>
Expand description
GET /v1/github/user/:githubHandle/gitpoaps?status=
use gitpoap_rs::v1::get_gitpoaps_for_github_user;
#[tokio::main]
async fn main() {
let github_handle = "woxjro";
let response = get_gitpoaps_for_github_user(github_handle, None).await;
assert!(response.is_ok());
let gitpoaps_response = response.unwrap();
assert_eq!(gitpoaps_response.0.is_empty(), false);
}
Examples found in repository?
examples/get_gitpoaps_for_github_user.rs (line 6)
4async fn main() {
5 let github_handle = "woxjro";
6 let response = get_gitpoaps_for_github_user(github_handle, None).await;
7 match response {
8 Ok(gitpoaps_response) => {
9 dbg!("{:?}", gitpoaps_response);
10 }
11 Err(e) => {
12 eprintln!("Error: {}", e);
13 }
14 }
15}