@@ -11,21 +11,26 @@ def create(self, team_id, **kwargs):
1111 (optional) kwargs: additional request parameters.
1212
1313 Example::
14-
15- client.projects.create_project(
14+ client.projects.create(
1615 team_id="123",
1716 name="My Awesome Project",
1817 )
1918 """
2019 endpoint = '/teams/{}/projects' .format (team_id )
2120 return self .client ._api_call ('post' , endpoint , payload = kwargs )
2221
23- def get_project (self , project_id ):
22+ def get (self , project_id ):
2423 """
2524 Get an individual project
2625
2726 :Args:
28- project_id (string): the project's id
27+ project_id (string): The project's id
28+
29+ Example::
30+ client.project.get(
31+ project_id="123",
32+ )
33+
2934 """
3035 endpoint = '/projects/{}' .format (project_id )
3136 return self .client ._api_call ('get' , endpoint )
@@ -35,7 +40,13 @@ def get_collaborators(self, project_id, **kwargs):
3540 Get collaborators for a project
3641
3742 :Args:
38- project_id (string): the project's id
43+ project_id (uuid): The project's id
44+
45+ Example::
46+ client.projects.get_collaborators(
47+ project_id="123"
48+ )
49+
3950 """
4051 endpoint = "/projects/{}/collaborators?include=project_role" .format (project_id )
4152 return self .client ._api_call ('get' , endpoint , kwargs )
@@ -45,7 +56,48 @@ def get_pending_collaborators(self, project_id, **kwargs):
4556 Get pending collaborators for a project
4657
4758 :Args:
48- project_id (string): the project's id
59+ project_id (uuid): The project's id
60+
61+ Example::
62+ client.projects.get_pending_collaborators(
63+ project_id="123"
64+ )
65+
4966 """
5067 endpoint = "/projects/{}/pending_collaborators" .format (project_id )
5168 return self .client ._api_call ('get' , endpoint , kwargs )
69+
70+ def add_collaborator (self , project_id , email ):
71+ """
72+ Add Collaborator to a Project Collaborator.
73+
74+ :Args:
75+ project_id (uuid): The project id
76+ email (string): Email user's e-mail address
77+
78+ Example::
79+ client.projects.add_collaborator(
80+ project_id="123",
81+ email="",
82+ )
83+ """
84+ payload = {"email" : email }
85+ endpoint = '/projects/{}/collaborators' .format (project_id )
86+ return self ._api_call ('post' , endpoint , payload = payload )
87+
88+ def remove_collaborator (self , project_id , email ):
89+ """
90+ Remove Collaborator from Project.
91+
92+ :Args:
93+ project_id (uuid): The Project ID.
94+ email (string): The user's e-mail address
95+
96+ Example::
97+ client.projects.remove_collaborator(
98+ project_id="123",
99+ email="",
100+ )
101+ """
102+ endpoint = '/projects/{}/collaborators/_?email={}' .format (project_id , email )
103+ return self ._api_call ('delete' , endpoint )
0 commit comments