From ce7da3dd2cff17f0c17d76092252cab3be2dd324 Mon Sep 17 00:00:00 2001 From: Bryan Silva <101739803+bjsilva1@users.noreply.github.com> Date: Fri, 19 Jan 2024 19:08:07 -0800 Subject: [PATCH] Fixed period id issue (#37) --- 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: