DXCourseClient
This class is responsible for making requests to the course API.
Last updated
This class is responsible for making requests to the course API.
Last updated
You will need to enable the "Training" scope for your app in the developer dashboard before using the course API.
Singleton instance of DXCourseClient
. You will access all the available DXCourseClient
methods through this instance.
Retrieves a single course by ID.
Retrieves all courses.
Retrieves a course's objectives.
Retrieves a courses objectives along with a student's performance on the objectives.
A list of course objectives with the requested student's skill level and the scores that were used to calculate it. Skill level ranks can be 0 ("Basic"), 1 ("Advanced"), or 2 ("Expert").
In the "lessonScores" array, the score is either the score of the student's latest completed attempt at the lesson, or an objective score sent in via the API (see Update Student's Objective Score), indicated by the "scoreType" attribute.
If a student has no recorded progress on the Objective's linked lessons, "skill" will be 0, and "skillDescription" and "score" will both be null.
Parameter
Type
Description
courseId
String
The ID of the requested course.
completion
(_ error: Error?, _ course: DXCourse?) -> Void
Closure invoked when the request finishes. Called with an Error
argument if the request fails; otherwise, called with the newly created DXCourse
.
Parameter
Type
Description
limit
Int?
Page size.
page
Int?
Results page to return.
completion
(_ error: Error?, _ courses: [DXCourse]?) -> Void
Closure invoked when the request finishes. Called with an Error
argument if the request fails; otherwise, called with the requested courses.
Parameter
Type
Description
courseId
String
The ID of the requested course.
completion
( error: Error?, objectives: [DXCourseObjective]?) -> Void
Closure invoked when the request finishes. Called with an Error
argument if the request fails; otherwise, called with the requested course objectives.
Parameter
Type
Description
courseId
String
The ID of the requested course.
completion
( error: Error?, objectives: [DXCourseObjective]?) -> Void
Closure invoked when the request finishes. Called with an Error
argument if the request fails; otherwise, called with the requested course objectives.