Skip to content
kimsungwon edited this page Apr 2, 2024 · 22 revisions

Table of Contents

Create Review

Request

  • URL
HTTP Method URL
POST /api/v1/reviews
  • Query Parameters
Key Type Value Description
  • Headers
Key Value Description
Authorization Token from Mr.C server
  • Cookies
Key Value Description
mrcToken Token from Mr.C server
  • Body
{
    "title": "매드맥스 리뷰~",
    "movieName": "Mad Max",
    "content": "{review_content}",
}

Response

Success

  • Status code
    • 200
  • Body (empty)
{
    "review": {
      "id": 213,
      "userId": "{UUID v4}",
      "nickname": "신비로운 평론가 붉은 여우",
      "tag": "#MQ3B",
      "title": "매드맥스 리뷰~",
      "movieName": "Mad Max",
      "content": "{review_content}",
      "createdAt": "2023-04-02T15:08:00+09:00",
      "updatedAt": "2023-04-02T15:08:00+09:00"
	}
}

Fail

  • Status code
    • 4xx
    • 5xx
  • Body
{
    "messages": ["{error_message}"]
}

Get Review Detail

Request

  • URL
HTTP Method URL
GET /api/v1/reviews/{reviewId}
  • Query Parameters
Key Type Value Description
  • Headers
Key Value Description

Response

Success

  • Status code
    • 200
  • Body
{
    "review": {
      "id": 213,
      "userId": "{UUID v4}",
      "nickname": "신비로운 평론가 붉은 여우",
      "tag": "#MQ3B",
      "title": "매드맥스 리뷰~",
      "movieName": "Mad Max",
      "content": "{review_content}",
      "replyCount": 12,
      "createdAt": "2023-04-02T15:08:00+09:00",
      "updatedAt": "2023-04-02T15:08:00+09:00"
	}
}

Fail

  • Status code
    • 4xx
    • 5xx
  • Body
{
    "messages": ["{error_message}"]
}

List Reviews

Request

  • URL
HTTP Method URL
GET /api/v1/reviews
  • Query Parameters
Key Type Value Description
nickname string Keyword to search by user's nickname.
title string Keyword to search by review's title
movieName string Keyword to search by movie name.
sortBy string Sort criteria. Valid keys are createdAt, movieName. (Default: createdAt)
direction string Criteria for Listing Order. Can be asc or desc. (Default: desc)
pageOffset int32 Requested page number. (Default: 1)
pageSize int32 The maximum number of reviews to return per page. Acceptable values are 1 to 100, inclusive. (Default: 10)

If both movieName and userName values ​​are set, the result that satisfies both conditions is returned.

  • Headers
Key Value Description

Response

Success

  • Status code
    • 200
  • Body
{
  "reviews": [
    {
      "id": 123,
      "userId": "{UUID v4}",
      "nickname": "신비로운 평론가 붉은 여우",
      "tag": "#MQ3B",
      "title": "매드맥스 리뷰~",
      "movieName": "Mad Max",
      "content": "{review_content}",
      "replyCount": 12,
      "createdAt": "2023-04-02T15:08:00+09:00",
      "updatedAt": "2023-04-02T15:08:00+09:00"
    },
  ],
  "pagination": {
    "pageOffset": 1,
    "pageSize": 10,
    "totalEntryCount": 123,
    "totalPageCount": 13,
    "direction": "desc",
    "sortBy": "createdAt"
  },
  "filter": {
    "nickame": "foo", // If the value is not set, the key will also disappear
    "title": "매드 맥스", // If the value is not set, the key will also disappear
    "movieName": "bar" // If the value is not set, the key will also disappear
  }
}

The presence of fields in the resulting JSON is determined by whether the filter value is set.

Fail

  • Status code
    • 4xx
    • 5xx
  • Body
{
    "messages": ["{error_message}"]
}

Replace Review

Request

  • URL
HTTP Method URL
PUT /api/v1/reviews/{reviewId}
  • Query Parameters
Key Type Value Description
  • Headers
Key Value Description
Authorization Token from Mr.C server
  • Cookies
Key Value Description
mrcToken Token from Mr.C server
  • Body
{
    "movieName": "Mad Max",
    "title": "매드맥스 리뷰~",
    "content": "{review_content}",
}

Response

Success

  • Status code
    • 200
  • Body
{
    "review": {
      "id": 123,
      "userId": "{UUID v4}",
      "nickname": "신비로운 평론가 붉은 여우",
      "tag": "#MQ3B",
      "title": "매드맥스 리뷰~",
      "movieName": "Mad Max",
      "content": "{review_content}",
      "replyCount": 12,
      "createdAt": "2023-04-02T15:08:00+09:00",
      "updatedAt": "2023-04-02T15:08:00+09:00"
    }
}

Fail

  • Status code
    • 4xx
    • 5xx
  • Body
{
    "messages": ["{error_message}"]
}

Delete Review

Request

  • URL
HTTP Method URL
DELETE /api/v1/reviews/{reviewId}
  • Query Parameters
Key Type Value Description
  • Headers
Key Value Description
Authorization Token from Mr.C server
  • Cookies
Key Value Description
mrcToken Token from Mr.C server
  • Body (empty)

Response

Success

  • Status code
    • 200
  • Body (empty)

Fail

  • Status code
    • 4xx
    • 5xx
  • Body
{
    "messages": ["{error_message}"]
}

Create Review Reply

Request

  • URL
HTTP Method URL
POST /api/v1/reviews/{reviewId}/replies
  • Query Parameters
Key Type Value Description
  • Headers
Key Value Description
Authorization Token from Mr.C server
  • Cookies
Key Value Description
mrcToken Token from Mr.C server
  • Body
{
    "content": "{reply_content}",
}

Response

Success

  • Status code
    • 200
  • Body (empty)
{
    "reply": {
      "id": 213,
      "userId": "{UUID v4}",
      "nickname": "신비로운 평론가 붉은 여우",
      "tag": "#MQ3B",
      "content": "{reply_content}",
      "createdAt": "2023-04-02T15:08:00+09:00",
      "updatedAt": "2023-04-02T15:08:00+09:00"
    }
}

Fail

  • Status code
    • 4xx
    • 5xx
  • Body
{
    "messages": ["{error_message}"]
}

List Review Replies

Request

  • URL
HTTP Method URL
POST /api/v1/reviews/{reviewId}/replies
  • Query Parameters
Key Type Value Description
direction string Criteria for Listing Order. The sort order is createdAt. Can be asc or desc. (Default: desc)
pageOffset int32 Requested page number. (Default: 1)
pageSize int32 The maximum number of reviews to return per page. Acceptable values are 1 to 100, inclusive. (Default: 10)
  • Headers
Key Value Description

Response

Success

  • Status code
    • 200
  • Body
{
  "replies": [
    {
      "id": 123,
      "reviewId": 456,
      "userId": "{UUID v4}",
      "nickname": "신비로운 평론가 붉은 여우",
      "tag": "#MQ3B",
      "content": "{reply_content}",
      "createdAt": "2023-04-02T15:08:00+09:00",
      "updatedAt": "2023-04-02T15:08:00+09:00"
    },
  ],
  "pagination": {
    "pageOffset": 1,
    "pageSize": 10,
    "totalEntryCount": 123,
    "totalPageCount": 13,
    "direction": "desc",
  }
}

Fail

  • Status code
    • 4xx
    • 5xx
  • Body
{
    "messages": ["{error_message}"]
}

Replace Review Reply

Request

  • URL
HTTP Method URL
PUT /api/v1/reviews/{reviewId}/replies/{replyId}
  • Query Parameters
Key Type Value Description
  • Headers
Key Value Description
Authorization Token from Mr.C server
  • Cookies
Key Value Description
mrcToken Token from Mr.C server
  • Body
{
    "content": "{reply_content}",
}

Response

Success

  • Status code
    • 200
  • Body
{
    "reply": {
      "id": 213,
      "userId": "{UUID v4}",
      "nickname": "신비로운 평론가 붉은 여우",
      "tag": "#MQ3B",
      "content": "{reply_content}",
      "createdAt": "2023-04-02T15:08:00+09:00",
      "updatedAt": "2023-04-02T15:08:00+09:00"
    }
}

Fail

  • Status code
    • 4xx
    • 5xx
  • Body
{
    "messages": ["{error_message}"]
}

Delete Review Reply

Request

  • URL
HTTP Method URL
DELETE /api/v1/reviews/{reviewId}/replies/{replyId}
  • Query Parameters
Key Type Value Description
  • Headers
Key Value Description
Authorization Token from Mr.C server
  • Cookies
Key Value Description
mrcToken Token from Mr.C server
  • Body (empty)

Response

Success

  • Status code
    • 200
  • Body (empty)

Fail

  • Status code
    • 4xx
    • 5xx
  • Body
{
    "messages": ["{error_message}"]
}