withyeah / desserts-server

Desserts server๐Ÿฐ

Home Page:http://ec2-54-180-88-127.ap-northeast-2.compute.amazonaws.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

desserts-server

POST /session

summary: ์ž„์‹œ ๋กœ๊ทธ์ธ ๊ฒฐ๊ณผ๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.
responses:
  200:
    schema:
      type: object
      properties:
        permission:
          type: boolean
{
    "permission": true
}

GET /questions

summary: ์งˆ๋ฌธ ๋ฆฌ์ŠคํŠธ๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.
responses:
  200:
    schema:
      type: array
        items:
          id:
            type: number
          content:
            type: string
          type:
            type: string
[
  {
      "id": 6,
      "content": "์˜ค๋Š˜ ์™ธ์ถœ์„ ํ–ˆ๋‚˜์š”?",
      "type": "positive"
  },
  {
      "id": 3,
      "content": "๋‚ด์ผ์ด ๊ธฐ๋Œ€๋˜๋‚˜์š”?",
      "type": "positive"
  },
  {
      "id": 64,
      "content": "์ผ์ƒ์„ ํƒˆ์ถœํ•˜๊ณ  ์‹ถ์€๊ฐ€์š”?",
      "type": "negative"
  },
  {
      "id": 105,
      "content": "๊ฒฐ์ •ํ•˜๋Š” ๊ฒƒ์ด ๋„ˆ๋ฌด ์–ด๋ ต๋‹ค๊ณ  ๋Š๊ปด์ง€๋‚˜์š”?",
      "type": "negative"
  },
  {
      "id": 121,
      "content": "์˜ค๋Š˜ '์‚ฌ๋ž‘ํ•ด'๋ผ๊ณ  ๋งํ•ด๋ณด์•˜๋‚˜์š”?",
      "type": "normal"
  }
]

POST /results

summary: ์งˆ๋ฌธ์˜ ๊ฒฐ๊ณผ๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.
requestBody:
  required: true
  content:
    application/json:
      schema:
        properties:
          results: array
          items:
            type: object
            properties:
              id:
                type: number
              score:
                type: number

responses:
  200:
    schema:
      type: object
      properties:
        id:
          type: number
        score:
          type: number
        creator:
          type: number
        createAt:
          type: string

requestBody

{ results:
  [ { id: 1, score: 1 },
    { id: 2, score: 0 },
    { id: 3, score: 1 },
    { id: 4, score: -1 },
    { id: 5, score: 1 }
  ]
}

responses

{
    "creator": 1,
    "score": 2,
    "id": 1,
    "createAt": "2019-07-06T07:58:06.000Z"
}

GET /results/week

summary: ํ•œ ์ฃผ์˜ ์ ์ˆ˜๋ฅผ ๊ฐ€์ ธ์˜ต๋‹ˆ๋‹ค. ๋ฐ์ดํ„ฐ๊ฐ€ ์—†์œผ๋ฉด -1์„ ํ‘œ์‹œํ•ฉ๋‹ˆ๋‹ค.
requestQuery:
  date: string
responses:
  200:
    schema:
      type: object
      properties:
        month: number
        week: number
        results: array
          items:
            type: number

// example: GET /results/week?date=2019-07-06
{
    "month": 7,
    "week": 1,
    "result": [
        -1,
        -1,
        5,
        4,
        3,
        7,
        1
    ]
}

GET /results/month

summary: ํ•œ ๋‹ฌ ๋™์•ˆ์˜ ์ ์ˆ˜๋ฅผ ๊ฐ€์ ธ์˜ต๋‹ˆ๋‹ค. ๋ฐ์ดํ„ฐ๊ฐ€ ์—†์œผ๋ฉด -1์„ ํ‘œ์‹œํ•ฉ๋‹ˆ๋‹ค.
requestQuery:
  date: string
responses:
  200:
    schema:
      type: object
      properties:
        month: number
        year: number
        results: array
          items:
            type: number
// example: GET /results/month?date=2019-07-06
{
    "month": 7,
    "year": 2019,
    "result": [
        -1,
        -1,
        5,
        4,
        3,
        7,
        1,
        -1,
        -1,
        -1,
        -1,
        -1,
        -1,
        -1,
        -1,
        -1,
        -1,
        -1,
        -1,
        -1,
        -1,
        -1,
        -1,
        -1,
        -1,
        -1,
        -1,
        -1,
        -1,
        -1,
        -1
    ]
}

GET /insights

summary: ํ•˜๋‚˜์˜ ์ธ์‚ฌ์ดํŠธ๋ฅผ ๊ฐ€์ ธ์˜ต๋‹ˆ๋‹ค.
requestQuery:
  user: number
    description: ์‚ฌ์šฉ์ž์˜ ๊ณ ์œ  ์•„์ด๋””์ž…๋‹ˆ๋‹ค
responses:
  200:
    schema:
      type: object
      properties:
        id: number
        content: string
        code: string
        img: string
{
    "id": 14,
    "content": "์ €๋ฒˆ ๋‹ฌ์— ๋น„ํ•ด<br />์ด๋ฒˆ ๋‹ฌ์€ ์กฐ๊ธˆ ์šฐ์šธํ•ด ๋ณด์—ฌ์š”<br />์ฐฝ๋ฌธ์„ ์—ด๊ณ  ๋ฐ”๊นฅ ๊ณต๊ธฐ๋ฅผ ๋งˆ์…”๋ณผ๊นŒ์š”?",
    "code": "BBAA",
    "img": ""
}

About

Desserts server๐Ÿฐ

http://ec2-54-180-88-127.ap-northeast-2.compute.amazonaws.com/


Languages

Language:TypeScript 100.0%