summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2015-01-26 20:43:30 -0500
committerFrédéric Guillot <fred@kanboard.net>2015-01-26 20:43:30 -0500
commitcdcc6843fd169574855f62471183dba07a903fce (patch)
tree895c604535cdf2975aff37f39ddbb1e43b81d4b9 /scripts
parent62f5eeca68f8fc7ca530fe999700a9335cf1707b (diff)
parentc0e5a469b61c3fef2560550ba9a820a9aac31857 (diff)
Merge pull request #551 from poikilotherm/fix/master/json_api_getAllTasks
Fix JSON API Documentation for getAllTasks() parameters.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kanboard.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/scripts/kanboard.py b/scripts/kanboard.py
index 604448fa..65b51dc9 100644
--- a/scripts/kanboard.py
+++ b/scripts/kanboard.py
@@ -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
}
}