nquest/requests.http

132 lines
2.6 KiB
Text
Raw Normal View History

2024-01-05 03:50:33 +03:00
POST http://localhost:8000/api/user/register
Content-Type: application/json
{
"username": "neonxp",
"email": "i@neonxp.ru",
"password": "password",
"password2": "password"
}
###
GET http://localhost:8000/api/user
###
GET http://localhost:8000/api/games
Content-Type: application/json
###
POST http://localhost:8000/api/user/login
Content-Type: application/json
{
"email": "i@neonxp.ru",
"password": "password"
}
###
POST http://localhost:8000/api/games
Content-Type: application/json
{
"title": "Тестовая игра",
"description": "Описание тестовой игры",
"type": "city",
"tasks": [
{
"title": "Задание 1",
"text": "Текст первого задания",
"codes": [
{
"description": "1+",
"code": "nq1111"
}
],
"solutions": []
},
{
"title": "Задание 2",
"text": "Текст второго задания",
"codes": [
{
"description": "1+",
"code": "nq2211"
},
{
"description": "2+",
"code": "nq2222"
}
],
"solutions": [
{
"text": "Помощь 1",
"after": 30
},
{
"text": "Помощь 2",
"after": 60
}
]
},
{
"title": "Задание 3",
"text": "Текст третьего задания",
"codes": [
{
"description": "1+",
"code": "nq3311"
},
{
"description": "2+",
"code": "nq3322"
},
{
"description": "3+",
"code": "nq3333"
}
],
"solutions": []
}
]
}
###
GET http://localhost:8000/api/engine/1
###
POST http://localhost:8000/api/engine/1/code
Content-Type: application/json
{
"code": "NQ1111"
}
###
POST http://localhost:8000/api/engine/1/code
Content-Type: application/json
{
"code": "NQ2211"
}
###
POST http://localhost:8000/api/engine/1/code
Content-Type: application/json
{
"code": "NQ2222"
}
###
POST http://localhost:8000/api/engine/1/code
Content-Type: application/json
{
"code": "NQ3322"
}