MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / get_org

Function get_org

atomic-teams/src/org.rs:51–59  ·  view source on GitHub ↗

Fetch an organization by slug. # Errors Returns [`TeamsError::OrgNotFound`](crate::error::TeamsError::OrgNotFound) if the slug does not match any organization visible to the caller.

(client: &StorageClient, slug: &str)

Source from the content-addressed store, hash-verified

49/// Returns [`TeamsError::OrgNotFound`](crate::error::TeamsError::OrgNotFound)
50/// if the slug does not match any organization visible to the caller.
51pub async fn get_org(client: &StorageClient, slug: &str) -> TeamsResult<OrgInfo> {
52 debug!("Fetching organization: slug={slug}");
53 let path = format!("/orgs/{slug}");
54 let info: OrgInfo = client
55 .get(&path)
56 .await
57 .map_err(|e| map_remote_error(e, format!("org {slug}")))?;
58 Ok(info)
59}
60
61/// Update an existing organization.
62///

Callers 3

executeMethod · 0.85
executeMethod · 0.85
verify_org_existsFunction · 0.85

Calls 2

map_remote_errorFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected