1use crate::low_level::apis::{configuration::Configuration, org_api, Error};
2use crate::models;
3
4use super::{ApiKeysClient, ReposClient};
5
6#[derive(Clone, Debug)]
8pub struct OrgClient<'a> {
9 pub(super) config: &'a Configuration,
10 pub(super) org: &'a str,
11}
12
13impl OrgClient<'_> {
14 pub async fn get(&self) -> Result<models::GetByOrg200Response, Error<org_api::GetByOrgError>> {
20 org_api::get_by_org(self.config, self.org).await
21 }
22
23 #[must_use]
25 pub fn repos(&self) -> ReposClient<'_> {
26 ReposClient { org: self }
27 }
28
29 #[must_use]
31 pub fn api_keys(&self) -> ApiKeysClient<'_> {
32 ApiKeysClient { org: self }
33 }
34}