CIOQuizQuery

public struct CIOQuizQuery : CIORequestData

Struct encapsulating the necessary and additional parameters required to execute a quiz query.

  • The id of the quiz

    Declaration

    Swift

    public let quizID: String
  • A list of answers. Please refer to “https://docs.constructor.com/reference/configuration-quizzes” for additional details

    Declaration

    Swift

    public var answers: [[String]]?
  • Unique quiz_version_id for the quiz. 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

    Declaration

    Swift

    public var quizVersionID: String?
  • Unique quiz_session_id for the quiz. 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

    Declaration

    Swift

    public var quizSessionID: String?
  • Create a Quiz request query object

    Usage Example:

    let quizQuery = CIOQuizQuery(quizID: "123", answers: [["1"], ["1","2"]], quizVersionID: "some-version-id")
    

    Declaration

    Swift

    public init(quizID: String, answers: [[String]]? = nil, quizVersionID: String? = nil, quizSessionID: String? = nil)

    Parameters

    quizID

    The id of the quiz

    answers

    A list of answers

    quizVersionID

    The version of the quiz you would like to request

    quizSessionID

    The identifier for the current session of the quiz