Function get_gitpoaps_for_github_user

Source
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= This endpoint allows users to query for minted GitPOAPs associated with a specified GitHub handle. The status query parameter is one of the following: claimed, unclaimed, pending, minting, and can be omitted completely. This returns data like:

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}