hukuwarai-backend (1.0.0)

Download OpenAPI specification:Download

HUKUWARAI JAPAN

games

ゲーム全取得API

作成されているゲームを全て取得する

Responses

Response samples

Content type
application/json
[
  • {
    }
]

ゲーム作成API

新しいゲームを作成する

Request Body schema: application/json
name
required
string

ゲーム名

answer_url
required
string

正解画像 URL

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "answer_url": "string"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "started": false,
  • "finished": false,
  • "answer_url": "string"
}

ゲーム取得API

対象のゲームを取得する

path Parameters
gameId
required
integer <int32>

対象のゲームのID

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "started": false,
  • "finished": false,
  • "answer_url": "string"
}

ゲームデータ変更API

対象のゲームデータを変更する

path Parameters
gameId
required
integer <int32>

対象のゲームのID

Request Body schema: application/json
id
integer <int32>

ゲームの一意な識別子

name
string

ゲームの名前

started
boolean
Default: false

ゲームが開始しているかどうかを示す

finished
boolean
Default: false

ゲームが終了しているかどうかを示す

answer_url
string

ゲームの正解画像のURL

Responses

Request samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "started": false,
  • "finished": false,
  • "answer_url": "string"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "started": false,
  • "finished": false,
  • "answer_url": "string"
}

players

プレイヤー取得API

ゲームに参加しているプレイヤー情報を取得します

path Parameters
gameId
required
integer <int32>

対象のゲームのID

Responses

Response samples

Content type
application/json
{
  • "status": [
    ]
}

プレイヤー作成API

プレイヤーを作成します

path Parameters
gameId
required
integer <int32>

対象のゲームのID

Request Body schema: application/json
name
required
string

プレイヤー名

Responses

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "game_id": 0
}

votes

投票結果取得API

投票結果を取得する

path Parameters
gameId
required
integer <int32>

対象のゲームのID

Responses

Response samples

Content type
application/json
[
  • {
    }
]

投票API

レンダリング結果に対して投票する

path Parameters
gameId
required
integer <int32>

対象のゲームのID

Request Body schema: application/json
player_id
required
integer <int32>

投票するプレイヤーのID

Responses

Request samples

Content type
application/json
{
  • "player_id": 0
}

Response samples

Content type
application/json
{
  • "status": "ok"
}

scores

スコア取得API

ゲーム中に追加されたスコアを全て返します

path Parameters
gameId
required
integer <int32>

対象のゲームのID

Responses

Response samples

Content type
application/json
[
  • {
    }
]

スコア追加API

ゲーム中に変更されたコードのスコアを計算します

path Parameters
gameId
required
integer <int32>

対象のゲームのID

Request Body schema: application/json
code
required
string

ソースコード

player_id
required
integer <int32>

プレイ中のプレイヤーのID

Responses

Request samples

Content type
application/json
{
  • "code": "string",
  • "player_id": 0
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "player_id": 0,
  • "game_id": 0,
  • "score": 0.1,
  • "code": "string",
  • "rendered_url": "string",
  • "created_at": "2019-08-24T14:15:22Z"
}

整形済みスコア取得API

整形済みのスコアデータを返します

path Parameters
gameId
required
integer <int32>

対象のゲームのID

Responses

Response samples

Content type
application/json
[
  • {
    }
]

結果スコア取得API

ゲーム中に追加された最終スコアを返します

path Parameters
gameId
required
integer <int32>

対象のゲームのID

Responses

Response samples

Content type
application/json
[
  • {
    }
]