From e496d804789afc55148ba9888ed45d25cf0c2334 Mon Sep 17 00:00:00 2001 From: Bryan Silva Date: Fri, 19 Jan 2024 19:04:36 -0800 Subject: [PATCH] Fixed period id issue --- api/campusdish_interface.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/campusdish_interface.py b/api/campusdish_interface.py index 84ebad3..863feb5 100644 --- a/api/campusdish_interface.py +++ b/api/campusdish_interface.py @@ -12,9 +12,10 @@ def get_menu_data(location, meal_id, date): perform get request for the diner_json and return the dict at diner_json['Menu'] ''' location_id = LOCATION_INFO[location]['id'] + period_id = MEAL_TO_PERIOD[meal_id][0] #https://uci-campusdish-com.translate.goog/api/menu/GetMenus?locationId=3314&mode=Daily&date=12/14/2023 - response = requests.get(f'https://uci-campusdish-com.translate.goog/api/menu/GetMenus?locationId={location_id}&date={date}&mode=Daily') + response = requests.get(f'https://uci-campusdish-com.translate.goog/api/menu/GetMenus?locationId={location_id}&date={date}&periodId={period_id}') if response.status_code == 200: payload = response.json() if 'Menu' in payload: