DXClassClient

This class is responsible for making requests to the class API.

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

Properties

public static let shared: DXClassClient

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

Methods

getClasses

public func getClasses(
    page: Int? = nil,
    limit: Int? = nil,
    _ completion: @escaping (_ error: Error?, _ classes: [DXClass]?) -> Void)
    -> Void

Retrieves all the classes belonging to the requesting teacher or student.

Parameter

Type

Description

page

Int?

Results page to retrieve.

limit

Int?

Page size.

completion

(_ error: Error?, _ classes: [DXClass]?) -> Void

The closure invoked when the request finishes. Called with an Error argument if the request fails; otherwise, called with the requested classes.

Last updated