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

Function list_my_orgs

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

List every organization the caller belongs to, with the caller's role. This hits the apex `GET /orgs` endpoint, so `client` must target the server apex (the bare host), not an org subdomain. Use `atomic_cli::commands::client::build_apex_client` to build such a client. # Errors Returns a `TeamsError` derived from the remote response on any failure (e.g. `TeamsError::PermissionDenied` if the call

(client: &StorageClient)

Source from the content-addressed store, hash-verified

71/// Returns a `TeamsError` derived from the remote response on any failure
72/// (e.g. `TeamsError::PermissionDenied` if the caller's token is rejected).
73pub async fn list_my_orgs(client: &StorageClient) -> TeamsResult<Vec<MyOrgInfo>> {
74 debug!("Listing organizations the caller belongs to");
75 let infos: Vec<MyOrgInfo> = client
76 .get("/orgs")
77 .await
78 .map_err(|e| map_remote_error(e, "list my orgs".to_string()))?;
79 Ok(infos)
80}
81
82/// Update an existing organization.
83///

Callers 1

executeMethod · 0.85

Calls 2

map_remote_errorFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected