Skip to content

Board card types

BoardCardTypes

Bases: GenericRequestMethod

Class responsible to make calls to Kanbanize board card types endpoints

Source code in kanbanize_sdk/endpoints/board_card_types.py
 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
class BoardCardTypes(GenericRequestMethod):
    """
    Class responsible to make calls to Kanbanize board card types endpoints
    """

    endpoint = '/boards'

    def list(self, board_id: int, *args, **kwargs) -> list:
        """
        This method is responsible to list all board card types from the board into the platform.

        Parameters:
            board_id: An integer parameter that represents the board assignee

        Returns:
            An array of objects that represents the board card types

        """
        return self.service.get(self.endpoint + f'/{board_id}/cardTypes')

    def get(self, board_id: int, type_id: int, *args, **kwargs) -> dict:
        """
        This method is responsible to get a board card types from the board into the platform.

        Parameters:
            board_id: An integer parameter that represents the board identification.
            type_id: An integer parameter that represents the user identification.

        Returns:
            A board card type object with the basic information data.
        """
        return self.service.get(self.endpoint + f'/{board_id}/cardTypes/{type_id}')

    def get_effective_settings(self, board_id: int, type_id: int, *args, **kwargs) -> dict:
        """
        This method is responsible to get a board card type settings from the board into the platform.

        Parameters:
            board_id: An integer parameter that represents the board identification.
            type_id: An integer parameter that represents the user identification.

        Returns:
            A board card type settings object with the basic information data.
        """
        return self.service.get(self.endpoint + f'/{board_id}/cardTypes/{type_id}/effectiveSettings')

    def insert(self, board_id: int, type_id: int, body: BoardCardTypesInsertBody | dict, *args, **kwargs) -> dict:

        """
        This method is responsible to get a board card types from the board into the platform.

        Parameters:
            board_id: An integer parameter that represents the board identification.
            type_id: An integer parameter that represents the user identification.
            body: It's a dataclass object that provide the essential request body needed to update a board card types to the
                board into the platform.

        Returns:
              An object that represents the board card type.

        """

        payload = body.to_dict() if isinstance(body, BoardCardTypesInsertBody) else body

        return self.service.put(self.endpoint + f'/{board_id}/cardTypes/{type_id}', data=payload)

    def update(self, board_id: int, type_id: int, body: BoardCardTypesUpdateBody | dict, *args, **kwargs) -> dict:

        """
        This method is responsible to get a board card types from the board into the platform.

        Parameters:
            board_id: An integer parameter that represents the board identification.
            type_id: An integer parameter that represents the user identification.
            body: It's a dataclass object that provide the essential request body needed to update a board card types to the
                board into the platform.
        """

        payload = body.to_dict() if isinstance(body, BoardCardTypesUpdateBody) else body

        return self.service.patch(self.endpoint + f'/{board_id}/cardTypes/{type_id}', data=payload)

    def delete(self, board_id: int, type_id: int, *args, **kwargs) -> None:

        """
        This method is responsible to get a board card types from the board into the platform.

        Parameters:
            board_id: An integer parameter that represents the board identification.
            type_id: An integer parameter that represents the user identification.
        """
        return self.service.delete(self.endpoint + f'/{board_id}/cardTypes/{type_id}')

delete(board_id, type_id, *args, **kwargs)

This method is responsible to get a board card types from the board into the platform.

Parameters:

Name Type Description Default
board_id int

An integer parameter that represents the board identification.

required
type_id int

An integer parameter that represents the user identification.

required
Source code in kanbanize_sdk/endpoints/board_card_types.py
87
88
89
90
91
92
93
94
95
96
def delete(self, board_id: int, type_id: int, *args, **kwargs) -> None:

    """
    This method is responsible to get a board card types from the board into the platform.

    Parameters:
        board_id: An integer parameter that represents the board identification.
        type_id: An integer parameter that represents the user identification.
    """
    return self.service.delete(self.endpoint + f'/{board_id}/cardTypes/{type_id}')

get(board_id, type_id, *args, **kwargs)

This method is responsible to get a board card types from the board into the platform.

Parameters:

Name Type Description Default
board_id int

An integer parameter that represents the board identification.

required
type_id int

An integer parameter that represents the user identification.

required

Returns:

Type Description
dict

A board card type object with the basic information data.

Source code in kanbanize_sdk/endpoints/board_card_types.py
25
26
27
28
29
30
31
32
33
34
35
36
def get(self, board_id: int, type_id: int, *args, **kwargs) -> dict:
    """
    This method is responsible to get a board card types from the board into the platform.

    Parameters:
        board_id: An integer parameter that represents the board identification.
        type_id: An integer parameter that represents the user identification.

    Returns:
        A board card type object with the basic information data.
    """
    return self.service.get(self.endpoint + f'/{board_id}/cardTypes/{type_id}')

get_effective_settings(board_id, type_id, *args, **kwargs)

This method is responsible to get a board card type settings from the board into the platform.

Parameters:

Name Type Description Default
board_id int

An integer parameter that represents the board identification.

required
type_id int

An integer parameter that represents the user identification.

required

Returns:

Type Description
dict

A board card type settings object with the basic information data.

Source code in kanbanize_sdk/endpoints/board_card_types.py
38
39
40
41
42
43
44
45
46
47
48
49
def get_effective_settings(self, board_id: int, type_id: int, *args, **kwargs) -> dict:
    """
    This method is responsible to get a board card type settings from the board into the platform.

    Parameters:
        board_id: An integer parameter that represents the board identification.
        type_id: An integer parameter that represents the user identification.

    Returns:
        A board card type settings object with the basic information data.
    """
    return self.service.get(self.endpoint + f'/{board_id}/cardTypes/{type_id}/effectiveSettings')

insert(board_id, type_id, body, *args, **kwargs)

This method is responsible to get a board card types from the board into the platform.

Parameters:

Name Type Description Default
board_id int

An integer parameter that represents the board identification.

required
type_id int

An integer parameter that represents the user identification.

required
body BoardCardTypesInsertBody | dict

It's a dataclass object that provide the essential request body needed to update a board card types to the board into the platform.

required

Returns:

Type Description
dict

An object that represents the board card type.

Source code in kanbanize_sdk/endpoints/board_card_types.py
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
def insert(self, board_id: int, type_id: int, body: BoardCardTypesInsertBody | dict, *args, **kwargs) -> dict:

    """
    This method is responsible to get a board card types from the board into the platform.

    Parameters:
        board_id: An integer parameter that represents the board identification.
        type_id: An integer parameter that represents the user identification.
        body: It's a dataclass object that provide the essential request body needed to update a board card types to the
            board into the platform.

    Returns:
          An object that represents the board card type.

    """

    payload = body.to_dict() if isinstance(body, BoardCardTypesInsertBody) else body

    return self.service.put(self.endpoint + f'/{board_id}/cardTypes/{type_id}', data=payload)

list(board_id, *args, **kwargs)

This method is responsible to list all board card types from the board into the platform.

Parameters:

Name Type Description Default
board_id int

An integer parameter that represents the board assignee

required

Returns:

Type Description
list

An array of objects that represents the board card types

Source code in kanbanize_sdk/endpoints/board_card_types.py
12
13
14
15
16
17
18
19
20
21
22
23
def list(self, board_id: int, *args, **kwargs) -> list:
    """
    This method is responsible to list all board card types from the board into the platform.

    Parameters:
        board_id: An integer parameter that represents the board assignee

    Returns:
        An array of objects that represents the board card types

    """
    return self.service.get(self.endpoint + f'/{board_id}/cardTypes')

update(board_id, type_id, body, *args, **kwargs)

This method is responsible to get a board card types from the board into the platform.

Parameters:

Name Type Description Default
board_id int

An integer parameter that represents the board identification.

required
type_id int

An integer parameter that represents the user identification.

required
body BoardCardTypesUpdateBody | dict

It's a dataclass object that provide the essential request body needed to update a board card types to the board into the platform.

required
Source code in kanbanize_sdk/endpoints/board_card_types.py
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
def update(self, board_id: int, type_id: int, body: BoardCardTypesUpdateBody | dict, *args, **kwargs) -> dict:

    """
    This method is responsible to get a board card types from the board into the platform.

    Parameters:
        board_id: An integer parameter that represents the board identification.
        type_id: An integer parameter that represents the user identification.
        body: It's a dataclass object that provide the essential request body needed to update a board card types to the
            board into the platform.
    """

    payload = body.to_dict() if isinstance(body, BoardCardTypesUpdateBody) else body

    return self.service.patch(self.endpoint + f'/{board_id}/cardTypes/{type_id}', data=payload)