pub struct Client { /* private fields */ }Expand description
Client is a struct wrapping CodecovClient.
Implementations§
Source§impl Client
Client is a struct wrapping CodecovClient.
pub methods are same as CodecovClient.
https://docs.rs/codecov/latest/codecov/struct.Client.html
impl Client
Client is a struct wrapping CodecovClient. pub methods are same as CodecovClient. https://docs.rs/codecov/latest/codecov/struct.Client.html
pub fn new_from_env() -> Result<Client, Error>
pub fn new(token: String, cache_dir: PathBuf) -> Client
Sourcepub fn get_all_repos(&self, owner: &Owner) -> Result<Vec<Repo>, Error>
pub fn get_all_repos(&self, owner: &Owner) -> Result<Vec<Repo>, Error>
get_all_repos returns a list of all repos for a given owner. /repos endpoint returns a list of repos for a given owner with pagination. This function will make multiple requests to get all repos.
Sourcepub fn get_commits(&self, author: &Author) -> Result<CommitsAPIResponse, Error>
pub fn get_commits(&self, author: &Author) -> Result<CommitsAPIResponse, Error>
get_commits returns a list of commits for a given author. https://docs.codecov.com/reference/repos_commits_list
Sourcepub fn get_branches(
&self,
author: &Author,
) -> Result<BranchesAPIResponse, Error>
pub fn get_branches( &self, author: &Author, ) -> Result<BranchesAPIResponse, Error>
get_branches returns a list of branches for a given author. https://docs.codecov.com/reference/repos_branches_list
Sourcepub fn get_branch_detail(
&self,
author: &Author,
branch_name: &str,
) -> Result<BranchDetailAPIResponse, Error>
pub fn get_branch_detail( &self, author: &Author, branch_name: &str, ) -> Result<BranchDetailAPIResponse, Error>
get_branch_detail returns a branch detail for a given author and branch name. https://docs.codecov.com/reference/repos_branches_retrieve
Sourcepub fn get_branch_detail_with_commit_id(
&self,
author: &Author,
branch_name: &str,
commit_id: &str,
) -> Result<BranchDetailAPIResponse, Error>
pub fn get_branch_detail_with_commit_id( &self, author: &Author, branch_name: &str, commit_id: &str, ) -> Result<BranchDetailAPIResponse, Error>
get_branch_detail returns a branch detail for a given author and branch name. https://docs.codecov.com/reference/repos_branches_retrieve