to get started with the project :
-
clone the repository http:
https://github.com/Team-Tech2021/kuro-rest-api.gitor ssl :git@github.com:Team-Tech2021/kuro-rest-api.git -
redirect to the folder
cd kuro-rest-api -
install the dependincies
poetry install -
create .env file and fill it with your config vars "follow .env.sample"
-
make migrations
python manage.py makemigrations -
migrate to the database
python manage.py migrate -
create superuser
python manage.py createsuperuser -
run the server
python manage.py runserver
| Method | End Point | Action | request body |
|---|---|---|---|
| POST | /signup/ | signup | required: true , content: application/json , responses:'201',description: Created , requestBodies: A JSON object containing user information, required felids: "username:string , email:string , password:string , " optional felids: "first_name:string, is_superuser :boolean , is_staff : boolean ,is_active : boolean , created_at : Date " |
| Method | End Point | Action | |
|---|---|---|---|
| POST | /api/token/ | receives token /"login" | |
| GET | /api/v1/code | get list of the codes | |
| GET | /api/v1/code/{code_id} | get information about specific code | |
| GET | /api/v1/problem | get list of the problems | |
| GET | /api/v1/problem/{problem_id} | get information about specific problem | |
| GET | /api/v1/problem | get list of the problems | |
| GET | /api/v1/problem/{problem_id} | get information about specific problem |
| Method | End Point | Action | request body | headers |
|---|---|---|---|---|
| GET | /problems/is-complete/?problem_id | check if the user completed successfully a problem | ||
| POST | /problems/check-code/ | get the test result to check if the user completed successfully a problem | required: true , content: application/json , responses:'200',description: OK , requestBodies: A JSON object containing encoded code, required felids: "code:string " | Authorization: Bearer Token |
| POST | /problems/user-code/ | get the previous code for a specific and a problem | required: true , content: application/json , responses:'200',description: OK , requestBodies: A JSON object containing problem id, required felids: "problem: integer" | Authorization: Bearer Token |
| POST | /problems/compile/ | get the test result to check if the user completed successfully a problem and save it in passed table | required: true , content: application/json , responses:'200',description: OK , requestBodies: A JSON object containing encoded code, required felids: "code:string " | Authorization: Bearer Token |