Organization
The team workspaces of the NoClick app you're in, as its workspace settings show them.
acme = noclick.Organization.create("Acme Ops")
noclick.Organization.invite(acme, "sam@example.com", role="admin")
for member in noclick.Organization.members(acme):
print(member["email"], member["role"])A team workspace's members are people, so every call is a signed-in person's own: a client holding a person's
session token (never a key, which refuses them all). Not noclick.Workspace, which is one of Work's spaces.
Members, invites and single sign-on come back as the API answers them (dicts).
class OrganizationA team workspace you're in.
| id | str | |
| name | str | |
| slug | str | |
| role | str | None | Your role in it: |
| icon_url | str | None | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
liststaticasync
noclick.Organization.list(*, client=None) -> list[Organization]The team workspaces you're in, each with your role.
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)Each team workspace you're in, as an Organization.
for workspace in noclick.Organization.list():
print(workspace.name, workspace.role)getstaticasync
noclick.Organization.get(organization, *, client=None) -> OrganizationOne you're in, by id.
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)print(noclick.Organization.get("8c1f…").name)createstaticasync
noclick.Organization.create(name, *, slug=None, client=None) -> OrganizationMake a team workspace with you as its owner (slug made from the name when left out); your session acts
in it from then on. How many you may own is your plan's.
NoneThe client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)The new Organization.
acme = noclick.Organization.create("Acme Ops")updatestaticasync
noclick.Organization.update(
organization, *, name=None, settings=None, client=None
) -> dict[str, Any]Rename it or change its settings (its owner or an admin).
NoneNoneThe client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)The team workspace as it now stands.
noclick.Organization.update(acme, name="Acme Operations")deletestaticasync
noclick.Organization.delete(organization, *, client=None) -> NoneDelete it for good, its members and invites with it (its owner only).
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)noclick.Organization.delete(acme)slug_availablestaticasync
noclick.Organization.slug_available(slug, *, client=None) -> boolWhether a new team workspace could take slug.
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)True when no team workspace has it.
print(noclick.Organization.slug_available("acme-ops"))membersstaticasync
noclick.Organization.members(organization, *, client=None) -> list[dict[str, Any]]Its members, each with their user_id, email and role.
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)Each member, with their user_id, email, full_name and role.
print([m["email"] for m in noclick.Organization.members(acme)])invitestaticasync
noclick.Organization.invite(
organization, email, *, role='member', client=None
) -> dict[str, Any]Invite someone by email (its owner or an admin): they're emailed a link that joins them as role
(admin or member). How many people it holds is its plan's.
'member'The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)The invite, with email_sent: False when its email couldn't go (email_error says why), and the
invite stands all the same, so share its link yourself.
noclick.Organization.invite(acme, "sam@example.com", role="admin")set_rolestaticasync
noclick.Organization.set_role(organization, user_id, role, *, client=None) -> NoneChange a member's role (its owner or an admin; never the owner's).
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)noclick.Organization.set_role(acme, "6a0b…", "admin")remove_memberstaticasync
noclick.Organization.remove_member(organization, user_id, *, client=None) -> NoneTake a member out (its owner or an admin; never the owner).
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)noclick.Organization.remove_member(acme, "6a0b…")transferstaticasync
noclick.Organization.transfer(organization, user_id, *, client=None) -> NoneHand it to another of its members (its owner only): they become its owner, you an admin.
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)noclick.Organization.transfer(acme, "6a0b…")invitesstaticasync
noclick.Organization.invites(organization, *, client=None) -> list[dict[str, Any]]Its invites still waiting to be accepted.
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)Each invite still waiting, with its email, role and when it expires.
print([i["email"] for i in noclick.Organization.invites(acme)])revoke_invitestaticasync
noclick.Organization.revoke_invite(organization, invite_id, *, client=None) -> NoneCall an invite off: its link stops working.
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)noclick.Organization.revoke_invite(acme, "c3d4…")accept_invitestaticasync
noclick.Organization.accept_invite(token, *, client=None) -> dict[str, Any]Join the team workspace an invite to your email asks you to.
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)The organization_id and organization_name of the team workspace you joined.
noclick.Organization.accept_invite(token)switch_tostaticasync
noclick.Organization.switch_to(organization, *, client=None) -> NoneMake the workspace your session acts in a team one you're in, or your own (None).
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)noclick.Organization.switch_to(None)