πŸš€ JOURNEY πŸš€ - Polaris-Sopterm/Polaris-BACKEND Wiki

λͺ©μ°¨

1️⃣ μ—¬μ • 생성 API

Decription

여정을 μƒμ„±ν•©λ‹ˆλ‹€. USER κΆŒν•œμ΄ ν•„μš”ν•©λ‹ˆλ‹€. (λ‘œκ·ΈμΈν•œ μƒνƒœκ°€ μ•„λ‹ˆλΌλ©΄ μ—λŸ¬κ°€ λ°œμƒν•©λ‹ˆλ‹€.)

Request

EndPoint

POST /journey/v0

Header

application/json

Body Parameter

parameter Type Description
title string μ—¬μ • 제λͺ©
value1 string(enum) μ—¬μ • κ°€μΉ˜1
value2 string(enum) μ—¬μ • κ°€μΉ˜2(2λŠ” ν•„μˆ˜κ°€ μ•„λ‹™λ‹ˆλ‹€.)
date string(date) μ—¬μ • λͺ©ν‘œ λ‚ μ§œ(ν•΄λ‹Ή 여정에 λŒ€ν•œ μ£Όμ°¨ 정보λ₯Ό μ–»κΈ° μœ„ν•΄ λ‚ μ§œλ₯Ό μž…λ ₯λ°›μŠ΅λ‹ˆλ‹€.)

Response

{
  "idx": {integer},
  "title": {string},
  "value1": {string(enum)},
  "value2": {string(enum)},
}

2️⃣ μ—¬μ • μˆ˜μ • API

Decription

μ—¬μ •μ˜ 제λͺ©κ³Ό κ°€μΉ˜λ₯Ό μˆ˜μ •ν•  수 μžˆμŠ΅λ‹ˆλ‹€. USER κΆŒν•œμ΄ ν•„μš”ν•©λ‹ˆλ‹€. (λ‘œκ·ΈμΈν•œ μƒνƒœκ°€ μ•„λ‹ˆλΌλ©΄ μ—λŸ¬κ°€ λ°œμƒν•©λ‹ˆλ‹€.)

default 여정일 경우 제λͺ©λ§Œ μˆ˜μ • λΆˆκ°€ν•©λ‹ˆλ‹€.κ°€μΉ˜λŠ” μˆ˜μ •ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

Request

EndPoint

PATCH /journey/v0/:journeyIdx

Header

application/json

Body Parameter

parameter Type Description
title string μ—¬μ • 제λͺ©
value1 string(enum) μ—¬μ • κ°€μΉ˜1
value2 string(enum) μ—¬μ • κ°€μΉ˜2

Response

{
  "idx": {integer},
  "title": {string},
  "value1": {string(enum)},
  "value2": {string(enum)},
}

3️⃣ μ—¬μ • 제λͺ© λͺ©λ‘ 쑰회 API

Decription

μ—¬μ • 제λͺ© λͺ©λ‘μ„ λ°˜ν™˜ν•©λ‹ˆλ‹€. (λ‚ μ§œλ³„ ν•  일 μƒμ„±μ—μ„œ ν•„μš”ν•©λ‹ˆλ‹€.) USER κΆŒν•œμ΄ ν•„μš”ν•©λ‹ˆλ‹€. (λ‘œκ·ΈμΈν•œ μƒνƒœκ°€ μ•„λ‹ˆλΌλ©΄ μ—λŸ¬κ°€ λ°œμƒν•©λ‹ˆλ‹€.)

Request

EndPoint

GET /journey/v0/title?date

Header

application/json

Response

[ 
  {
    "idx": {integer},
    "title": {string},
    "year": {integer},
    "month": {integer},
    "weekNo": {integer},
    "userIdx": {integer},
  },
]

4️⃣ μ—¬μ • λͺ©λ‘ 쑰회 API

Decription

ν™ˆν™”λ©΄μ—μ„œ μ‚¬μš©μžκ°€ κ°€μž…ν•œ μ΄ν›„μ˜ μ£Όμ°¨ λ¦¬μŠ€νŠΈμ™€ μ—¬μ • λͺ©λ‘μ„ λ°˜ν™˜ν•©λ‹ˆλ‹€. (μ£Όμ°¨ λ¦¬μŠ€νŠΈλŠ” λ‹€μŒμ£Όμ™€ λ‹€λ‹€μŒμ£Όμ— λŒ€ν•œ μ£Όμ°¨ 정보도 ν¬ν•¨λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€. λ§ˆμ§€λ§‰ 2κ°œλŠ” λ‹€μŒμ£Ό, λ‹€λ‹€μŒμ£Όλ‘œ λ³€κ²½ν•΄μ•Ό ν•©λ‹ˆλ‹€.) USER κΆŒν•œμ΄ ν•„μš”ν•©λ‹ˆλ‹€. (λ‘œκ·ΈμΈν•œ μƒνƒœκ°€ μ•„λ‹ˆλΌλ©΄ μ—λŸ¬κ°€ λ°œμƒν•©λ‹ˆλ‹€.)

Request

EndPoint

GET /journey/v0?year=2021&month=05&weekNo=3

Header

Response

{
    "weekList": [
        {
            "year": {integer},
            "month": {integer},
            "weekNo": {integer}
        },
    ],
    "journeys": [
        {
            "idx": {integer},
            "title": {string},
            "year": {integer},
            "month": {integer},
            "weekNo": {integer},
            "userIdx": {integer},
            "value1": {string},
            "value2": {string},
            "toDos": [
                {
                    "idx": {integer},
                    "title": {string},
                    "date": {string},
                    "isTop": {boolean},
                    "isDone": {string}
                },
            ]
        },
    ]
}

5️⃣ μ—¬μ • μ‚­μ œ API

Decription

여정을 μ‚­μ œν•©λ‹ˆλ‹€. (λ‚ μ§œλ³„ ν•  일 μƒμ„±μ—μ„œ ν•„μš”ν•©λ‹ˆλ‹€.) USER κΆŒν•œμ΄ ν•„μš”ν•©λ‹ˆλ‹€. (λ‘œκ·ΈμΈν•œ μƒνƒœκ°€ μ•„λ‹ˆλΌλ©΄ μ—λŸ¬κ°€ λ°œμƒν•©λ‹ˆλ‹€.)

Request

EndPoint

DELETE /journey/v0/:journeyIdx

Header

application/json

Response

μ˜ˆμ‹œ

200

{
  "isSuccess": true
},