codecov

Crates.iocodecov
lib.rscodecov
version0.4.0
sourcesrc
created_at2023-07-19 21:38:25.431884
updated_at2024-01-20 07:22:09.510598
descriptionCodecov API client for Rust
homepage
repositoryhttps://github.com/kitsuyui/rust-codecov
max_upload_size
id920752
size36,429
kitsuyui (kitsuyui)

documentation

https://docs.rs/codecov

README

rust-codecov

Crates.io codecov crates.io docs.rs License: BSD-3-Clause

Description

A thin wrapper for Codecov API (v2). https://docs.codecov.com/reference/overview

Usage

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());
}

LICENSE

BSD-3-Clause

Commit count: 106

cargo fmt