# Review API

## Delete

<mark style="color:red;">`DELETE`</mark> `/review/delete`

작성 리뷰 삭제

#### Path Parameters

| Name                                 | Type   | Description |
| ------------------------------------ | ------ | ----------- |
| id<mark style="color:red;">\*</mark> | String | Review Id   |

#### Headers

| Name                                       | Type   | Description |
| ------------------------------------------ | ------ | ----------- |
| cookie\*<mark style="color:red;">\*</mark> | String | accessToken |

{% tabs %}
{% tab title="200: OK Response review delete success" %}

```javascript
{
  "data" : null,
  "message": "successfully delete"
}
```

{% endtab %}

{% tab title="401: Unauthorized Response unauthorized request" %}

```javascript
{
  "data" : null,
  "message": "unauthorized Request"
}
```

{% endtab %}

{% tab title="500: Internal Server Error Response server error" %}

```javascript
{
    "data" : null,
    "message" : "server error"
}
```

{% endtab %}
{% endtabs %}

## Edit

<mark style="color:purple;">`PATCH`</mark> `/review/edit`

작성한 리뷰 수정

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| id   | String | Review Id   |

#### Headers

| Name                                       | Type   | Description |
| ------------------------------------------ | ------ | ----------- |
| cookie\*<mark style="color:red;">\*</mark> | String | accessToken |

#### Request Body

| Name                                    | Type   | Description  |
| --------------------------------------- | ------ | ------------ |
| image                                   | String | image file   |
| title<mark style="color:red;">\*</mark> | String | review title |
| text<mark style="color:red;">\*</mark>  | String | review text  |

{% tabs %}
{% tab title="200: OK Response review edit success" %}

```javascript
{
  "review" : [
      { 
        "id" : PK,
        "title" : "사랑스런 기분이 드네요.",
        "text" : "사랑스런 영화를 보니...",
        "image" : "content main image",
        "content_name" : "love",
        "content_category" : "사랑"
        "like" : 33
      },...
  ],
  "message" : "successfully edit a review"
}
```

{% endtab %}

{% tab title="401: Unauthorized Response unauthorized request" %}

```javascript
{
  "data" : null,
  "message": "unauthorized Request"
}
```

{% endtab %}

{% tab title="500: Internal Server Error Response server error" %}

```javascript
{
    "data" : null,
    "message" : "server error"
}
```

{% endtab %}
{% endtabs %}

## Writing

<mark style="color:green;">`POST`</mark> `/review/writing`

리뷰 작성 페이지

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| id   | String | Review Id   |

#### Headers

| Name                                       | Type   | Description |
| ------------------------------------------ | ------ | ----------- |
| cookie\*<mark style="color:red;">\*</mark> | String | accessToken |

#### Request Body

| Name                                    | Type   | Description  |
| --------------------------------------- | ------ | ------------ |
| image                                   | String | image file   |
| title<mark style="color:red;">\*</mark> | String | review title |
| text<mark style="color:red;">\*</mark>  | String | review text  |

{% tabs %}
{% tab title="201: Created Response review writing success" %}

```javascript
{
  "review" : [
      { 
        "id" : PK,
        "title" : "사랑하고 싶어졌어요.",
        "text" : "사랑스런 영화를 보니...",
        "image" : "content main image",
        "content_name" : "love",
        "content_category" : "사랑"
        "like" : 33
      },...
  ],
  "message" : "successfully written a review"
}
```

{% endtab %}

{% tab title="500: Internal Server Error Response server error" %}

```javascript
{
    "data" : null,
    "message" : "server error"
}
```

{% endtab %}

{% tab title="401: Unauthorized Response unauthorized request" %}

```javascript
{
  "data" : null,
  "message": "unauthorized Request"
}
```

{% endtab %}
{% endtabs %}

## My List

<mark style="color:blue;">`GET`</mark> `/review/mylist`

내가 작성한 리뷰 목록 페이지

#### Headers

| Name                                       | Type   | Description |
| ------------------------------------------ | ------ | ----------- |
| cookie\*<mark style="color:red;">\*</mark> | String | accessToken |

{% tabs %}
{% tab title="200: OK Response review my list OK" %}

```javascript
{
  "reviewlist" : [
      { 
        "id" : PK,
        "title" : "사랑하고 싶어졌어요.",
        "text" : "사랑스런 영화를 보니...",
        "image" : "content main image",
        "content_name" : "love",
        "content_category" : "사랑"
        "like" : 33
      },...
  ],
  "message" : "successfully review my list"
}
```

{% endtab %}

{% tab title="500: Internal Server Error Response server error" %}

```javascript
{
    "data" : null,
    "message" : "server error"
}
```

{% endtab %}
{% endtabs %}

## Likes List

<mark style="color:blue;">`GET`</mark> `/review/likeslist`

내가 좋아요한 리뷰 목록 페이지

#### Headers

| Name                                       | Type   | Description |
| ------------------------------------------ | ------ | ----------- |
| cookie\*<mark style="color:red;">\*</mark> | String | accessToken |

{% tabs %}
{% tab title="200: OK Response likes list page OK" %}

```javascript
{
  "likeslist" : [
      { 
        "id" : PK,
        "title" : "힐링이 많이 되었습니다.",
        "text" : "추천을 받아 읽어보았는데...",
        "image" : "content main image",
        "content_name" : "지금이 기회다",
        "content_category" : "도전",
        "like" : 5
      },...
  ],
  "message" : "successfully review show all"
}
```

{% endtab %}

{% tab title="500: Internal Server Error Response server error" %}

```javascript
{
    "data" : null,
    "message" : "server error"
}
```

{% endtab %}
{% endtabs %}

## Review

<mark style="color:blue;">`GET`</mark> `/review`

모든 리뷰 리스트 조회

{% tabs %}
{% tab title="200: OK Response review show all OK" %}

```javascript
{
  "data" : [
      { 
        "id" : PK,
        "title" : "힐링이 많이 되었습니다.",
        "text" : "추천을 받아 읽어보았는데...",
        "image" : "content main image",
        "content_name" : "지금이 기회다",
        "content_category" : "도전"
        "like" : 5
      },...
  ],
  "message" : "successfully review show all"
}
```

{% endtab %}

{% tab title="500: Internal Server Error Response server error" %}

```javascript
{
    "data" : null,
    "message" : "server error"
}
```

{% endtab %}
{% endtabs %}
