Skip to content

Board settings

BoardSettings

Bases: Boards

Class responsible to make calls to Kanbanize board settings endpoints

Source code in kanbanize_sdk/endpoints/board_settings.py
 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
class BoardSettings(Boards):
    """
    Class responsible to make calls to Kanbanize board settings endpoints
    """

    list = private

    insert = private

    delete = private

    def get(self, board_id: int) -> dict:
        """
        This method is responsible to get one board settings from the platform.

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

        Returns:
            A searched board object
        """
        return self.service.get(self.endpoint + f'/{board_id}/settings')

    def update(self, board_id: int, body: BoardSettingsUpdateBody | dict) -> dict:
        """
        This method is responsible to update one board settings in the platform.

        Parameters:
            board_id: An integer parameter that represents the board identification.
            body: It's a dataclass object that represent the body option to be updated.

        Returns:
            The updated board object
        """

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

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

get(board_id)

This method is responsible to get one board settings from the platform.

Parameters:

Name Type Description Default
board_id int

An integer parameter that represents the board identification.

required

Returns:

Type Description
dict

A searched board object

Source code in kanbanize_sdk/endpoints/board_settings.py
17
18
19
20
21
22
23
24
25
26
27
def get(self, board_id: int) -> dict:
    """
    This method is responsible to get one board settings from the platform.

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

    Returns:
        A searched board object
    """
    return self.service.get(self.endpoint + f'/{board_id}/settings')

update(board_id, body)

This method is responsible to update one board settings in the platform.

Parameters:

Name Type Description Default
board_id int

An integer parameter that represents the board identification.

required
body BoardSettingsUpdateBody | dict

It's a dataclass object that represent the body option to be updated.

required

Returns:

Type Description
dict

The updated board object

Source code in kanbanize_sdk/endpoints/board_settings.py
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
def update(self, board_id: int, body: BoardSettingsUpdateBody | dict) -> dict:
    """
    This method is responsible to update one board settings in the platform.

    Parameters:
        board_id: An integer parameter that represents the board identification.
        body: It's a dataclass object that represent the body option to be updated.

    Returns:
        The updated board object
    """

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

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