Fix JSON API Documentation for getAllTasks() parameters.

Documentation told us to use parameter "status", but it actually has to be "status_id".
This adds corrections to kanboard.py, too. It adds missing getTimezone() to kanboard.py, too.
This commit is contained in:
Oliver Bertuch
2015-01-26 11:49:38 +01:00
parent 62f5eeca68
commit c0e5a469b6
2 changed files with 17 additions and 4 deletions

View File

@@ -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
}
}