Query Builder
Collects the questions for one request, keyed by ids you choose. Every function returns a QuestionRef handle, so val urgent = noul(...) then result[urgent] works too.
Functions
Link copied to clipboard
A Box: where, in an image attached to the request, the thing instructions describes is. Needs Jev 1.14.
Link copied to clipboard
inline fun <E : Enum<E>> choice(id: String, instructions: JsonElement): QuestionRef<ChoiceAnswer<E>>
fun choice(id: String, instructions: String, options: ChoiceBuilder.() -> Unit): QuestionRef<ChoiceAnswer<String>>
fun choice(id: String, instructions: JsonElement, options: ChoiceBuilder.() -> Unit): QuestionRef<ChoiceAnswer<String>>
Link copied to clipboard
fun noul(id: String, instructions: String, criteria: NoulBuilder.() -> Unit? = null): QuestionRef<NoulAnswer>
fun noul(id: String, instructions: JsonElement, criteria: NoulBuilder.() -> Unit? = null): QuestionRef<NoulAnswer>
Link copied to clipboard
Adds a Question built directly, e.g. one generated programmatically. Its option map or level list is copied, so changing the original afterwards changes nothing. Reading the handle checks that the answer is of the question's type, as the typed builders' handles do.
Link copied to clipboard
fun score(id: String, instructions: String, levels: ScoreBuilder.() -> Unit): QuestionRef<ScoreAnswer>
fun score(id: String, instructions: JsonElement, levels: ScoreBuilder.() -> Unit): QuestionRef<ScoreAnswer>