submit Spot It Feedback
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
spot Id
The ID of the Spot It session.
endorsement Id
The ID of the endorsement provided by the user.
success Id
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}")
}
}Content copied to clipboard
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)")
}
}Content copied to clipboard