pub struct MesaClient<C: HttpClient> { /* private fields */ }Expand description
The Mesa API client, generic over an HTTP backend C.
This is the main entry point for the SDK. Use the resource accessor methods
(repos, branches, etc.) to interact
with different parts of the API.
Cloning is cheap — the inner state is shared via Arc.
§Type aliases
When using the default reqwest-client feature, Mesa is a type alias
for MesaClient<ReqwestClient> with a convenient Mesa::new constructor.
Implementations§
Source§impl<C: HttpClient> MesaClient<C>
impl<C: HttpClient> MesaClient<C>
Sourcepub fn builder(api_key: impl Into<String>) -> ClientBuilder
pub fn builder(api_key: impl Into<String>) -> ClientBuilder
Create a new builder for configuring a client.
Sourcepub fn repos(&self, org: &str) -> ReposResource<'_, C>
pub fn repos(&self, org: &str) -> ReposResource<'_, C>
Access repository operations for the given organization.
Sourcepub fn branches(&self, org: &str, repo: &str) -> BranchesResource<'_, C>
pub fn branches(&self, org: &str, repo: &str) -> BranchesResource<'_, C>
Access branch operations for the given repository.
Sourcepub fn commits(&self, org: &str, repo: &str) -> CommitsResource<'_, C>
pub fn commits(&self, org: &str, repo: &str) -> CommitsResource<'_, C>
Access commit operations for the given repository.
Sourcepub fn content(&self, org: &str, repo: &str) -> ContentResource<'_, C>
pub fn content(&self, org: &str, repo: &str) -> ContentResource<'_, C>
Access content operations for the given repository.
Sourcepub fn diffs(&self, org: &str, repo: &str) -> DiffsResource<'_, C>
pub fn diffs(&self, org: &str, repo: &str) -> DiffsResource<'_, C>
Access diff operations for the given repository.
Sourcepub fn admin(&self, org: &str) -> AdminResource<'_, C>
pub fn admin(&self, org: &str) -> AdminResource<'_, C>
Access admin operations (API keys) for the given organization.
Trait Implementations§
Source§impl<C: Clone + HttpClient> Clone for MesaClient<C>
impl<C: Clone + HttpClient> Clone for MesaClient<C>
Source§fn clone(&self) -> MesaClient<C>
fn clone(&self) -> MesaClient<C>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more