Add identifier field to questions

This commit is contained in:
Raphael Michel
2018-03-12 13:47:29 +01:00
parent 234e0ee764
commit f21da0cc2b
10 changed files with 157 additions and 9 deletions

View File

@@ -129,7 +129,9 @@ downloads list of objects List of ticket
answers list of objects Answers to user-defined questions
├ question integer Internal ID of the answered question
├ answer string Text representation of the answer
└ options list of integers Internal IDs of selected option(s)s (only for choice types)
├ question_identifier string The question's ``identifier`` field
├ options list of integers Internal IDs of selected option(s)s (only for choice types)
└ option_identifiers list of strings The ``identifier`` fields of the selected option(s)s
===================================== ========================== =======================================================
.. versionchanged:: 1.7
@@ -140,6 +142,10 @@ answers list of objects Answers to user
The attribute ``checkins.list`` has been added.
.. versionchanged:: 1.14
The attributes ``answers.question_identifier`` and ``answers.option_identifiers`` have been added.
Order endpoints
---------------
@@ -222,7 +228,9 @@ Order endpoints
"answers": [
{
"question": 12,
"question_identifier": "WY3TP9SL",
"answer": "Foo",
"option_idenfiters": [],
"options": []
}
],
@@ -330,7 +338,9 @@ Order endpoints
"answers": [
{
"question": 12,
"question_identifier": "WY3TP9SL",
"answer": "Foo",
"option_idenfiters": [],
"options": []
}
],
@@ -649,7 +659,9 @@ Order position endpoints
"answers": [
{
"question": 12,
"question_identifier": "WY3TP9SL",
"answer": "Foo",
"option_idenfiters": [],
"options": []
}
],
@@ -729,7 +741,9 @@ Order position endpoints
"answers": [
{
"question": 12,
"question_identifier": "WY3TP9SL",
"answer": "Foo",
"option_idenfiters": [],
"options": []
}
],

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"}
}
]