Skip to content
Okhyeon Kim edited this page May 4, 2021 · 14 revisions

post 로그인

ip/login?code=12345

req

code

res
{
	name: 
	email:
	userId:
	token:
}

get 로그아웃

ip/logout

req

header authorization: bearer {token}

res

200ok


get 선수목록

ip/{teamName}

res

[
	{
		id: 1,
		name: 김광진,
		AVG: 3.2
	},
	{
		id: 2,
		name: 류현진,
		AVG: 3.3
	}
]

get 게임목록

ip/games

req

header authorization: bearer {token}

res

[
	{
		homeTeamName: marvel,
		awayTeamName: tigers
	},
	{
		homeTeamName: tigers,
		awayTeamName: twins
	}
]

patch 게임 시작

ip/games/{teamName}

req

header authorization: bearer {token}

res

{
	playTeam: captin,
	roundInfo: {
			round: 2,
			strike: 1,
			ball: 2,
			out: 1,
			1B: true,
			2B: false,
			3B: true
		},
	후공homeTeam: {
		teamName: captin,
		score: 1
		pitcher: {
				name: 최동원,
				pit: 39
			},
		hitter: {
				name: 류현진,
				AVG: 0.312,
				TPA: 2,
				hits(안타): 1
			},
		isOffense: true
	},
	선공awayTeam: {	},
	story: [볼(오래됨), 스트라이크]
}

error

경기 중 406


patch 게임 진행

ip/games

req

header authorization: bearer {token}

위에 res 그대로

res

200코드나 에러


get 스코어

ip/games/scores

req

header authorization: bearer {token}

res

{
	homeTeam: {
				teamName: marvel,
				scores: [1, 0, 0, 0]
				},
	awayTeam: {
				teamName: captin,
				scores: [1, 2, 2]
				},
}

get 멤버 별 스코어

ip/games/scores/{teamName}

req

header authorization: bearer {token}

res

[
	{
		id: 1,
		name: 김광진,
		TPA(타석): 1,
		hits: 1,
		out: 0
	},
	{
		id: 2,
		name: 류현진,
		TPA(타석): 1,
		hits: 0,
		out: 1
	}
]

Clone this wiki locally