getQuizResults

fun getQuizResults(    quizId: String,     answers: List<List<String>>? = null,     quizVersionId: String? = null,     quizSessionId: String? = null,     sectionName: String? = null,     filters: Map<String, List<String>>? = null,     page: Int? = null,     perPage: Int? = null): Observable<ConstructorData<QuizResultsResponse>>

Return a list of quiz results.

Example:

val answers = listOf(
listOf("1"),
listOf("1", "2"),
listOf("true"),
listOf("seen"),
)
ConstructorIo.getQuizResults("quiz-id", answers, "version-id")

Parameters

quizId

id of the quiz you want to retrieve

answers

list of answers to send

quizVersionId

version identifier for the quiz. version ID will be returned with the first request and it should be passed with subsequent requests. more information can be found: https://docs.constructor.com/reference/configuration-quizzes

quizSessionId

session identifier for the quiz. session ID will be returned with the first request and it should be passed with subsequent requests. more information can be found: https://docs.constructor.com/reference/configuration-quizzes

sectionName

the section the quiz and results come from. defaults to "Products"

filters

additional filters used to refine results

page

the page number of the results

perPage

The number of results per page to return


fun getQuizResults(request: QuizRequest): Observable<ConstructorData<QuizResultsResponse>>

Return a list of quiz results utilizing a request object.

Example:

val answers = listOf(
listOf("1"),
listOf("1", "2"),
listOf("true"),
listOf("seen"),
)
val request = QuizRequest.Builder("quiz-id")
.setAnswers(answers)
.setVersionId("version-id")
.build()
ConstructorIo.getQuizResults(request)

Parameters

request

the quiz request object