Repository navigation
API
Jeong InHo edited this page May 12, 2021
·
14 revisions
POST ip/login?code={asdf3421}
query params
code
200 ok
{
name:
email:
userId:
token:
}400 bad request
{
"timestamp": "2021-05-12T08:17:36.148+00:00",
"status": 400,
"error": "Bad Request",
"message": "OAuth 인증에 실패 했습니다.",
"path": "/login"
}ip/logout
header
Authorization: Bearer {token}
200ok
ip/members/{teamName}
[
{
id: 1,
name: 김광진,
AVG: 0.32
},
{
id: 2,
name: 류현진,
AVG: 0.33
}
]ip/games
header
Authorization: Bearer {token}
[
{
homeTeamName: marvel,
awayTeamName: tigers
},
{
homeTeamName: tigers,
awayTeamName: twins
}
]ip/games/{teamName}
header
Authorization: Bearer {token}
{
playTeam: captin,
roundInfo: {
round: 2,
strike: 1,
ball: 2,
out: 1,
firstBase: true,
secondBase: false,
thirdBase: true
},
후공homeTeam: {
teamName: captin,
score: 1
pitcher: {
name: 최동원,
pit: 39
},
hitter: {
name: 류현진,
AVG: 0.312,
TPA: 2,
hits(안타): 1
},
isOffense: true
},
선공awayTeam: { },
story: [볼(오래됨), 스트라이크]
}
{
playTeam: captin,
roundInfo: {
round: 2,
strike: 1,
ball: 2,
out: 1,
firstBase: true,
secondBase: false,
thirdBase: true
},
offenceTeam: {
teamName: captin,
score: 1
hitter: {
name: 류현진,
AVG: 0.312,
TPA: 2,
hits(안타): 1
}
},
defenseTeam: {
teamName: Marvel,
score: 5
pitcher: {
name: 최동원,
pit: 39
}
},
story: [볼(오래됨), 스트라이크]
}ip/games
header
Authorization: Bearer {token}
위에 res 그대로
200코드나 에러
ip/games/scores
header
Authorization: Bearer {token}
{
homeTeam: {
teamName: marvel,
scores: [1, 0, 0, 0]
},
awayTeam: {
teamName: captin,
scores: [1, 2, 2]
},
}ip/games/scores/{teamName}
header
Authorization: Bearer {token}
[
{
id: 1,
name: 김광진,
TPA(타석): 1,
hits: 1,
out: 0
},
{
id: 2,
name: 류현진,
TPA(타석): 1,
hits: 0,
out: 1
}
]