https://github.com/vallentin/gh-repo-info
https://github.com/vallentin/gh-repo-info
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/vallentin/gh-repo-info
- Owner: vallentin
- License: mit
- Created: 2023-06-01T02:13:37.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-06-01T02:27:52.000Z (about 3 years ago)
- Last Synced: 2025-11-07T02:25:13.223Z (9 months ago)
- Language: Rust
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gh-repo-info
[](https://crates.io/crates/gh-repo-info)
[](https://docs.rs/gh-repo-info)
[](https://github.com/vallentin/gh-repo-info)
Get GitHub repository information given an `owner` and `repo`.
## Example
```toml
[dependencies]
gh-repo-info = "0.1"
tokio = { version = "1", features = ["full"] }
```
```rust
#[tokio::main]
async fn main() {
let repo = gh_repo_info::get("rust-lang", "rust").await.unwrap();
println!("{:#?}", repo);
}
```
## Blocking
```toml
[dependencies]
gh-repo-info = { version = "0.1", features = ["blocking"] }
```
```rust
fn main() {
let repo = gh_repo_info::blocking::get("rust-lang", "rust").unwrap();
println!("{:#?}", repo);
}
```
## Output
```text
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",
],
}
```