Skip to content
This repository has been archived by the owner on Feb 23, 2019. It is now read-only.

piterpy-meetup/pytality_server

Repository files navigation

Pytality server

server for the code-battle interactive game

Install & run a local machine

Setup postgres as described in settings.py.

$ python manage.py migrate
$ python manage.py runserver    

API documentation

[1] Get next random snippet: GET /snippets/next/

Response:

{
    "status": "OK",
    "snippet_id": 17,
    "code": "print a\n\nprint b",
    "time_so_solve": 5
}

[2] Submit state of a snippet from developer (websocket)

Request:

{
    "snippet_id": 17,
    "code": "print(a)\n\nprint(b)" 
}

Response:

{
    "status": "OK"
}

[3] Submit the fact that developer is finished (websocket)

Response:

{
    "status": "OK",
    "data": {
        "result": "passed" | "failed"
    }    
}

or

{
    "status": "error",
    "errors": [<..>]
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published