Trait github_rs::github::GitData
[−]
[src]
pub trait GitData { fn get_commit(&self, owner: &str, repo: &str, sha: &str) -> Result<Commit>; fn get_ref(&self, owner: &str, repo: &str, _ref: &str) -> Result<Ref>; fn get_ref_mult(&self,
owner: &str,
repo: &str,
_ref: &str)
-> Result<Vec<Ref>>; fn get_refs(&self, owner: &str, repo: &str) -> Result<Vec<Ref>>; }
Trait used to define access to endpoints grouped under Users
in the Github API
specification
Required Methods
fn get_commit(&self, owner: &str, repo: &str, sha: &str) -> Result<Commit>
Request Type:
GET
Endpoint:
/repos/:owner/:repo/git/commits/:sha
Description
Returns a Blob
Struct for the requested owner's repo and sha.
fn get_ref(&self, owner: &str, repo: &str, _ref: &str) -> Result<Ref>
Request Type:
GET
Endpoint:
/repos/:owner/:repo/git/refs/:ref
Description
Returns a Ref
Struct for the requested owner's repo and sha.
fn get_ref_mult(&self, owner: &str, repo: &str, _ref: &str) -> Result<Vec<Ref>>
Request Type:
GET
Endpoint:
/repos/:owner/:repo/git/refs/:ref
Description
Returns an array of Ref
Struct for the requested owner's repo and sha.
This should be used if there are multiple refs. If you have two branches
projectA and projectB and use "project" as the input to _ref
then you'll
need this as opposed to get_ref since you'll get the ref for both projectA
and projectB.
fn get_refs(&self, owner: &str, repo: &str) -> Result<Vec<Ref>>
Request Type:
GET
Endpoint:
/repos/:owner/:repo/git/refs
Description
Returns a vector containing all Ref
Struct for the requested owner's repo and sha.
Implementors
impl GitData for Client