DXQuestionClient

You will need to enable the "Training" scope for your app in the developer dashboard before using the assessment API.

Properties

Singleton instance of DXQuestionClient. You will access all the available DXQuestionClient methods through this instance.

public static let shared: DXQuestionClient

Methods

getQuestionsById

public func getQuestionsById(
    requestingUserId: String,
    courseId: String,
    showRemoved: String? = nil,
    _ completion: @escaping (_ error: Error?, _ questions: [DXQuestion]?) -> Void)
    -> Void

Retrieves an array of Questions to be displayed to a user.

Parameter

Type

Description

requestingUserId

String

The Id of the user attempting to access the question bank.

courseId

String

The Id of the course being queried for questions.

showRemoved

String

Optional, show removed questions.

completion

(_ error: Error?, _ questions: [DXQuestion]?) -> Void

The closure invoked when the request finishes. Called with an Error argument if the request fails; otherwise, called with a list of questions from the course question-bank

Last updated