Open MayuriXx opened 6 months ago
There is the prerequisite of having the userId
Endpoint: xpeho/v1/qvst/campaigns/{Id}/questions Verb: GET Header: userId: {userId} Example Type:
struct QvstAnswer: Codable {
let id: String
let answer: String
let value: String
}
struct QvstQuestion: Codable {
let questionId: String
let question: String
let hasAnswered: Bool
let answers: [QvstAnswer]
var userAnswer: String?
enum CodingKeys: String, CodingKey {
case questionId = "question_id"
case question
case hasAnswered
case answers
case userAnswer
}
}
Endpoint: xpeho/v1/qvst/campaigns/{id}/questions:answer Verb: POST Header: userId: {userId} Example Type:
struct QvstAnswerBody: Codable {
let questionId: String
let answerId: String
enum CodingKeys: String, CodingKey {
case questionId = "question_id"
case answerId = "answer_id"
}
}
• Get the form in the wordpress • Create the different components
Edit(Loucas):
User story: As a XPEHO employee, I want to be able to answer QVST forms so that my opinions are taken into account. I want to clearly see which questions I've already answered so that I don't waste time.
Acceptance Criteria:
Priority: High
Steps to follow:
Picker
inside aForm