囲みマス API (都城)
Download OpenAPI specification:Download
試合事前情報取得API
下記の要素からなる配列を返す
- 試合のID
- 対戦相手の名前
- 試合における自分のteamID(各試合によって異なります)
- 試合のターン数
- 試合の1ターンあたりの時間(ミリ秒)
- 試合のターンとターンの間の時間(ミリ秒)
下記の場合にエラーを返します。
- InvalidToken (401)
- トークンが間違っているもしくは存在しない場合
header Parameters
Authorization | string BearerToken |
Responses
Response samples
- 200
- 401
Content type
application/json
[- {
- "id": "string",
- "intervalMillis": 0,
- "matchTo": "string",
- "teamID": 0,
- "turnMillis": 0,
- "turns": 0
}
]
試合状態取得API
試合に関する状態を取得するAPI 下記の場合にエラーを返します。
- InvalidToken (401)
- トークンが間違っているもしくは存在しない場合
- InvalidMatches (400)
- 参加していない試合へのリクエストの場合
- TooEarly (400)
- 試合の開始前にアクセスした場合
path Parameters
id required | string |
header Parameters
Authorization | string pic |
Responses
Response samples
- 200
- 400
- 401
Content type
application/json
{- "actions": [
- {
- "agentID": 0,
- "dx": 0,
- "dy": 0,
- "type": "move",
- "apply": -1,
- "turn": 0
}
], - "height": 0,
- "points": [
- [
- 0
]
], - "startedAtUnixTime": 0,
- "teams": [
- {
- "agents": [
- {
- "agentID": 0,
- "x": 0,
- "y": 0
}
], - "areaPoint": 0,
- "teamID": 0,
- "tilePoint": 0
}
], - "tiled": [
- [
- 0
]
], - "turn": 0,
- "width": 0
}
行動更新API
試合でのエージェントの行動を送信するAPI 下記の場合にエラーを返します。
- InvalidToken (401)
- トークンが間違っているもしくは存在しない場合
- InvalidMatches (400)
- 参加していない試合へのリクエストの場合
- TooEarly (400)
- 試合の開始前にアクセスした場合
- UnacceptableTime(400)
- インターバル中などTooEarly以外で回答の受付を行っていない時間にアクセスした場合
path Parameters
id required | string |
header Parameters
Authorization | string pic |
Request Body schema: application/jsonrequired
required | Array of objects |
Responses
Request samples
- Payload
Content type
application/json
{- "actions": [
- {
- "agentID": 0,
- "dx": 0,
- "dy": 0,
- "type": "move"
}
]
}
Response samples
- 201
- 400
- 401
Content type
application/json
{- "actions": [
- {
- "agentID": 0,
- "dx": 0,
- "dy": 0,
- "type": "move",
- "turn": 0
}
]
}