Code Monkey home page Code Monkey logo

gameapi_skeleton's Introduction

GameAPI_Skeleton

A skeleton API of the game using Django rest framework and PostgreSQL

Player endpoint: http://127.0.0.1:8000/players/

HTTP 200 OK
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

[
    {
        "url": "http://127.0.0.1:8000/players/1/",
        "name": "kevin",
        "gender": "M",
        "gender_description": "Male",
        "scores": [
            {
                "url": "http://127.0.0.1:8000/player-scores/2/",
                "pk": 2,
                "score": 25000,
                "score_date": "2016-06-21T03:02:00Z",
                "game": {
                    "url": "http://127.0.0.1:8000/games/2/",
                    "game_category": "3D RPG",
                    "name": "Superman vs Aquaman",
                    "released_date": "2016-06-21T03:02:00Z",
                    "played": false
                }
            },
            {
                "url": "http://127.0.0.1:8000/player-scores/3/",
                "pk": 3,
                "score": 19000,
                "score_date": "2016-09-21T03:02:00Z",
                "game": {
                    "url": "http://127.0.0.1:8000/games/1/",
                    "game_category": "3D RPG",
                    "name": "God of War",
                    "released_date": "2016-06-21T03:02:00Z",
                    "played": false
                }
            }
        ]
    },
    {
        "url": "http://127.0.0.1:8000/players/2/",
        "name": "Patric",
        "gender": "M",
        "gender_description": "Male",
        "scores": [
            {
                "url": "http://127.0.0.1:8000/player-scores/1/",
                "pk": 1,
                "score": 35000,
                "score_date": "2016-06-21T03:02:00Z",
                "game": {
                    "url": "http://127.0.0.1:8000/games/2/",
                    "game_category": "3D RPG",
                    "name": "Superman vs Aquaman",
                    "released_date": "2016-06-21T03:02:00Z",
                    "played": false
                }
            }
        ]
    }
]

Game category endpoint : http://127.0.0.1:8000/game-categories/

HTTP 200 OK
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

[
    {
        "url": "http://127.0.0.1:8000/game-categories/2/",
        "pk": 2,
        "name": "2D Mobile Arcade",
        "games": []
    },
    {
        "url": "http://127.0.0.1:8000/game-categories/1/",
        "pk": 1,
        "name": "3D RPG",
        "games": [
            "http://127.0.0.1:8000/games/1/",
            "http://127.0.0.1:8000/games/2/"
        ]
    }
]

Games endpoint : http://127.0.0.1:8000/games/

HTTP 200 OK
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

[
    {
        "url": "http://127.0.0.1:8000/games/1/",
        "game_category": "3D RPG",
        "name": "God of War",
        "released_date": "2016-06-21T03:02:00Z",
        "played": false
    },
    {
        "url": "http://127.0.0.1:8000/games/2/",
        "game_category": "3D RPG",
        "name": "Superman vs Aquaman",
        "released_date": "2016-06-21T03:02:00Z",
        "played": false
    }
]

Player score endpoint : http://127.0.0.1:8000/player-scores/

HTTP 200 OK
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

[
    {
        "url": "http://127.0.0.1:8000/player-scores/1/",
        "pk": 1,
        "score": 35000,
        "score_date": "2016-06-21T03:02:00Z",
        "player": "Patric",
        "game": "Superman vs Aquaman"
    },
    {
        "url": "http://127.0.0.1:8000/player-scores/2/",
        "pk": 2,
        "score": 25000,
        "score_date": "2016-06-21T03:02:00Z",
        "player": "kevin",
        "game": "Superman vs Aquaman"
    },
    {
        "url": "http://127.0.0.1:8000/player-scores/3/",
        "pk": 3,
        "score": 19000,
        "score_date": "2016-09-21T03:02:00Z",
        "player": "kevin",
        "game": "God of War"
    }
]

gameapi_skeleton's People

Contributors

mdadil2019 avatar

Watchers

James Cloos avatar

Forkers

1jb12me030

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.