Skip to content

Lane section limits

LaneSectionLimits

Bases: GenericRequestMethod

Class responsible to make calls to Kanbanize lane section limits endpoints

Source code in kanbanize_sdk/endpoints/lane_section_limits.py
 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
class LaneSectionLimits(GenericRequestMethod):
    """
    Class responsible to make calls to Kanbanize lane section limits endpoints
    """
    endpoint = '/boards'

    get = private

    delete = private

    insert = private

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

        Parameters:
            board_id: An integer parameter that represents the selected board object.

        Returns:
            An array with multiples lane section limit objects

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

    def update(self, board_id: int, body: LaneSectionLimitsUpdateBody | dict, *args, **kwargs) -> dict:
        """
        This method is responsible to update one lane section limit from the board into the platform.

        Parameters:
            board_id: An integer that represents the selected board object.
            body: It's a dataclass object that provide all needed request body to update a cell limit object.

        Returns:
             An lane section limit object with the basic information data.

        """

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

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

list(board_id, *args, **kwargs)

This method is responsible to list all lane section limits from the board into the platform.

Parameters:

Name Type Description Default
board_id int

An integer parameter that represents the selected board object.

required

Returns:

Type Description
list

An array with multiples lane section limit objects

Source code in kanbanize_sdk/endpoints/lane_section_limits.py
19
20
21
22
23
24
25
26
27
28
29
30
def list(self, board_id: int, *args, **kwargs) -> list:
    """
    This method is responsible to list all lane section limits from the board into the platform.

    Parameters:
        board_id: An integer parameter that represents the selected board object.

    Returns:
        An array with multiples lane section limit objects

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

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

This method is responsible to update one lane section limit from the board into the platform.

Parameters:

Name Type Description Default
board_id int

An integer that represents the selected board object.

required
body LaneSectionLimitsUpdateBody | dict

It's a dataclass object that provide all needed request body to update a cell limit object.

required

Returns:

Type Description
dict

An lane section limit object with the basic information data.

Source code in kanbanize_sdk/endpoints/lane_section_limits.py
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
def update(self, board_id: int, body: LaneSectionLimitsUpdateBody | dict, *args, **kwargs) -> dict:
    """
    This method is responsible to update one lane section limit from the board into the platform.

    Parameters:
        board_id: An integer that represents the selected board object.
        body: It's a dataclass object that provide all needed request body to update a cell limit object.

    Returns:
         An lane section limit object with the basic information data.

    """

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

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