Skip to content

Commit

Permalink
Fixed period id issue
Browse files Browse the repository at this point in the history
  • Loading branch information
bjsilva1 committed Jan 20, 2024
1 parent 69779be commit e496d80
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/campusdish_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e496d80

Please sign in to comment.