gin - web framework gorm - handles database render - hosting service
example json body:
{
"createdBy": "Kulothungan",
"title": "Python Programming",
"questions": [
{
"text": "What is str?",
"correctOptionIdx": 0,
"options": ["string", "integer", "dict", "set"]
},
{
"text": "What is dict?",
"correctOptionIdx": 2,
"options": ["string", "integer", "dict", "set"]
}
]
}
example response of the request:
{
"message": "Quiz created successfully",
"quidId": 89754522,
}
example response of the request:
{
"id": 89754522,
"createdAt": "2023-10-05T21:39:17.397343371+05:30",
"title": "Python Programming",
"createdBy": "Kulothungan",
"questions": [
{
"id": 397813821,
"quizId": 89754522,
"options": [
{
"id": 635011239,
"questionId": 397813821,
"text": "dict"
},
{
"id": 2049870362,
"questionId": 397813821,
"text": "string"
},
{
"id": 2724491244,
"questionId": 397813821,
"text": "set"
},
{
"id": 3559821882,
"questionId": 397813821,
"text": "integer"
}
],
"text": "What is str?"
},
{
"id": 3766009826,
"quizId": 89754522,
"options": [
{
"id": 202646390,
"questionId": 3766009826,
"text": "integer"
},
{
"id": 1067323032,
"questionId": 3766009826,
"text": "string"
},
{
"id": 1419749967,
"questionId": 3766009826,
"text": "dict"
},
{
"id": 3492017362,
"questionId": 3766009826,
"text": "set"
}
],
"text": "What is dict?"
}
]
}
example json body request
{
"answeredBy": "Rishvan",
"quizId": 89754522,
"answers": [
{
"questionId": 397813821,
"optionId": 2049870362
},
{
"questionId": 3766009826,
"optionId": 1419749967
}
]
}
response
{
"message": "Answer submitted successfully",
"score": 0
}
example request of the request:
{
"submissions": [
{
"id": 1,
"quizId": 89754522,
"score": 1,
"answeredBy": "Rish",
"answeredAt": "0001-01-01T00:00:00Z"
},
{
"id": 2,
"quizId": 89754522,
"score": 1,
"answeredBy": "Risdfgh",
"answeredAt": "0001-01-01T00:00:00Z"
},
{
"id": 3,
"quizId": 89754522,
"score": 2,
"answeredBy": "Risdfgh",
"answeredAt": "0001-01-01T00:00:00Z"
},
{
"id": 4,
"quizId": 89754522,
"score": 0,
"answeredBy": "Risdfgh",
"answeredAt": "0001-01-01T00:00:00Z"
}
]
}