| Crates.io | codecov |
| lib.rs | codecov |
| version | 0.4.1 |
| created_at | 2023-07-19 21:38:25.431884+00 |
| updated_at | 2025-09-10 12:23:52.643476+00 |
| description | Codecov API client for Rust |
| homepage | |
| repository | https://github.com/kitsuyui/rust-codecov |
| max_upload_size | |
| id | 920752 |
| size | 76,759 |
A thin wrapper for Codecov API (v2). https://docs.codecov.com/reference/overview
use codecov::{Client, owner::Owner};
fn main() {
// let client = Client::new("1234-5678-9012-3456"); // Set token directly
let client = Client::new_from_env().unwrap(); // Read CODECOV_OWNER_TOKEN from environment variable
let owner = Owner::new("github", "kitsuyui");
let repos = client.get_all_repos(&owner).unwrap();
println!("{:?}", repos);
let author = owner.new_author("rust-codecov");
let repo_detail = client.get_branch_detail(&author, "main").unwrap();
println!("{:?}", repo_detail);
println!("{}", repo_detail.latest_coverage());
}
BSD-3-Clause