최초작성: 11월 30일 (화)
업데이트:
1️⃣ User최초 가입시Request POST /userResponse 로그인시Request GET /userResponse Request PUT /user/info/{user_id}Response Request GET /user/{user_id}Response Request GET /user/nickname/{nickname}Response Request GET /user/ingredient/{user_Id}ResponseRequest POST /user/ingredient/{user_id}ResponseRequest DELETE /user/ingredient/{user_id}ResponseRequest GET /user/bookmark/{user_id}Response Request POST /user/bookmarkResponseRequest DELETE /user/bookmarkResponseRequest ResponseRequest Response2️⃣ ReviewRequest POST /reviewResponse Request GET /reviewResponse Request DELETE /review/idResponseRequest PUT /review/idResponse 3️⃣ Cocktail (전체 완료)4️⃣ IngredientRequest GET /ingredientResponse Request POST /ingredientResponse Request DELETE /ingredient/idRequest PUT /ingredient/idResponse5️⃣ 남은 작업들
1️⃣ User
oauth 유저 가입, 로그인 api
최초 가입시
Request POST /user
필드명 | 데이터타입 | 설명 |
nickname | String | 닉네임 |
isMan | boolean | 성별
true = 남자
false = 여자 |
age | int | 나이 |
mbti | String | MBTI |
{ "nickname": "루돌프", "isMan": true, "age": 28, "mbti": "ENFJ" }
Response
필드명 | 데이터타입 | 설명 |
id | Long | userId |
nickname | String | 닉네임 |
age | int | 나이 |
mbti | String | MBTI |
ingredients | List | 재료 |
isMan | boolean | 성별
true = 남자
false = 여자 |
{ "data": { "id": 1, "nickname": "루돌프", "age": 28, "mbti": "ENFJ", "ingredients": [], "isMan": false }, "serverDateTime": "2021-12-14 15:55:54" }
로그인시
Request GET /user
header에 token 필드에 발급된 토큰 넣어서 보내주세요
Response
필드명 | 데이터타입 | 설명 |
id | Long | userId |
nickname | String | 닉네임 |
age | int | 나이 |
mbti | String | MBTI |
ingredients | List | 재료 |
isMan | boolean | 성별
true = 남자
false = 여자 |
{ "data": { "id": 1, "nickname": "루돌프", "age": 28, "mbti": "ENFJ", "ingredients": [], "isMan": true }, "serverDateTime": "2021-12-14 15:55:54" }

유저의 정보수정
Request PUT /user/info/{user_id}
필드명 | 데이터타입 | 설명 |
nickname | String | 닉네임 |
isMan | boolean | 성별
true = 남자
false = 여자 |
age | int | 나이 |
mbti | String | MBTI |
{ "nickname": "루돌프2", "isMan": false, "age": 29, "mbti": "INFJ" }
Response
필드명 | 데이터타입 | 설명 |
nickname | String | 닉네임 |
isMan | boolean | 성별
true = 남자
false = 여자 |
age | int | 나이 |
mbti | String | MBTI |
{ "data": "회원정보가 수정되었습니다", "serverDateTime": "2021-12-14 16:51:01" } 회원가입 시 nickname이 중복된 경우 "message": "이미 존재하는 닉네임입니다.", "path": "/user/join" "status": 500, "error": "Internal Server Error",

유저의 아이디 조회 🔆
Request GET /user/{user_id}
필드명 | 데이터타입 | 설명 |
userId | Long | 유저 아이디 |
/user/1 // userId 가 1인 유저를 조회 ❤ /user/2 // 없는 userId 를 조회하는 경우
Response
필드명 | 데이터타입 | 설명 |
nickname | String | 닉네임 |
age | int | 나이 |
mbti | string | MBTI |
mbti | String | MBTI |
imageUrl | String | 이미지 주소 |
ingredients | Object[] | 가지고 있는 재료 |
isMan | boolean | 성별
true = 남자
false = 여자 |
{ "data": { "nickname": "루돌프", "age": 28, "mbti": "ENFJ", "ingredients": [], "isMan": true }, "serverDateTime": "2021-12-13 21:30:33" } ❤ "status": 500, "error": "Internal Server Error", "message": "존재하지 않는 회원입니다."

유저의 닉네임 확인 🔆
Request GET /user/nickname/{nickname}
필드명 | 데이터타입 | 설명 |
nickname | String | 닉네임 |
/user/nickname/루돌프 ❤ /user/nickname/징크스 // "루돌프"는 이미 존재하고 "징크스"는 존재 하지 않음.
Response
필드명 | 데이터타입 | 설명 |
can | boolean | 사용 가능한 닉네임인지 true, false 반환 |
{ "data": { "can": false }, "serverDateTime": "2021-12-13 17:33:36" } ❤ { "data": { "can": true }, "serverDateTime": "2021-12-13 17:33:36" }

내 술장고 재료 조회
Request GET /user/ingredient/{user_Id}

Response

술장고 재료 추가
Request POST /user/ingredient/{user_id}
body {
[ 1, 2 ]
}
재료 1,2 를 유저에 담아줌.

Response

술장고 재료 삭제
Request DELETE /user/ingredient/{user_id}


Response

북마크 검색 🔆
Request GET /user/bookmark/{user_id}
필드명 | 데이터타입 | 설명 |
/user/bookmark/1 ❤ /user/bookmark/2 1 회원 존재, 2 라는 회원ID 없음
Response
필드명 | 데이터타입 | 설명 |
id | Long | bookmark ID |
name | String | 칵테일 이름 |
imageUrl | String | 칵테일 사진URL |
{ "data": [ { "id": 2, "name": "2번 칵테일", "imageUrl": null }, { "id": 1, "name": "1번 칵테일", "imageUrl": null } ], "serverDateTime": "2021-12-14 03:07:25" } ❤ "status": 500, "error": "Internal Server Error", "message": "존재하지 않는 회원입니다.",

북마크 추가 🔆
Request POST /user/bookmark
필드명 | 데이터타입 | 설명 |
cocktailId | Long | 칵테일 아이디 |
{ "userId": 1, "cocktailId": 1 }
Response
필드명 | 데이터타입 | 설명 |
{ "data": { "user": { "id": 1, "name": "나상원", "password": null, "nickname": "루돌프", "imageUrl": null, "age": 28, "mbti": "ENFJ", "reviews": [], "ingredients": [], "cocktails": [ { "id": 1, "name": "1번 칵테일", "volumes": [], "themes": [], "reviews": [], "recipe": "[앙고스투라 비터 45]", "imageUrl": null, "youtubeLink": null, "likes": 1, "totalRating": 0.0 } ], "man": true } }, "serverDateTime": "2021-12-14 03:16:19" }

북마크 삭제 🔆
Request DELETE /user/bookmark
필드명 | 데이터타입 | 설명 |
userId | String | 유저 아이디 |
{ "userId": 1, "cocktailId": 1 }
Response
필드명 | 데이터타입 | 설명 |
{ "data": "bookmark Deleted successfully", "serverDateTime": "2021-12-14 03:33:31" }

로그인 (시큐리티 구현 시)
Request
Response
{ // set-cookie: token ?? user: User{}, tokenId: token }

로그아웃 (시큐리티 구현 시)
Request
POST /log-out
Response

2️⃣ Review
기능: 리뷰 작성 🔆
설명:
Request POST /review
KEY | VALUE | CONTENT TYPE |
file | 파일이름(google.jpg) | ㅤ |
request | {
"userId": 2,
"cocktailId": 1,
"url": "google.png",
"description": "이번 칵테일은 먹을만 하네요",
"rating": 2
} | application/json |
필드명 | 데이터타입 | 설명 |
userId | Long | 사용자 id |
cocktailId | Long | 칵테일 id |
url | String | 리뷰 사진 url |
description | String | 한 줄 리뷰 |
rating | int | 점수 |
// form-data 형식으로 보내기! { "userId": 2, "cocktailId": 1, "url": "Alexander.png", "description": "이번 칵테일은 먹을만 하네요", "rating": 2 }
Response
필드명 | 데이터타입 | 설명 |
reviewId | Long | ㅤ |
userId | Long | ㅤ |
cocktailId | Long | ㅤ |
url | string | 리뷰 사진 url |
description | String | ㅤ |
rating | int | ㅤ |
serverDateTime | LocalDateTime | ㅤ |
{ "data": { "reviewId": 2, "userId": 1, "cocktailId": 1, "url": "https://team15-image-bucket.s3.ap-northeast-2.amazonaws.com/google.jpg", "description": "이번 칵테일은 먹을만 하네요", "rating": 2 }, "serverDateTime": "2021-12-16 02:27:09" } // 양자택일의 문제... { "data": "리뷰가 생성되었습니다.", "serverDateTime": "2021-12-15 07:01:09" }
기능: 리뷰 조회 🔆
설명: 전체 조회, 사용자 ID 기반 조회, 칵테일 ID 기반 조회
Request GET /review
GET /review GET /review/id (id에 숫자만 넣으시면 됩니다) GET /review/?cocktailId='여기' ('여기' 부분에 숫자를 넣으시면 됩니다)
Response
필드명 | 데이터타입 | 설명 |
reviewId | Long | ㅤ |
userId | Long | ㅤ |
cocktailId | Long | ㅤ |
url | string | 리뷰 사진 url |
description | String | ㅤ |
rating | int | ㅤ |
serverDateTime | LocalDateTime | ㅤ |
nickname | String | ㅤ |
cocktailName | String | ㅤ |
# 전체 검색 { "data": [ { "reviewId": 1, "userId": 1, "cocktailId": 3, "url": "https://team15-image-bucket.s3.ap-northeast-2.amazonaws.com/googletest.jpg", "description": "이번 칵테일은 먹을만 하네요", "rating": 2, "nickname": "오재욱", "cocktailName": "쿠바리브레" }, { "reviewId": 2, "userId": 1, "cocktailId": 1, "url": "https://team15-image-bucket.s3.ap-northeast-2.amazonaws.com/googletest.jpg", "description": "이번 칵테일은 먹을만 하네요", "rating": 2, "nickname": "오재욱", "cocktailName": "쿠바리브레" }, { "reviewId": 3, "userId": 1, "cocktailId": 2, "url": "https://team15-image-bucket.s3.ap-northeast-2.amazonaws.com/googletest.jpg", "description": "이번 칵테일은 먹을만 하네요", "rating": 2, "nickname": "오재욱", "cocktailName": "쿠바리브레" } ], "serverDateTime": "2021-12-18 22:02:39" } # 사용자 ID 기반 검색 { "data": [ { "reviewId": 3, "userId": 2, "cocktailId": 1, "url": "https://team15-image-bucket.s3.ap-northeast-2.amazonaws.com/Alexander.jpg", "description": "이번 칵테일은 먹을만 하네요", "rating": 2 "nickname": "오재욱", "cocktailName": "쿠바리브레" }, { "reviewId": 4, "userId": 2, "cocktailId": 2, "url": "https://team15-image-bucket.s3.ap-northeast-2.amazonaws.com/Alexander.jpg", "description": "이번 칵테일은 먹을만 하네요", "rating": 2 "nickname": "오재욱", "cocktailName": "쿠바리브레" } ], "serverDateTime": "2021-12-15 07:00:26" }
기능: 리뷰 삭제 🔆
설명:
Request DELETE /review/id
DELETE /review/id
Response
{ "data": "리뷰가 삭제되었습니다.", "serverDateTime": "2021-12-15 07:01:09" }
기능: 리뷰 수정 🔆
설명:
Request PUT /review/id
필드명 | 데이터타입 | 설명 |
url | string | 리뷰 사진 url |
description | String | ㅤ |
rating | int | ㅤ |
ㅤ | ㅤ | ㅤ |
PUT /review/id { "url": "수정된 사진 url", "description": "수정되었습니다", "rating": 4 }
Response
필드명 | 데이터타입 | 설명 |
url | string | 리뷰 사진 url |
description | String | ㅤ |
rating | int | ㅤ |
serverDateTime | LocalDateTime | ㅤ |
{ "data": { "rating": 4, "description": "수정되었습니다", "url": "수정된 사진 url" }, "serverDateTime": "2021-12-15 07:01:16" }
3️⃣ Cocktail (전체 완료)
기능: 칵테일 검색 🔆
설명:
//───── request ────── GET /cocktail/name?name= GET /cocktail/theme?mainCategory={}&subCategory={} // GET /칵테일/대분류/소분류 //───── response ────── response body: { cocktails: [{ id, name, type }, ..] }

기능: 칵테일 상세 정보 🔆
설명:
//───── request ────── GET /cocktail/id?id= //───── response ────── 상세 정보 전송 response body: { cocktails: 모든 상세 정보 [{}] }

기능: 칵테일 전체 조회 🔆
설명:
//───── request ────── GET /cocktail //───── response ────── response body: { cocktails: 전체 칵테일[] }

기능: 칵테일 정보 저장 🔆
설명:
//───── request ────── POST /cocktail request body: { name: STRING, recipe: STRING, type: STRING, } //───── response ────── 상세 정보 전송 response body: { message }

기능: 칵테일 삭제 🔆
설명:
//───── request ────── DELETE /cocktail/{name} //───── response ────── 상세 정보 전송 response body: { message }
4️⃣ Ingredient
기능: 단일 재료 기반 검색 🔆
설명: 전체 재료 검색, id 기반 검색, 이름 기반 검색
Request GET /ingredient
GET /ingredient GET /ingredient/id GET /ingredient/name
Response
필드명 | 데이터타입 | 설명 |
ingredientId | Long | ㅤ |
ingredientName | String | ㅤ |
cocktails | List<Cocktail> | ㅤ |
type | Long | ㅤ |
isAlcohol | string | 리뷰 사진 url |
measure | String | ㅤ |
serverDateTime | LocalDateTime | ㅤ |
# 전체 검색 [ { "ingredientId": 1, "ingredientName": "lemon", "cocktails": [], "type": "https://team15-image-bucket.s3.ap-northeast-2.amazonaws.com/Alexander.jpg", "measure": "레몬의 껍질을 잘 벗겨주세요", "alcohol": false }, { "ingredientId": 2, "ingredientName": "수정해보자 재료", "cocktails": [], "type": "https://team15-image-bucket.s3.ap-northeast-2.amazonaws.com/Alexander.jpg", "measure": "수정해보자 껍질을 잘 벗겨주세요", "alcohol": false } ] # id 기반 리뷰 검색 { "data": { "ingredientId": 1, "ingredientName": "lemon", "cocktails": [], "type": "https://team15-image-bucket.s3.ap-northeast-2.amazonaws.com/Alexander.jpg", "measure": "레몬의 껍질을 잘 벗겨주세요", "alcohol": false }, "serverDateTime": "2021-12-15 07:02:11" } # 이름 기반 리뷰 검색 { "data": { "ingredientId": 1, "ingredientName": "lemon", "cocktails": [], "type": "https://team15-image-bucket.s3.ap-northeast-2.amazonaws.com/Alexander.jpg", "measure": "레몬의 껍질을 잘 벗겨주세요", "alcohol": false }, "serverDateTime": "2021-12-15 07:02:11" }
기능: 재료 추가 🔆
설명:
Request POST /ingredient
필드명 | 데이터타입 | 설명 |
ingredientName | String | ㅤ |
cocktails | List<Cocktail> | ㅤ |
type | Long | ㅤ |
isAlcohol | string | 리뷰 사진 url |
measure | String | ㅤ |
{ "ingredientName": "lemon", "cocktails":[], "type": "https://team15-image-bucket.s3.ap-northeast-2.amazonaws.com/Alexander.jpg", "isAlcohol": false, "measure": "레몬의 껍질을 잘 벗겨주세요", }
Response
필드명 | 데이터타입 | 설명 |
ingredientId | Long | ㅤ |
ingredientName | String | ㅤ |
cocktails | List<Cocktail> | ㅤ |
type | Long | ㅤ |
isAlcohol | string | 리뷰 사진 url |
measure | String | ㅤ |
serverDateTime | LocalDateTime | ㅤ |
{ "data": { "ingredientId": 1, "ingredientName": "후추", "type": "herb", "measure": "레몬의 껍질을 잘 벗겨주세요", "alcohol": false }, "serverDateTime": "2021-12-15 07:01:59" }
기능: 재료 삭제 🔆
설명:
Request DELETE /ingredient/id
//───── request ────── DELETE /ingredient/id //───── response ────── { "data": "재료가 삭제되었습니다.", "serverDateTime": "2021-12-15 07:02:04" }
기능: 재료 수정 🔆
설명:
Request PUT /ingredient/id
필드명 | 데이터타입 | 설명 |
ingredientName | String | ㅤ |
cocktails | List<Cocktail> | ㅤ |
type | Long | ㅤ |
isAlcohol | string | 리뷰 사진 url |
measure | String | ㅤ |
{ "ingredientName": "수정해보자 재료", "cocktails": [], "type": "https://team15-image-bucket.s3.ap-northeast-2.amazonaws.com/Alexander.jpg", "measure": "수정해보자 껍질을 잘 벗겨주세요", "alcohol": true }
Response
필드명 | 데이터타입 | 설명 |
ingredientName | String | ㅤ |
cocktails | List<Cocktail> | ㅤ |
type | Long | ㅤ |
isAlcohol | string | 리뷰 사진 url |
measure | String | ㅤ |
serverDateTime | LocalDateTime | ㅤ |
{ "data": { "ingredientName": "수정해보자 재료", "cocktails": [], "type": "https://team15-image-bucket.s3.ap-northeast-2.amazonaws.com/Alexander.jpg", "measure": "수정해보자 껍질을 잘 벗겨주세요", "alcohol": false }, "serverDateTime": "2021-12-15 07:02:07" }
5️⃣ 남은 작업들
// 실시간 대시보드 (인기순) Recipe // 우선순위 하 // Comment // Comment 수정 // 우선순위 하