Repository

interface Repository

An interface that contains the requisite methods for an instance of Repository.

Functions

Link copied to clipboard
abstract suspend fun fetchActiveTestListForUser(user: ExamerUser): List<TestDetails>

Used to fetch a list of active tests for the specified user. An active test is any instance of TestDetails with TestDetails.testStatus set to Status.OPEN or Status.SCHEDULED. The returned list will contain both, tests which are open and tests which are scheduled.

Link copied to clipboard
abstract suspend fun fetchPreviousTestListForUser(user: ExamerUser): List<TestDetails>

Used to fetch a list of previous tests for the specified user.

Link copied to clipboard
abstract suspend fun fetchTestResults(user: ExamerUser, testDetailsId: String): TestResult

Used to fetch the TestResult of a single test with the specified testDetailsId for a specific user.

Link copied to clipboard
abstract suspend fun fetchWorkBookList(user: ExamerUser, testDetails: TestDetails): Result<List<WorkBook>>

Used to fetch a list of WorkBooks associated with a specific TestDetails object, for the specified user. An instance of Result containing the list is returned.

Link copied to clipboard
abstract suspend fun markTestAsCompleted(user: ExamerUser, testDetailId: String)

Used to mark a test with the associated testDetailId as complete.

Link copied to clipboard
abstract suspend fun markTestAsMissed(user: ExamerUser, testDetailId: String)

Used to mark a test with the associated testDetailId as missed.

Link copied to clipboard
abstract suspend fun saveProfilePictureForUser(user: ExamerUser, bitmap: Bitmap)

Used to the save the profile picture (represented as a Bitmap) for the specified user.

Link copied to clipboard
abstract suspend fun saveUserAnswersForUser(    user: ExamerUser,     userAnswers: UserAnswers,     testDetailId: String)

Used to save the userAnswers associated with a particular test, with the specified testDetailId, for the specified user.

Inheritors

Link copied to clipboard