pub struct GitHubCliProvider { /* private fields */ }Implementations§
Source§impl GitHubCliProvider
impl GitHubCliProvider
pub fn new() -> Result<Self>
pub fn with_config(config: GitHubCliConfig) -> Result<Self>
Sourcepub async fn get_username(&self) -> Result<String>
pub async fn get_username(&self) -> Result<String>
Get the currently authenticated GitHub username
Sourcepub async fn get_user_organizations(&self) -> Result<Vec<String>>
pub async fn get_user_organizations(&self) -> Result<Vec<String>>
Get the organizations the authenticated user belongs to
Sourcepub async fn repository_exists(
&self,
owner: &str,
repo_name: &str,
) -> Result<bool>
pub async fn repository_exists( &self, owner: &str, repo_name: &str, ) -> Result<bool>
Check if a repository exists for the given owner and name
Sourcepub async fn get_user_repositories(
&self,
username: &str,
) -> Result<Vec<Repository>>
pub async fn get_user_repositories( &self, username: &str, ) -> Result<Vec<Repository>>
Get all repositories for a specific user
Sourcepub async fn get_organization_repositories(
&self,
org: &str,
) -> Result<Vec<Repository>>
pub async fn get_organization_repositories( &self, org: &str, ) -> Result<Vec<Repository>>
Get all repositories for an organization
Sourcepub async fn user_or_org_exists(&self, target: &str) -> Result<bool>
pub async fn user_or_org_exists(&self, target: &str) -> Result<bool>
Check if a target exists as either a user or organization
Sourcepub async fn get_target_type(&self, target: &str) -> Result<TargetType>
pub async fn get_target_type(&self, target: &str) -> Result<TargetType>
Get the target type (user or organization)
Sourcepub async fn count_repositories(&self, target: &str) -> Result<usize>
pub async fn count_repositories(&self, target: &str) -> Result<usize>
Count repositories for a user or organization (quick check)
Trait Implementations§
Source§impl SearchProvider for GitHubCliProvider
impl SearchProvider for GitHubCliProvider
fn search<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 SearchQuery,
) -> Pin<Box<dyn Future<Output = Result<Vec<Repository>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_repository<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Repository>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn name(&self) -> &str
Auto Trait Implementations§
impl Freeze for GitHubCliProvider
impl RefUnwindSafe for GitHubCliProvider
impl Send for GitHubCliProvider
impl Sync for GitHubCliProvider
impl Unpin for GitHubCliProvider
impl UnsafeUnpin for GitHubCliProvider
impl UnwindSafe for GitHubCliProvider
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more