Add identifier field to questions

This commit is contained in:
Raphael Michel
2018-03-13 09:09:50 +01:00
parent 234e0ee764
commit f21da0cc2b
10 changed files with 157 additions and 9 deletions
+17 -1
View File
@@ -31,12 +31,16 @@ type string The expected ty
required boolean If ``True``, the question needs to be filled out.
position integer An integer, used for sorting
items list of integers List of item IDs this question is assigned to.
identifier string An arbitrary string that can be used for matching with
other sources.
ask_during_checkin boolean If ``True``, this question will not be asked while
buying the ticket, but will show up when redeeming
the ticket instead.
options list of objects In case of question type ``C`` or ``M``, this lists the
available objects.
├ id integer Internal ID of the option
├ identifier string An arbitrary string that can be used for matching with
other sources.
└ answer multi-lingual string The displayed value of this option
===================================== ========================== =======================================================
@@ -45,6 +49,10 @@ options list of objects In case of ques
The values ``D``, ``H``, and ``W`` for the field ``type`` are now allowed and the ``ask_during_checkin`` field has
been added.
.. versionchanged:: 1.14
The attribute ``identifier`` has been added to both the resource itself and the ``options`` subresource.
Endpoints
---------
@@ -80,18 +88,22 @@ Endpoints
"required": false,
"items": [1, 2],
"position": 1,
"identifier": "WY3TP9SL",
"ask_during_checkin": false,
"options": [
{
"id": 1,
"identifier": "LVETRWVU",
"answer": {"en": "S"}
},
{
"id": 2,
"identifier": "DFEMJWMJ",
"answer": {"en": "M"}
},
{
"id": 3,
"identifier": "W9AH7RDE",
"answer": {"en": "L"}
}
]
@@ -134,19 +146,23 @@ Endpoints
"type": "C",
"required": false,
"items": [1, 2],
"ask_during_checkin": false,
"position": 1,
"identifier": "WY3TP9SL",
"ask_during_checkin": false,
"options": [
{
"id": 1,
"identifier": "LVETRWVU",
"answer": {"en": "S"}
},
{
"id": 2,
"identifier": "DFEMJWMJ",
"answer": {"en": "M"}
},
{
"id": 3,
"identifier": "W9AH7RDE",
"answer": {"en": "L"}
}
]