gh-repo-info

Crates.iogh-repo-info
lib.rsgh-repo-info
version0.1.0
sourcesrc
created_at2023-06-01 02:28:23.859808
updated_at2023-06-01 02:28:23.859808
descriptionGet GitHub repo info
homepage
repositoryhttps://github.com/vallentin/gh-repo-info
max_upload_size
id879406
size42,522
Christian Vallentin (vallentin)

documentation

https://docs.rs/gh-repo-info

README

gh-repo-info

Latest Version Docs License

Get GitHub repository information given an owner and repo.

Example

[dependencies]
gh-repo-info = "0.1"
tokio = { version = "1", features = ["full"] }
#[tokio::main]
async fn main() {
    let repo = gh_repo_info::get("rust-lang", "rust").await.unwrap();
    println!("{:#?}", repo);
}

Blocking

[dependencies]
gh-repo-info = { version = "0.1", features = ["blocking"] }
fn main() {
    let repo = gh_repo_info::blocking::get("rust-lang", "rust").unwrap();
    println!("{:#?}", repo);
}

Output

GhRepoInfo {
    name: "rust",
    full_name: "rust-lang/rust",
    url: "https://github.com/rust-lang/rust",
    owner: GhRepoOwnerInfo {
        name: "rust-lang",
        url: "https://github.com/rust-lang",
        avatar_url: "https://avatars.githubusercontent.com/u/5430905?v=4",
        kind: Organization,
    },
    stargazers_count: 82127,
    subscribers_count: 1489,
    forks_count: 10830,
    open_issues_count: 9549,
    is_fork: false,
    is_archived: false,
    default_branch: "master",
    homepage: "https://www.rust-lang.org",
    description: "Empowering everyone to build reliable and efficient software.",
    license: GhRepoLicenseInfo {
        key: "other",
        name: "Other",
    },
    language: "Rust",
    topics: [
        "compiler",
        "hacktoberfest",
        "language",
        "rust",
    ],
}
Commit count: 1

cargo fmt