DXXAPIClient

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

Properties

public static let shared: DXXAPIClient

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

Methods

createStatement

public func createStatement(
    actor: String,
    verb: String,
    object: [String: String],
    timestamp: String? = nil,
    _ completion: @escaping (_ error: Error?) -> Void
    ) -> Void

Creates an xAPI statement.

Parameter

Type

Description

actor

String

User ID of the actor performing the action.

verb

String

Action that the actor is carrying out on the object.

object

String

Targets of the action the user is carrying out.

timestamp

String?

A parseable ISO date (eg. 2020-01-07T21:45:35.649Z).

completion

(_ error: Error?) -> Void

The closure invoked when the request finishes. Called with an Error argument if the request fails.