Skip to content

API Document

Tomoki ICHIKAWA edited this page Nov 4, 2018 · 5 revisions

Endpoint

エンドポイントのベースURLは/api/v1/になっています。 また、すべてのリクエストには必ず投票用のトークンを含める必要があり、トークンはHTTPリクエストヘッダにX-Vote-Tokenというキーでセットする必要があります。

GET /vote_tokens/<token>

{
    "votable": {
        "app": true,
        "idea": true
    }
}

GET /apps

{
    "apps": [
        {
            "id": 6,
            "title": "OJT Manager",
            "description": null,
            "team_name": "イニシャルD",
            "images": [
                {
                    "image_url": "/uploads/image/image/1/rx-dog.jpeg"
                }
            ]
        }
        {
            "id": 16,
            "title": "BOKiN",
            "description": null,
            "team_name": "Red Bottle Coffee",
            "images": []
        }
    ]
}

GET /apps/:id

{
    "id": 16,
    "title": "BOKiN",
    "description": null,
    "team_name": "Red Bottle Coffee",
    "images": []
}

POST /apps/:id/vote

{
    "status": ok
}

GET /ideas

{
    "ideas": [
        {
            "id": 6,
            "title": "OJT Manager",
            "description": null,
            "team_name": "イニシャルD",
            "images": [
                {
                    "image_url": "/uploads/image/image/1/rx-dog.jpeg"
                }
            ]
        }
        {
            "id": 16,
            "title": "BOKiN",
            "description": null,
            "team_name": "Red Bottle Coffee",
            "images": []
        }
    ]
}

GET /ideas/:id

{
    "id": 16,
    "title": "BOKiN",
    "description": null,
    "team_name": "Red Bottle Coffee",
    "images": []
}

POST /ideas/:id/vote

{
    "status": ok
}

Clone this wiki locally