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

Function add_member

atomic-teams/src/member.rs:38–50  ·  view source on GitHub ↗

Add a member to an organization. # Arguments `client` — Authenticated storage client. `org_slug` — URL-safe slug of the organization. `identity_id` — Identity to add. `role` — Role to assign to the new member.

(
    client: &StorageClient,
    org_slug: &str,
    identity_id: Uuid,
    role: OrgRole,
)

Source from the content-addressed store, hash-verified

36/// * `identity_id` — Identity to add.
37/// * `role` — Role to assign to the new member.
38pub async fn add_member(
39 client: &StorageClient,
40 org_slug: &str,
41 identity_id: Uuid,
42 role: OrgRole,
43) -> TeamsResult<OrgMemberInfo> {
44 let path = format!("/orgs/{org_slug}/members");
45 let body = AddMemberRequest { identity_id, role };
46 client
47 .post(&path, &body)
48 .await
49 .map_err(|e| map_remote_error(e, format!("org {org_slug}")))
50}
51
52/// Get details for a single organization member.
53///

Callers 1

executeMethod · 0.85

Calls 2

map_remote_errorFunction · 0.85
postMethod · 0.80

Tested by

no test coverage detected