submitSpotItFeedback

abstract suspend fun submitSpotItFeedback(spotId: String, endorsementId: Int, successId: Int, feedback: String?): AFResult

Submits feedback for a Spot It session.

Feedback includes which endorsement and success were chosen, along with optional free-text input from the user.

Return

AFResult indicating submission success.

Parameters

spotId

The ID of the Spot It session.

endorsementId

The ID of the endorsement provided by the user.

successId

The ID of the success provided by the user.

feedback

Optional text feedback from the user.

Throws

if feedback cannot be submitted.

Android (Kotlin)

lifecycleScope.launch {
try {
val result = AFCore.mentalFitness().submitSpotItFeedback(
spotId = "session123",
endorsementId = 10,
successId = 20,
feedback = "This worked well for me"
)
showMessage(result.message ?: "Feedback submitted")
} catch (t: Throwable) {
showError("Feedback submission failed: ${t.message}")
}
}

iOS (Swift)

Task {
do {
let result = try await AFCore.shared.mentalFitness().submitSpotItFeedback(
spotId: "session123",
endorsementId: 10,
successId: 20,
feedback: "This worked well for me"
)
self.showMessage(result.message ?? "Feedback submitted")
} catch {
self.showError("Feedback submission failed: \\(error.localizedDescription)")
}
}