https://github.com/muhammad-magdi/online-quizes
https://github.com/muhammad-magdi/online-quizes
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/muhammad-magdi/online-quizes
- Owner: Muhammad-Magdi
- Created: 2019-08-28T22:54:17.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-01T20:13:54.000Z (over 3 years ago)
- Last Synced: 2023-03-07T06:23:20.058Z (over 3 years ago)
- Language: JavaScript
- Size: 2.02 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# online-quizes
## Schemas:
1. Quiz, Each Quiz is described by:
- A Required `title`.
- Zero or more `questions`.
2. Questions, A Question is described by:
- A Required `statement`.
- A Required `degree` with non-negative value.
- An array of `correctAnswers`.
- An optional array of `wrongAnswers`.
- A Required `type` that's a value of:
- `mcq-1`: Multiple Choice Questions that must have exactly one correct Answer.
- `mcq-check`: Multiple Choice Questions that must have at least one correct Answer (CheckBox Style).
- `short-text`: Questions that have a short text answers.
## Usage:
Send requests to https://magdi-online-quizes.herokuapp.com suffixed by a valid path.
## Endpoints:
### Create new Quiz:
`POST` on `https://magdi-online-quizes.herokuapp.com/quizes` with:
- A valid quiz in the body.
- An Authentication token in the `x-fake-token` HTTP header with the value `HelloWorld`.
### Create a Question in a Quiz:
`POST` on `https://magdi-online-quizes.herokuapp.com/quizes/:quizId/questions` with:
- A valid question in the body.
- An Authentication token in the `x-fake-token` HTTP header with the value `HelloWorld`.
### List All Quizes:
`GET` from `https://magdi-online-quizes.herokuapp.com/quizes`.
### Show Quiz & Associated Questions:
`GET` from `https://magdi-online-quizes.herokuapp.com/quizes/:quizId` with:
- A valid quiz `_id`.
### Delete A Question from a Quiz:
`DELETE` from `https://magdi-online-quizes.herokuapp.com/quizes/:quizId/questions/questionId` with:
- A valid quiz `_id`.
- A valid question `_id`.
- An Authentication token in the `x-fake-token` HTTP header with the value `HelloWorld`.