From 370f0994717e0cbf8d338857154d2cd2f095bf14 Mon Sep 17 00:00:00 2001 From: Knud Hollander <26556793+KnudH@users.noreply.github.com> Date: Sat, 25 Oct 2025 11:57:00 +0200 Subject: [PATCH] Update API documentation for option addition Fixing examples for adding options with and without sequences. Signed-off-by: Knud Hollander <26556793+KnudH@users.noreply.github.com> --- docs/API_v1.0.md | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/docs/API_v1.0.md b/docs/API_v1.0.md index 97a4142c1e..e45364e0d3 100644 --- a/docs/API_v1.0.md +++ b/docs/API_v1.0.md @@ -235,12 +235,41 @@ A poll newly created will look like this. ``` ### Add/update option (date poll) +Add a single option ```json { - "timestamp": 1589195823, - "duration": 1800 + "option": + { + "text": "", + "timestamp": 1589195823, + "duration": 1800 + } } ``` +Add with sequence options (like in the UI) +````json +{ + "option": + { + "text":"", + "timestamp":1761343200, + "duration":86400 + }, + "sequence": + { + "unit": + { + "id":"day", + "value":"day", + "name":"Day", + "timeOption":false + }, + "stepWidth":1, + "repetitions":0 + }, + "voteYes":false +} +```` ### Keys and values | Key | Type | description |