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": "Тестовая игра 2", "description": "Описание тестовой игры", "type": "city", "points": 500, "tasks": [ { "title": "Задание 1", "text": "Текст первого задания.\n\n*Коды: `nq1111`*", "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": [] } ] } ### POST http://localhost:8000/api/games Content-Type: application/json { "title": "Тестовая игра 3", "description": "Описание тестовой игры", "type": "city", "points": 500, "tasks": [ { "title": "Задание 1", "text": "Текст первого задания.\n\n*Коды: `nq1111`*", "codes": [ { "description": "1+", "code": "nq1111" } ], "solutions": [] }, { "title": "Задание 2", "text": "Текст второго задания", "codes": [ { "description": "1+", "code": "nq2211" } ], "solutions": [] }, { "title": "Задание 3", "text": "Текст третьего задания", "codes": [ { "description": "1+", "code": "nq3311" } ], "solutions": [] }, { "title": "Задание 4", "text": "Текст 4 задания", "codes": [ { "description": "1+", "code": "nq4411" } ], "solutions": [] }, { "title": "Задание 5", "text": "Текст 5 задания", "codes": [ { "description": "1+", "code": "nq5511" } ], "solutions": [] }, { "title": "Задание 6", "text": "Текст 6 задания", "codes": [ { "description": "1+", "code": "nq6611" } ], "solutions": [] }, { "title": "Задание 7", "text": "Текст 7 задания", "codes": [ { "description": "1+", "code": "nq7711" } ], "solutions": [] }, { "title": "Задание 8", "text": "Текст 8 задания", "codes": [ { "description": "1+", "code": "nq8811" } ], "solutions": [] } ] } ### GET http://localhost:8000/api/engine/2 ### POST http://localhost:8000/api/engine/2/code Content-Type: application/json { "code": "NQ1111" } ### POST http://localhost:8000/api/engine/2/code Content-Type: application/json { "code": "NQ2211" } ### POST http://localhost:8000/api/engine/2/code Content-Type: application/json { "code": "NQ2222" } ### POST http://localhost:8000/api/engine/2/code Content-Type: application/json { "code": "NQ3333" }