더 필요한 게 있으면 추가해 놓겠음
예시니까 대충 저런 게 필요하다… 정도
/api/auth/signup
{ "username": "string", "password": "string" }{ "message": "Signup successful", "userId": "string" }/api/auth/login
{ "username": "string", "password": "string" }{ "message": "Login successful", "token": "string" }/api/upload
form-data (이미지 파일 포함){ "message": "Upload successful", "imageUrl": "string" }/api/prediction
응답:
[
{
"id": "string",
"percentage": "string",
"name": "string",
"description": "string",
"image": "string",
"candidates": [
{
"id": "string",
"rank": "number",
"percentage": "string",
"name": "string",
"description": "string",
"image": "string",
"ingredient": "string",
"additives": "string",
"dopingInfo": "string",
"manufacturer": "string"
}
...]
}
...]
후보들 top5까지 줘야함. 예시:
[
{
id: '1',
image: '<https://via.placeholder.com/50>',
candidates: [
{
id: '1-1',
**r**ank: 1,
percentage: '62%',
name: '가나메드정 Ganamed Tab.',
description: '기타의 소화기관용약(239)',
image: '<https://via.placeholder.com/50>',
ingredient: '성분 정보 A',
additives: '첨가제 정보 A',
dopingInfo: '도핑금지 정보 A',
manufacturer: '제조사 정보 A',
},
{
id: '1-2',
rank: 2,
percentage: '5%',
name: '뉴프람정5mg Newpram Tab.',
description: '정신신경용제(117)',
image: '<https://via.placeholder.com/50>',
ingredient: '성분 정보 B',
additives: '첨가제 정보 B',
dopingInfo: '도핑금지 정보 B',
manufacturer: '제조사 정보 B',
},
{
id: '1-3',
rank: 3,
percentage: '3%',
name: '유타렌정 Utaren Tab.',
description: '소화성궤양용제',
image: '<https://via.placeholder.com/50>',
ingredient: '성분 정보 B',
additives: '첨가제 정보 B',
dopingInfo: '도핑금지 정보 B',
manufacturer: '제조사 정보 B',
},
{
id: '1-4',
rank: 4,
percentage: '1%',
name: '에스브론캡슐 S bron Cap.',
description: '기타의 호흡기관용약(229)',
image: '<https://via.placeholder.com/50>',
ingredient: '성분 정보 B',
additives: '첨가제 정보 B',
dopingInfo: '도핑금지 정보 B',
manufacturer: '제조사 정보 B',
},
// ………
],
},
{
id: '2',
percentage: '89%',
name: '유타렌정 Utaren Tab.',
description: '소화성궤양용제',
image: '<https://via.placeholder.com/50>',
candidates: [
{
id: '2-1',
rank: 1,
percentage: '79%',
name: '유타렌정 Utaren Tab.',
description: '소화성궤양용제',
image: '<https://via.placeholder.com/50>',
ingredient: '성분 정보 C',
additives: '첨가제 정보 C',
dopingInfo: '도핑금지 정보 C',
manufacturer: '제조사 정보 C',
},
{
id: '2-2',
rank: 2,
percentage: '21%',
name: '다른 약물 B',
description: '기타의 소화기관용약(239)',
image: '<https://via.placeholder.com/50>',
ingredient: '성분 정보 D',
additives: '첨가제 정보 D',
dopingInfo: '도핑금지 정보 D',
manufacturer: '제조사 정보 D',
},
// ………
],
},
];
/api/pill/:id
요청: { "id": "string" }
응답:
{
"id": "string",
"name": "string",
"description": "string",
"image": "string",
"ingredient": "string",
"additives": "string",
"dopingInfo": "string",
"manufacturer": "string"
}
/api/history
응답:
[
{
"id": "string",
"name": "string",
"description": "string",
"image": "string",
"date": "string"
}
]