Class QuizRequest

java.lang.Object
io.constructor.client.QuizRequestBase
io.constructor.client.QuizRequest

public class QuizRequest extends QuizRequestBase
Constructor.io Next Quiz and Results Quiz request
  • Constructor Details

    • QuizRequest

      public QuizRequest(String quizId)
      Creates a Next Quiz/Results Quiz request
      Parameters:
      quizId - the id of the quiz to request
  • Method Details

    • setAnswers

      public void setAnswers(List<List<String>> answers)
      Parameters:
      answers - the list of answers in the format [ [1,2], [3,4] ] where [1,2] are the selected answers for the first question and [3,4] are the selected answers for the second question
    • getAnswers

      public List<List<String>> getAnswers()
      Returns:
      the list of answers for the quiz
    • setQuizSessionId

      public void setQuizSessionId(String quizSessionId)
      Parameters:
      quizSessionId - 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
    • getQuizSessionId

      public String getQuizSessionId()
      Returns:
      the quizSessionId. 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