Giter VIP home page Giter VIP logo

desserts-server's Introduction

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": ""
}

desserts-server's People

Contributors

ahnteve avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.