diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/api-json-rpc.markdown | 54 | ||||
| -rw-r--r-- | docs/automatic-actions.markdown | 8 | ||||
| -rw-r--r-- | docs/editing-projects.markdown | 8 |
3 files changed, 69 insertions, 1 deletions
diff --git a/docs/api-json-rpc.markdown b/docs/api-json-rpc.markdown index 37b90530..23cc3518 100644 --- a/docs/api-json-rpc.markdown +++ b/docs/api-json-rpc.markdown @@ -56,6 +56,60 @@ Response from the server: } ``` +### Example with Python + +Here a basic example written in Python to create a task: + +```python +#!/usr/bin/env python + +import requests +import json + +def main(): + url = "http://demo.kanboard.net/jsonrpc.php" + api_key = "be4271664ca8169d32af49d8e1ec854edb0290bc3588a2e356275eab9505" + headers = {"content-type": "application/json"} + + payload = { + "method": "createTask", + "params": { + "title": "Python API test", + "project_id": 1 + }, + "jsonrpc": "2.0", + "id": 1, + } + + response = requests.post( + url, + data=json.dumps(payload), + headers=headers, + auth=("jsonrpc", api_key) + ) + + if response.status_code == 401: + print "Authentication failed" + else: + result = response.json() + + assert result["result"] == True + assert result["jsonrpc"] + assert result["id"] == 1 + + print "Task created successfully!" + +if __name__ == "__main__": + main() +``` + +Run this script from your terminal: + +```bash +python jsonrpc.py +Task created successfully! +``` + ### Example with a PHP client: I wrote a simple [Json-RPC Client/Server library in PHP](https://github.com/fguillot/JsonRPC), here an example: diff --git a/docs/automatic-actions.markdown b/docs/automatic-actions.markdown index c1dc3e10..631919ea 100644 --- a/docs/automatic-actions.markdown +++ b/docs/automatic-actions.markdown @@ -7,14 +7,20 @@ Each automatic action is defined like that: - An event to listen - An action linked to this event -- Eventually there is some parameters to define according to the chosen action +- Eventually there is some parameters to define Each project can have a different set of automatic actions, the configuration panel is located on the project listing page, just click on the link "Automatic actions". + + To add a new automatic action, choose the event with an action and click on the button "Next Step", then specify action parameters and finish the process by clicking on the button "Save this action". + + Each time an event occurs, the corresponding actions are executed. + + List of available events ------------------------ diff --git a/docs/editing-projects.markdown b/docs/editing-projects.markdown new file mode 100644 index 00000000..19827859 --- /dev/null +++ b/docs/editing-projects.markdown @@ -0,0 +1,8 @@ +Editing projects +================ + +Projects can be renamed and disabled at any time. + +To rename a project, just click on the link "Edit project" on the left. + + |
