Merge pull request #551 from poikilotherm/fix/master/json_api_getAllTasks
Fix JSON API Documentation for getAllTasks() parameters.
This commit is contained in:
commit
cdcc6843fd
|
|
@ -1052,7 +1052,7 @@ Response example:
|
|||
- Purpose: **Get all available tasks**
|
||||
- Parameters:
|
||||
- **project_id** (integer, required)
|
||||
- **status**: The value 1 for active tasks and 0 for inactive (integer, required)
|
||||
- **status_id**: The value 1 for active tasks and 0 for inactive (integer, required)
|
||||
- Result on success: **List of tasks**
|
||||
- Result on failure: **false**
|
||||
|
||||
|
|
@ -1065,7 +1065,7 @@ Request example to fetch all tasks on the board:
|
|||
"id": 133280317,
|
||||
"params": {
|
||||
"project_id": 1,
|
||||
"status": 1
|
||||
"status_id": 1
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
|||
|
|
@ -92,6 +92,19 @@ class Kanboard():
|
|||
def _getId(self):
|
||||
self._id += 1
|
||||
return self._id
|
||||
|
||||
def getTimezone(self):
|
||||
kid = self._getId()
|
||||
params = {
|
||||
"jsonrpc": "2.0",
|
||||
"method": "getTimezone",
|
||||
"id" : kid,
|
||||
}
|
||||
|
||||
response = requests.post(self.url, data=json.dumps(params), headers=self.headers, auth=(self.username, self.token))
|
||||
assert response.ok
|
||||
assert response.json()['id'] == kid
|
||||
return response.json()['result']
|
||||
|
||||
def createProject(self, name):
|
||||
kid = self._getId()
|
||||
|
|
@ -546,7 +559,7 @@ class Kanboard():
|
|||
|
||||
return response.json()['result']
|
||||
|
||||
def getAllTasks(self, project_id, status):
|
||||
def getAllTasks(self, project_id, status_id):
|
||||
kid = self._getId()
|
||||
params = {
|
||||
"jsonrpc": "2.0",
|
||||
|
|
@ -554,7 +567,7 @@ class Kanboard():
|
|||
"id" : kid,
|
||||
"params": {
|
||||
"project_id": project_id,
|
||||
"status": status
|
||||
"status_id": status_id
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue