add_members_to_project

imerit_ango.sdk.SDK.

add_members_to_project(project_id, members, role)

Assigns specified users to a project with a designated role.

Parameters

  • project_id: string

  • members: List[str]

    • A list of emails of the user(s) you wish to add to the project.

    • Example: ["user1@test.com", "user2@test.com"]

  • role: imerit_ango.models.enums.ProjectRoles

    • The role in which you would like to add the user(s) to the project. Possible roles include:

      • ProjectRoles.Manager

      • ProjectRoles.Labeler

      • ProjectRoles.Reviewer

      • ProjectRoles.Lead

    • Note: You must import the enum containing the roles using

      from imerit_ango.models.enums import ProjectRoles

Returns:

  • output: dict

Example

import os
from dotenv import load_dotenv
from imerit_ango.sdk import SDK
from imerit_ango.models.enums import ProjectRoles

load_dotenv('variables.env')
api_key = os.getenv('API_KEY')
project_id = os.getenv('PROJECT_ID')

ango_sdk = SDK(api_key)

ango_sdk.add_members_to_project(project_id=project_id,
                                members=["user1@example.com", "user2@example.com"],
                                role=ProjectRoles.Labeler)

Last updated