kanboard / python-api-client

Python API Client for Kanboard
https://pypi.org/project/kanboard
MIT License
81 stars 26 forks source link

Howto read all available columns ? #7

Closed gkehrer closed 5 years ago

gkehrer commented 6 years ago

Hi, when requesting all available columns I get an error:

{'params': {}, 'jsonrpc': '2.0', 'id': 1, 'method': 'getColumns'}

Traceback (most recent call last): File "./get_systems.py", line 27, in column_id = kb.get_columns(params) File "/usr/local/lib/python2.7/dist-packages/kanboard/client.py", line 72, in function return self.execute(method=self._to_camel_case(name), **kwargs) File "/usr/local/lib/python2.7/dist-packages/kanboard/client.py", line 138, in execute return self._do_request(headers, payload) File "/usr/local/lib/python2.7/dist-packages/kanboard/client.py", line 105, in _do_request return self._parse_response(response) File "/usr/local/lib/python2.7/dist-packages/kanboard/client.py", line 87, in _parse_response raise exceptions.KanboardClientException(message) kanboard.exceptions.KanboardClientException: Invalid params

The request should look like this: { "jsonrpc": "2.0", "method": "getColumns", "id": 887036325, "params": [ 1 ] }

The used call is: column_ids = kb.get_columns(1)

wiltonsr commented 5 years ago

Try change your command to column_ids = kb.get_columns(project_id=1) and post the result.

gkehrer commented 5 years ago

The call with the project_id keywords works - Thx