Public
Documentation Settings

BASEBALL-GAME

GET팀 리스트

ec2-15-165-82-124.ap-northeast-2.compute.amazonaws.com/totalTeamList

게임을 시작하는 단계에서 유저가 처음 보는 화면입니다. 여러 대전 중 유저가 본인이 플레이할 팀을 선택하는 단계입니다.

Example Request
curl
curl --location 'ec2-15-165-205-188.ap-northeast-2.compute.amazonaws.com:8080'
Example Response
json
[
  {
    "id": 1,
    "name": "Captain"
  },
  {
    "id": 2,
    "name": "Marvel"
  },
  {
    "id": 3,
    "name": "Twins"
  },
  {
    "id": 4,
    "name": "Tigers"
  },
  {
    "id": 5,
    "name": "Rockets"
  },
  {
    "id": 6,
    "name": "Dodgers"
  }
]
No response headers
This request doesn't return any response headers

POST전체 조회 (초기화)

ec2-15-165-82-124.ap-northeast-2.compute.amazonaws.com/game

유저가 대전을 선택하면 유저 선택한 팀의 id, 반대편 팀의 id가 post되는 단계입니다. post된 이후, url:"game/{matchId}"로 리다이렉트되고, 게임이 시작됩니다.

Bodyraw (json)
json
{
"myTeamId":1,
"counterTeamId": 3,
"isHome": false
}
Example Request
curl
curl --location 'ec2-15-165-205-188.ap-northeast-2.compute.amazonaws.com:8080' \
--data '{
"myTeamId":1,
"counterTeamId": 3,
"isHome": false
}'
Example Response
json
{
  "inning": {
    "out": 0,
    "inningNumber": 1,
    "role": "수비",
    "cycle": "초"
  },
  "nextHitter": {
    "playerBattingOrder": 1,
    "teamId": 1,
    "playerName": "eve",
    "historyList": [
      {
        "id": 1,
        "actionName": "S",
        "strike": 2,
        "ball": 2,
        "out": 1
      },
      {
        "id": 2,
        "actionName": "H",
        "strike": 2,
        "ball": 2,
        "out": 1
      }
    ]
  },
  "leftTeam": {
    "name": "Captain",
    "totalScore": 5
  },
  "rightTeam": {
    "name": "Twins",
    "totalScore": 5
  },
  "pitcher": {
    "role": "Pitcher",
    "name": "Jung",
    "pitchCount": 39,
    "plateAppearances": 1,
    "hits": 0
  },
  "hitter": {
    "role": "Hitter",
    "name": "Jane",
    "pitchCount": 0,
    "plateAppearances": 1,
    "hits": 0
  },
  "teamLog": {
    "playerLog": [
      {
        "playerBattingOrder": 1,
        "teamId": 1,
        "playerName": "eve",
        "historyList": [
          {
            "id": 1,
            "actionName": "S",
            "strike": 2,
            "ball": 2,
            "out": 1
          },
          {
            "id": 2,
            "actionName": "H",
            "strike": 2,
            "ball": 2,
            "out": 1
          }
        ]
      },
      {
        "playerBattingOrder": 2,
        "teamId": 1,
        "playerName": "jung",
        "historyList": [
          {
            "id": 3,
            "actionName": "H",
            "strike": 2,
            "ball": 2,
            "out": 1
          }
        ]
      }
    ]
  }
}
No response headers
This request doesn't return any response headers

GETplayerListPopUp

ec2-15-165-82-124.ap-northeast-2.compute.amazonaws.com/game/1/playerListPopUp

각 팀의 모든 선수들의 타석, 안타, 아웃, 타율을 조회하는 팝업입니다.

Example Request
curl
curl --location 'ec2-15-165-205-188.ap-northeast-2.compute.amazonaws.com:8080/game/1/playerListPopUp'
Example Response
json
[
  {
    "teamName": "Captain",
    "user": false,
    "playerGameScore": [
      {
        "playerName": "eve",
        "plateAppearance": 2,
        "hits": 1,
        "out": 2,
        "average": 1
      },
      {
        "playerName": "jung",
        "plateAppearance": 5,
        "hits": 5,
        "out": 0,
        "average": 1
      }
    ]
  },
  {
    "teamName": "Twins",
    "user": false,
    "playerGameScore": []
  }
]
No response headers
This request doesn't return any response headers

GETdetailScorePopUp

ec2-15-165-82-124.ap-northeast-2.compute.amazonaws.com/game/1/detailScore

각 팀의 이닝별 상세 점수를 조회하는 팝업입니다.

Example Request
curl
curl --location 'ec2-15-165-205-188.ap-northeast-2.compute.amazonaws.com:8080/game/1/detailScore'
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers