fix incorrect user parameter name for createSubtask, updateSubtask in json-RPC API

Changing the documentation and python example to match what the server code says: "user_id", not "assignee_id".
This commit is contained in:
norcnorc
2015-01-27 18:10:06 +01:00
parent e6f7929f77
commit 081b76c21f
2 changed files with 8 additions and 8 deletions

View File

@@ -1879,7 +1879,7 @@ Response example:
- Parameters: - Parameters:
- **task_id** (integer, required) - **task_id** (integer, required)
- **title** (integer, required) - **title** (integer, required)
- **assignee_id** (int, optional) - **user_id** (int, optional)
- **time_estimated** (int, optional) - **time_estimated** (int, optional)
- **time_spent** (int, optional) - **time_spent** (int, optional)
- **status** (int, optional) - **status** (int, optional)
@@ -1996,7 +1996,7 @@ Response example:
- **id** (integer, required) - **id** (integer, required)
- **task_id** (integer, required) - **task_id** (integer, required)
- **title** (integer, optional) - **title** (integer, optional)
- **assignee_id** (integer, optional) - **user_id** (integer, optional)
- **time_estimated** (integer, optional) - **time_estimated** (integer, optional)
- **time_spent** (integer, optional) - **time_spent** (integer, optional)
- **status** (integer, optional) - **status** (integer, optional)

View File

@@ -975,7 +975,7 @@ class Kanboard():
return response.json()['result'] return response.json()['result']
def createSubtask(self, task_id, title, assignee_id=None, time_estimated=None, time_spent=None, status=None): def createSubtask(self, task_id, title, user_id=None, time_estimated=None, time_spent=None, status=None):
kid = self._getId() kid = self._getId()
params = { params = {
"jsonrpc": "2.0", "jsonrpc": "2.0",
@@ -988,8 +988,8 @@ class Kanboard():
} }
#optional parameters #optional parameters
if assignee_id is not None: if user_id is not None:
params['params']["assignee_id"] = assignee_id params['params']["user_id"] = user_id
if time_estimated is not None: if time_estimated is not None:
params['params']["time_estimated"] = time_estimated params['params']["time_estimated"] = time_estimated
if time_spent is not None: if time_spent is not None:
@@ -1040,7 +1040,7 @@ class Kanboard():
return response.json()['result'] return response.json()['result']
def updateSubtask(self, subtask_id, task_id, title=None, assignee_id=None, time_estimated=None, time_spent=None, status=None): def updateSubtask(self, subtask_id, task_id, title=None, user_id=None, time_estimated=None, time_spent=None, status=None):
kid = self._getId() kid = self._getId()
params = { params = {
"jsonrpc": "2.0", "jsonrpc": "2.0",
@@ -1055,8 +1055,8 @@ class Kanboard():
#optional parameters #optional parameters
if title is not None: if title is not None:
params['params']["title"] = title params['params']["title"] = title
if assignee_id is not None: if user_id is not None:
params['params']["assignee_id"] = assignee_id params['params']["user_id"] = user_id
if time_estimated is not None: if time_estimated is not None:
params['params']["time_estimated"] = time_estimated params['params']["time_estimated"] = time_estimated
if time_spent is not None: if time_spent is not None: