Public
Documentation Settings

gameDuo

보스레이드 PVE 컨텐츠 서비스

Users

POST유저 생성

http://localhost:3000/user
  • 중복되지 않는 userId 생성
  • 생성된 userId 응답
Example Request
curl
curl --location --request POST 'http://localhost:3000/user'
201 Created
Example Response
json
{
  "userId": 15
}
X-Powered-By

Express

Content-Type

application/json; charset=utf-8

Content-Length

13

ETag

W/"d-dcOEC9HJ1U3tU5MR4ovpFDogt1M"

Date

Thu, 10 Nov 2022 10:04:05 GMT

Connection

keep-alive

Keep-Alive

timeout=5

GET유저 조회

http://localhost:3000/user/1
  • 해당 유저의 보스레이드 총 점수와 참여기록 응답
  • 예외처리
    • 유저 존재 유무 확인
    • 존재하는 유저의 레이드 기록 유무 확인
Example Request
curl
curl --location 'http://localhost:3000/user/1'
200 OK
Example Response
json
{
  "totalScore": 105,
  "bossRaidHistory": [
    {
      "raidRecordId": 1,
      "score": 0,
      "enterTime": "2022-11-09 16:11:08",
      "endTime": "2022-11-09 16:14:08"
    },
    {
      "raidRecordId": 5,
      "score": 0,
      "enterTime": "2022-11-09 19:15:06",
      "endTime": "2022-11-09 19:18:06"
    },
    {
      "raidRecordId": 15,
      "score": 0,
      "enterTime": "2022-11-09 16:55:21",
      "endTime": "2022-11-09 16:58:21"
    },
    {
      "raidRecordId": 24,
      "score": 85,
      "enterTime": "2022-11-09 17:56:23",
      "endTime": "2022-11-09 17:59:23"
    },
    {
      "raidRecordId": 28,
      "score": 20,
      "enterTime": "2022-11-09 18:03:23",
      "endTime": "2022-11-09 18:06:23"
    },
    {
      "raidRecordId": 31,
      "score": 0,
      "enterTime": "2022-11-09 21:14:22",
      "endTime": "2022-11-09 21:17:22"
    },
    {
      "raidRecordId": 32,
      "score": 0,
      "enterTime": "2022-11-09 21:17:27",
      "endTime": "2022-11-09 21:20:27"
    },
    {
      "raidRecordId": 33,
      "score": 0,
      "enterTime": "2022-11-10 13:39:53",
      "endTime": "2022-11-10 13:42:53"
    },
    {
      "raidRecordId": 34,
      "score": 0,
      "enterTime": "2022-11-10 13:43:34",
      "endTime": "2022-11-10 13:46:34"
    },
    {
      "raidRecordId": 35,
      "score": 0,
      "enterTime": "2022-11-10 18:45:37",
      "endTime": "2022-11-10 18:48:37"
    }
  ]
}
X-Powered-By

Express

Content-Type

application/json; charset=utf-8

Content-Length

998

ETag

W/"3e6-90t9XaHMc19qegg/x6PazTpCXWk"

Date

Thu, 10 Nov 2022 09:46:38 GMT

Connection

keep-alive

Keep-Alive

timeout=5

bossRaids

GET보스레이드 상태 조회

http://localhost:3000/bossRaid
  • 보스레이드 진행시 userId 함께 응답
  • 입장 가능 조건
    • 한번에 한 명의 유저만 보스레이드 진행 가능
    • 아무도 보스레이드를 시작한 기록이 없다면 시작 가능
    • 시작한 기록이 있다면 마지막으로 시작한 유저가 보스레이드를 종료했거나, 시작한 시간으로부터 레이드 제한시간만큼 경과시 시작 가능
Example Request
curl
curl --location 'http://localhost:3000/bossRaid'
200 OK
Example Response
json
{
  "canEnter": true
}
X-Powered-By

Express

Content-Type

application/json; charset=utf-8

Content-Length

17

ETag

W/"11-QoJ3ycPcoRQZyiM90u44mQbfOzY"

Date

Thu, 10 Nov 2022 10:05:57 GMT

Connection

keep-alive

Keep-Alive

timeout=5

POST보스레이드 시작

http://localhost:3000/bossRaid/enter
  • 보스레이드 시작시 중복되지 않는 raidRecordId 생성
  • 레이드 시작 가능 여부 isEntered로 응답
  • 예외처리
    • 정의된 level 외 입장 불가능
Bodyraw (json)
json
{
  "userId": 1,
  "level": 4
}
Example Request
curl
curl --location 'http://localhost:3000/bossRaid/enter' \
--data '{
  "userId": 1,
  "level": 0
}'
201 Created
Example Response
json
{
  "isEntered": true,
  "raidRecordId": 36
}
X-Powered-By

Express

Content-Type

application/json; charset=utf-8

Content-Length

36

ETag

W/"24-acV1K896zwSStY17DmkQGGfDqAQ"

Date

Thu, 10 Nov 2022 10:06:15 GMT

Connection

keep-alive

Keep-Alive

timeout=5