8 releases

0.4.0 Jan 20, 2024
0.3.5 Dec 13, 2023
0.3.4 Sep 5, 2023
0.3.3 Aug 3, 2023
0.2.0 Jul 19, 2023

#329 in Testing

Download history 7/week @ 2024-04-08 15/week @ 2024-04-15 22/week @ 2024-04-22 17/week @ 2024-04-29 32/week @ 2024-05-20 1/week @ 2024-05-27 33/week @ 2024-06-03 43/week @ 2024-06-10 27/week @ 2024-06-17 17/week @ 2024-06-24 21/week @ 2024-07-01 39/week @ 2024-07-08 25/week @ 2024-07-15 75/week @ 2024-07-22

168 downloads per month
Used in codecov-cache

BSD-3-Clause

28KB
661 lines

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

Dependencies

~4–15MB
~219K SLoC