Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.5주차 세미나 과제 #7

Open
woals2840 opened this issue Nov 15, 2024 · 0 comments
Open

4.5주차 세미나 과제 #7

woals2840 opened this issue Nov 15, 2024 · 0 comments

Comments

@woals2840
Copy link
Collaborator

woals2840 commented Nov 15, 2024

https://www.notion.so/ERD-API-13fc6843d41180c0a1eed93dfd548d9a?pvs=4 과제노션 페이지

ERD

배민ERD


API

1.가게 목록 조회(/api/stores)

Request

GET /api/stores?category=한식&sort=rating

Response

{
	"stores" : [
	  {
	    "store_id": 1,
	    "category": "한식",
	    "min_price": 15000,
	    "club": true,
	    "sname": "a",
	    "rating_avg": 4.7,
	    "deliver_price": 3000,
	    "liked": false,
	    "created_at": "2024-11-10T14:30:00",
	    "deliver_type": "배달"
	  },
	  {
	    "store_id": 2,
	    "category": "한식",
	    "min_price": 12000,
	    "club": false,
	    "sname": "b",
	    "rating_avg": 4.5,
	    "deliver_price": 2000,
	    "liked": true,
	    "created_at": "2024-11-11T11:00:00",
	    "deliver_type": "포장"
	  }
	]
}

2. 가게 메뉴 조회(/api/stores/{storeId}/menus

Request

GET /api/stores/1/menus

Response

"menu" : [
  {
    "menu_id": 1,
    "image": "https://aaa/menu1.jpg",
    "mname": "김치찌개",
    "mcategory": "찌개류",
    "menu_price": 9000
  },
  {
    "menu_id": 2,
    "image": "https://bbb/menu2.jpg",
    "mname": "된장찌개",
    "mcategory": "찌개류",
    "menu_price": 8000
  }
]

3. 배달 방식에 따른 가게 목록 조회(/api/stores?deliver_type={type})

Request

GET /api/stores?deliver_type=가게배달

Response

"deliver" : [
 {
	    "store_id": 3,
	    "category": "중식",
	    "sname": "티엔미미",
	    "rating_avg": 4.6,
	    "deliver_price": 2500,
	    "deliver_type": "가게배달"
  },
  {
	    "store_id": 5,
	    "category": "양식",
	    "sname": "모수",
	    "rating_avg": 4.8,
	    "deliver_price": 3000,
	    "deliver_type": "가게배달"
  }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant