Skip to content

Workspace managers

WorkspaceManagers

Bases: Workspaces

Class responsible to make calls to Kanbanize Workspace managers endpoints

Source code in kanbanize_sdk/endpoints/workspace_managers.py
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
class WorkspaceManagers(Workspaces):
    """
    Class responsible to make calls to Kanbanize Workspace managers endpoints
    """

    # post= private

    def list(self, workspace_id: int) -> list:
        """
        This method is responsible for listing all workspace managers.

        Parameters:
            workspace_id:  An integer parameter that represents the workspace identification.

        Returns:
            An array of objects that represents the workspace managers
        """
        return self.service.get(self.endpoint + f'/{workspace_id}/managers')

    def delete(self, workspace_id: int, user_id: int) -> None:
        """
        This method is responsible to remove a workspace manager.

        Parameters:
            workspace_id: An integer parameter that represents the workspace identification.
            user_id: An integer parameter that represents the manager identification that will be delete.

        """
        self.service.delete(self.endpoint + f'/{workspace_id}/managers/{user_id}')

    def get(self, workspace_id: int, user_id: int) -> None:
        """
        This method is responsible to get one workspace manager.

        Parameters:
            workspace_id: An integer parameter that represents the workspace identification.
            user_id: An integer parameter that represents the manager identification.
        """
        self.service.get(self.endpoint + f'/{workspace_id}/managers/{user_id}')

    def update(self, workspace_id: int, user_id: int) -> None:
        """
        This method is responsible to update an workspace manager.

        Parameters:
            workspace_id: An integer parameter that represents the workspace identification.
            user_id: An integer parameter that represents the new manager identification.
        """
        self.service.put(self.endpoint + f'/{workspace_id}/managers/{user_id}')

delete(workspace_id, user_id)

This method is responsible to remove a workspace manager.

Parameters:

Name Type Description Default
workspace_id int

An integer parameter that represents the workspace identification.

required
user_id int

An integer parameter that represents the manager identification that will be delete.

required
Source code in kanbanize_sdk/endpoints/workspace_managers.py
23
24
25
26
27
28
29
30
31
32
def delete(self, workspace_id: int, user_id: int) -> None:
    """
    This method is responsible to remove a workspace manager.

    Parameters:
        workspace_id: An integer parameter that represents the workspace identification.
        user_id: An integer parameter that represents the manager identification that will be delete.

    """
    self.service.delete(self.endpoint + f'/{workspace_id}/managers/{user_id}')

get(workspace_id, user_id)

This method is responsible to get one workspace manager.

Parameters:

Name Type Description Default
workspace_id int

An integer parameter that represents the workspace identification.

required
user_id int

An integer parameter that represents the manager identification.

required
Source code in kanbanize_sdk/endpoints/workspace_managers.py
34
35
36
37
38
39
40
41
42
def get(self, workspace_id: int, user_id: int) -> None:
    """
    This method is responsible to get one workspace manager.

    Parameters:
        workspace_id: An integer parameter that represents the workspace identification.
        user_id: An integer parameter that represents the manager identification.
    """
    self.service.get(self.endpoint + f'/{workspace_id}/managers/{user_id}')

list(workspace_id)

This method is responsible for listing all workspace managers.

Parameters:

Name Type Description Default
workspace_id int

An integer parameter that represents the workspace identification.

required

Returns:

Type Description
list

An array of objects that represents the workspace managers

Source code in kanbanize_sdk/endpoints/workspace_managers.py
11
12
13
14
15
16
17
18
19
20
21
def list(self, workspace_id: int) -> list:
    """
    This method is responsible for listing all workspace managers.

    Parameters:
        workspace_id:  An integer parameter that represents the workspace identification.

    Returns:
        An array of objects that represents the workspace managers
    """
    return self.service.get(self.endpoint + f'/{workspace_id}/managers')

update(workspace_id, user_id)

This method is responsible to update an workspace manager.

Parameters:

Name Type Description Default
workspace_id int

An integer parameter that represents the workspace identification.

required
user_id int

An integer parameter that represents the new manager identification.

required
Source code in kanbanize_sdk/endpoints/workspace_managers.py
44
45
46
47
48
49
50
51
52
def update(self, workspace_id: int, user_id: int) -> None:
    """
    This method is responsible to update an workspace manager.

    Parameters:
        workspace_id: An integer parameter that represents the workspace identification.
        user_id: An integer parameter that represents the new manager identification.
    """
    self.service.put(self.endpoint + f'/{workspace_id}/managers/{user_id}')